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

# Shopify Integration

> Connect your Shopify store to User Intuition to sync customers and segments, then invite them to research interviews without leaving the Shopify Admin.

The User Intuition Shopify app is an embedded admin app that bridges your Shopify store and your User Intuition workspace. Once installed, customers and customer segments sync automatically into User Intuition so you can recruit existing buyers as Participants for Studies and Interviews — directly from inside the Shopify Admin.

***

## What you can do with the Shopify app

<CardGroup cols={2}>
  <Card title="Sync your customer base">
    Imported customers become Participants you can invite to Interviews — including their name, email, phone, and order history.
  </Card>

  <Card title="Sync customer segments">
    Shopify customer segments (for example, VIPs, recent buyers, or churned customers) sync into User Intuition so you can target Studies at the audience that matters.
  </Card>

  <Card title="Run Studies in-admin">
    Browse your Studies, create new ones, and check sync status from inside the Shopify Admin — no separate login required.
  </Card>

  <Card title="Stay GDPR-compliant">
    The app implements Shopify's required compliance webhooks so customer-data and shop-redaction requests are honored automatically.
  </Card>
</CardGroup>

***

## Installing the app

The User Intuition app is an OAuth-based Shopify app. Installation creates a `Shop` record on the User Intuition side and bootstraps your User Intuition account automatically — you don't need to sign up separately first.

<Steps>
  <Step title="Install from the Shopify App Store">
    Locate the User Intuition listing and click the install action. Shopify will walk you through the standard OAuth permission grant.
  </Step>

  <Step title="Approve the requested scopes">
    The app requests read access to customers and orders so it can sync segments and customer profiles into User Intuition. No write scopes are requested.
  </Step>

  <Step title="Land in the embedded admin UI">
    After approving, Shopify redirects you to the embedded app inside your Admin. The app auto-creates your User Intuition account using your shop's email on file — there is no extra sign-in step.
  </Step>

  <Step title="Initial sync runs in the background">
    The app immediately kicks off a customer and segment sync. You can keep working while it completes.
  </Step>
</Steps>

<Note>
  Your User Intuition user is linked to your shop domain. If you uninstall and reinstall on the same shop, the app reconnects to your existing account rather than creating a new one.
</Note>

***

## The embedded admin UI

The User Intuition app appears in your Shopify Admin under **Apps**. Opening it loads the embedded UI inside the Shopify Admin shell — you never leave the Admin tab.

From inside the embedded app you can:

* See current sync status (pending, syncing, segments synced, complete) and how many customers have been imported so far
* Browse your Studies and their status (creating, fielding, complete, and so on)
* Create a new Study using the in-Admin Study builder
* Open deep links to your User Intuition workspace for anything that lives outside the embedded experience

<Note>
  The embedded UI uses Shopify Polaris components, so it looks and feels native to the Shopify Admin.
</Note>

***

## What syncs and how often

Two kinds of data sync from Shopify into User Intuition: **segments** and **customers**.

| Data                                        | Direction                 | Trigger                                      |
| ------------------------------------------- | ------------------------- | -------------------------------------------- |
| Customer segments                           | Shopify → User Intuition  | On install, and whenever a sync is initiated |
| Customers (with email, phone, orders, tags) | Shopify → User Intuition  | On install, and whenever a sync is initiated |
| Default "All Customers" segment             | Created in User Intuition | On first connection                          |

### Batched sync

Customer syncs run in **batches** rather than as a single large request. This keeps each request small enough to be reliable on large stores and lets the embedded UI report progressive status updates as batches complete. You'll see counts climb in the embedded app as batches are processed.

The sync flow at a high level:

1. The embedded app fetches segments from the Shopify Admin GraphQL API and posts them to User Intuition.
2. The app then walks through customers in batches, posting each batch.
3. Each Participant is upserted on a stable `(shop_domain, customer_id)` key, so re-runs don't create duplicates.
4. Customers are linked to the segments they belong to in Shopify.
5. When the final batch completes, the connection status flips to **complete**.

<Note>
  Re-running a sync is safe. It refreshes existing Participants and segments rather than creating duplicates.
</Note>

***

## Inviting customers to Interviews

Once customers are synced, they appear as Participants inside your User Intuition workspace. From there you can:

* Filter Participants by the Shopify segment they belong to (for example, only invite VIPs)
* Search Participants by name, email, or phone
* Select Participants and invite them to a Study

Each Participant carries their full Shopify customer object (orders, total spent, tags, and so on) so you can use that context when building screeners or reviewing Interview responses.

***

## GDPR and compliance webhooks

Shopify requires every public app to implement three compliance webhooks. The User Intuition app subscribes to all of them:

| Webhook                  | What we do                                                                                                                 |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| `customers/data_request` | Acknowledge the request so the merchant can fulfill it. Imported Participant data lives under your User Intuition account. |
| `customers/redact`       | Remove the affected customer's Participant record and any imported metadata for them.                                      |
| `shop/redact`            | Remove all imported segments, Participants, and shop state associated with the uninstalled shop.                           |

<Warning>
  Compliance webhooks fire on Shopify's schedule (typically 48 hours after uninstall for shop redaction). If you need a customer's data removed immediately, trigger redaction from your Shopify Admin rather than waiting for the scheduled webhook.
</Warning>

***

## Disconnecting and uninstalling

You can disconnect the integration at any time by uninstalling the app from your Shopify Admin's **Apps** page.

When you uninstall:

<Steps>
  <Step title="Shopify fires the app-uninstalled webhook">
    Shopify notifies the User Intuition app that your shop has uninstalled.
  </Step>

  <Step title="The app calls the User Intuition delete endpoint">
    User Intuition removes the external connection record and the shop's imported segments and Participants from your workspace's external integration tables.
  </Step>

  <Step title="Local shop state is cleaned up">
    The app's local `Shop` record and sync state are removed.
  </Step>

  <Step title="Compliance redaction follows">
    Shopify later fires `shop/redact` (typically after 48 hours), which triggers a final sweep to make sure nothing tied to the shop remains.
  </Step>
</Steps>

<Note>
  Studies you've already created and Interview transcripts you've already collected are part of your User Intuition workspace — they are not deleted when you uninstall the Shopify app. Only the integration link and the imported customer/segment data are removed.
</Note>

***

## Common setup pitfalls

<CardGroup cols={2}>
  <Card title="Shop email missing on Shopify">
    Auto-bootstrap uses the shop's contact email on file in Shopify to create or look up your User Intuition account. If that email is blank, set it under **Settings → Store details** before opening the embedded app for the first time.
  </Card>

  <Card title="Very large customer bases">
    Stores with hundreds of thousands of customers may take several minutes for the initial sync to complete. The embedded app shows progressive batch counts — let it run rather than refreshing repeatedly.
  </Card>

  <Card title="No segments visible after install">
    If you haven't created any customer segments in Shopify yet, only the default "All Customers" segment will appear in User Intuition. Create segments in **Customers → Segments** in your Shopify Admin and re-run the sync.
  </Card>

  <Card title="Reinstalling on the same shop">
    Reinstalling reconnects to your existing User Intuition workspace. Studies, Participants, and balances persist across reinstalls on the same shop domain.
  </Card>
</CardGroup>

***

## Next steps

<CardGroup cols={2}>
  <Card title="Create a Study" icon="plus" href="/creating-a-study/overview">
    Build a Study and invite your synced Shopify customers as Participants.
  </Card>

  <Card title="Invite customers" icon="users" href="/recruiting/invite-customers">
    Filter, search, and invite imported customers to Interviews.
  </Card>
</CardGroup>
