This extension ships with the Omneo CX Shopify app. See the Shopify extension overview for installation.
Enable the extension on a theme
The Profile Portal is a Shopify global theme app extension. To enable it on a theme:1
Open the theme editor
In Shopify admin, go to Online Store → Themes, then Customize the theme you want to enable Profile Portal on.
2
Enable the app embed
Open the App embeds panel (the puzzle-piece icon), find Profile Portal, and toggle it on.
3
Configure the block
Set the block settings to match your storefront (see Block settings).
4
Save the theme
Save the theme. The portal dialog is now available on every page of that theme.
Block settings
Profile Portal Button block
The Profile Portal Button is an optional section block that renders a pre-styled account icon with the#profile-portal-button ID. Drop it into a header or any section to get a no-code way to toggle the portal.
If you already have an account button in your theme, skip this block and point the Profile Portal Button Selector setting at your existing element instead.
Authentication
The Profile Portal fetches a token fromGET /apps/cx via the Omneo CX Shopify app proxy. Shopify automatically authenticates the request against the storefront session, so the token is scoped to the currently logged-in customer (or is anonymous when no customer is logged in).
Tokens are cached in sessionStorage under the key omneo-cx-{customerId}-id-token and refreshed automatically when they expire or when the logged-in customer changes. You do not need to manage tokens manually unless you are integrating with a custom login flow, in which case the window functions below give you full control.
See Shopify Authentication for the underlying token exchange.
Window functions
The Profile Portal block exposes the following functions onwindow for programmatic control from theme code, custom buttons, or third-party scripts.
openOmneoCXProfilePortal(path, force)
Opens the profile portal dialog.
closeOmneoCXProfilePortal()
Closes the profile portal dialog and resets the iframe src to about:blank so no session is kept alive in the background.
fetchOmneoCXToken(force)
Fetches an ID Proxy token from /apps/cx, updates internal state, and caches the result in sessionStorage.
Returns a promise that resolves to
{ token, tenant, isAnon }.
loginOmneoProfilePortal()
Forces a fresh token fetch (bypassing the cache) to pick up the currently logged-in Shopify customer. Use this immediately after a customer logs in if the portal needs to reflect the new session without a full page reload. Emits the omneo-cx-profile-portal-login event on success.
logoutOmneoProfilePortal()
Logs the current customer out of the portal:
- Clears the cached token from
sessionStorage. - Resets internal state to anonymous.
- Closes the dialog if it is open.
- Emits the
omneo-cx-profile-portal-logoutevent.
resetOmneoProfilePortal()
Fully resets the portal to its initial state:
- Removes every
omneo-cx*key fromsessionStorage. - Resets all internal state (token, tenant, anonymous flag, open state, current iframe path).
- Clears the iframe
src. - Emits the
omneo-cx-profile-portal-resetevent.
Events
In addition to the window functions, the portal emits custom DOM events on bothdocument and the portal container. Subscribe to these for analytics or to react to portal lifecycle changes.