Unidy Docs

Shopify storefronts

Connect Shopify sign-in, customer data, and orders using Unidy APIs.

Shopify storefronts

The Unidy SSO app connects Shopify customer sign-in to Unidy. Install it in Shopify; it is separate from the Unidy dashboard plugin catalogue. You can also build a custom authentication and transaction integration using the APIs below.

What you needNext step
Customer sign-in and profile claimsChoose an authentication approach, then configure an OAuth application.
An ISO country code in the sign-in dataRead the compatibility guidance below and the claim reference.
Store orders on the Unidy customer recordUse the transaction recipes in Common REST workflows.
Updates from Unidy to your storeStart with Webhooks overview.

Country-code compatibility

The address scope is required for the OpenID Connect address claim. When the customer has a country stored, address.country_code contains its ISO 3166-1 alpha-2 code, such as DE. By default, address.country contains a localized country name.

The Shopify integration setting on an OAuth application changes address.country to the same ISO code. Enable it when your storefront integration expects that format in address.country. If the integration reads address.country_code, this setting is unnecessary. Handle missing address values as described in ID tokens and claims.

The setting applies to that OAuth application. It does not change address.country_code, address.formatted, REST responses, or order synchronization. Separate OAuth applications are useful for storefronts with independent settings and release lifecycles; a client can have multiple registered redirect URIs.

Connect sign-in and orders separately

Choose identity scopes for the attributes your storefront needs. Claims available at sign-in depend on scopes and customer data; use the relevant API when you need other or updated data. For a server-side integration that can keep a secret, follow Authorization Code for confidential clients.

Order ingestion requires transactions to be enabled and a server-side client-credentials token. Batch writes require transactions_batch:write; individual transaction writes require transactions:write. Preserve the transaction identity (external_id, source_platform, and source_channel_id) and decide how guest purchases match customers before syncing. The Shopify integration checkbox does not create this connection.

Install and configure the SSO app

  1. Install the Unidy SSO app from the Shopify App Store and contact Unidy Customer Success for the OAuth configuration for your store.
  2. In the app setup, set the Unidy URL, then the Client ID using the supplied values.
  3. Use Add the login button to open the theme setup and enable the Unidy SSO block/embed. Try the example before adapting it to your brand.
  4. Test sign-in, customer creation/update, the return destination and sign-out on the actual theme.

The documented app flow creates or updates a Shopify customer from the Unidy account on login, maintains an Online Store login-helper page, and supplies a theme login block. It does not restyle the entire theme. Profile data includes email, first/last name and, when provided, phone and address (street/house number, city, postal code, country). The older creation-only description should not be read as a promise that later logins never update the customer; verify the installed app's update behavior with a test profile.

Existing Liquid login buttons

For themes already using the hosted SSO bridge, this is a minimal starting point. Confirm that https://shop.unidy.de/login-unidy is the bridge configured for your installation before adopting it in a new store. Use the app-provided block when available.

liquid
{% if customer %}
  <a class="button button--secondary" href="/account/logout">Sign out</a>
{% else %}
  <a class="button button--secondary"
     href="https://shop.unidy.de/login-unidy?shopify_domain={{ shop.permanent_domain | url_encode }}&amp;return_to={{ canonical_url | url_encode }}">
    Sign in with Unidy
  </a>
{% endif %}

shopify_domain identifies the permanent Shopify store domain; return_to restores the current page. URL-encode both values. You can replace the text with your theme's sign-in/sign-out icons and CSS; the legacy snippet loaded app.css, PersonLockIcon.svg and PersonLockFilledIcon.svg as theme assets, which must exist if you reuse them. The condition selects Shopify's logout link for signed-in customers. Follow the logout guide when your flow must also terminate the Unidy session.

Account-mode compatibility

The historical SSO bridge and Liquid example target Legacy customer accounts in Shopify Settings → Customer accounts. The newer customer-account flow uses email-code sign-in and must not be assumed to accept this legacy bridge. Confirm the installed app's supported account mode before switching an existing store.

The legacy setup also asked stores to disable Shopify spam protection under Online Store → Preferences, with separate switches for contact/comment forms and login/account/recovery pages. Treat that as version-specific compatibility guidance. Unidy's protection applies to its own forms; it does not establish protection for every Shopify form. If Shopify's login challenge interferes with your tested bridge, agree the required setting with the app owner and test the affected forms before changing it.

App permissions and customer data

The documented SSO app installation requests the following scopes. Review the actual Shopify consent screen for your installed release; these scopes describe account synchronization, not transaction ingestion.

Shopify scopesPurpose
read_customers, write_customersRead/create/update customer profile and address data for SSO.
read_content, write_contentMaintain the login-helper page.
read_themes, write_themesProvide and enable the theme login block.

Customer data used by this flow is name, email, phone and address, declared for App functionality. The documented SSO app does not request order, product, inventory, discount or payment access. A separate order integration needs its own access and implementation; installing the SSO app does not import transactions.

The app's documented privacy integration handles Shopify's customers/data_request, customers/redact and shop/redact webhooks for data requests, customer erasure and shop erasure after uninstall. Include those paths in your rollout review with the app owner; a successful sign-in alone does not verify privacy-webhook delivery.

Was this page helpful?