> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nudj.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify Integration

> Connect Nudj to Shopify: initiate endpoint, PostHog restore, embed voice popup

Nudj has a first-class Shopify integration: fire events on purchase, sync customers, embed Nudj in the Shopify admin as an iframe, and run voice-enabled chat via a dedicated popup.

## Connecting Shopify

<Steps>
  <Step title="Start from the Shopify admin" icon="shop">
    Install the Nudj Shopify app from the Shopify App Store.
  </Step>

  <Step title="Initiate from Nudj admin" icon="link">
    Nudj exposes a **connection initiate endpoint** in the Admin API. Hit it from your Shopify app installer, Nudj returns the OAuth URL, finish the flow.
  </Step>

  <Step title="Verify webhook delivery" icon="square-check">
    Once connected, Shopify events (purchase, cart creation) arrive at Nudj. Verify in **Settings -> Integrations -> Shopify** status page.
  </Step>

  <Step title="Map rewards and challenges" icon="wand-magic-sparkles">
    Create challenges with `purchase_completed` custom-event criteria (see [Designing Achievements](/admin-guide/achievements/designing-achievements)) to fire on Shopify purchases.
  </Step>
</Steps>

***

## Events fired

Nudj receives these Shopify events by default:

* `cart/create`
* `cart/update`
* `checkout/create`
* `checkout/update`
* `order/create`
* `order/update`
* `customer/create`
* `customer/update`

Each event fires a Nudj event (e.g. `purchase_completed`) that can power achievements, streaks, and reward distribution.

***

## Shopify embed + voice popup

When Nudj is embedded inside the Shopify admin as an iframe, mic access is blocked by browser iframe permissions. The voice popup (#1936) opens a separate, non-sandboxed window with full mic permissions — voice transcripts flow back into the embed via `postMessage`.

See [Nudj Agent - Voice mode](/admin-guide/ai-agent#voice-mode).

***

## Analytics restore (#1064)

PostHog analytics restore for non-OneTrust deployments (#1064) — ensures member analytics fire correctly when your store doesn't use OneTrust cookie consent.

***

## Shopify app-level tools

The Nudj Shopify app exposes a subset of admin features in the Shopify admin UI:

* Quick-create challenges
* Attach rewards to existing products / collections
* View recent member activity
* Voice-mode chat agent with full platform tools

For embed settings (widget loading state, community toggle, launcher), see [Embed & Widget](/admin-guide/settings/embed-and-widget).

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Events not arriving" icon="triangle-exclamation">
    Check the Shopify webhook status in Shopify's admin. If they're failing, re-trigger via the Nudj connection status page.
  </Accordion>

  <Accordion title="Voice doesn't work in embed" icon="volume-xmark">
    Browser popup blockers. See [Nudj Agent troubleshooting](/admin-guide/ai-agent#troubleshooting).
  </Accordion>
</AccordionGroup>
