Relay docs
Implementation

Embed

Install the Shopify embed bundle and mount only the surfaces you need.

This page explains the base Relay embed install and how to mount only the sections you actually want to show inside your Shopify app.

Minimum requirements

  • An app created in Settings → Apps
  • Embed enabled so Relay generates an embed token
  • A Relay Secret generated for the app, and your server signing shop identity with it — see Identity Verification (required for authenticated surfaces like helpdesk and feature-request writes)

Base install

Add the Relay embed script inside your Shopify embedded app page:

<script src="https://app.superrelay.ai/embed/embed.js" data-token="YOUR_EMBED_TOKEN"></script>

Optional: custom API host

The hosted snippet already points at the correct Relay API, so you normally don't need anything else. If you self-host the API or need a different host, add the optional data-api attribute:

<script
  src="https://app.superrelay.ai/embed/embed.js"
  data-token="YOUR_EMBED_TOKEN"
  data-api="https://YOUR_API_HOST"
></script>

Mount points

Add only the containers you need:

<div id="relay-changelog"></div>
<div id="relay-campaign-banner"></div>
<div id="relay-feature-requests"></div>
<div id="relay-helpdesk"></div>

Each container enables a single Relay surface. Remove the containers you do not want to show.

Module requirements

  • #relay-changelog: The embed token is enough.
  • #relay-campaign-banner: The embed token is required, and Shopify shop context is used at runtime.
  • #relay-feature-requests: The embed token is required. Write actions also need a signed shop identity.
  • #relay-helpdesk: The embed token is required, and a signed shop identity is needed for authenticated helpdesk actions.

Authenticated surfaces read window.RelayEmbed.identity, which your server produces with your Relay Secret — see Identity Verification.

If you only need one surface, keep only that container.

On this page