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

# Shopify

> Connect a Shopify store to sync customers and products, and start journeys when customers check out, order, receive or cancel an order.

The Shopify integration brings your store's customers and products into InstantCampaign, and sends order and checkout events as they happen, so journeys can email customers at the right moment.

<Note>
  Shopify needs the **Pro** or **Enterprise** plan. Only **Owners** and **Admins** can connect, sync or disconnect a store. One store can be connected per workspace.
</Note>

## Connect your store

<Steps>
  <Step title="Open Shopify">
    Go to **Settings → Developers → Integrations**. Under **E-commerce**, click **Connect** on the Shopify card.
  </Step>

  <Step title="Enter your store URL">
    Under **Store URL**, enter your store's `myshopify.com` domain, for example `mystore.myshopify.com`. Use this domain even if your shop has a custom domain.
  </Step>

  <Step title="Approve the app">
    Click **Connect with Shopify**, then approve access in Shopify. You're brought back to the Shopify page with "Shopify store connected successfully!".
  </Step>

  <Step title="Run the first sync">
    Click **Sync Now** to import your products and customers.
  </Step>
</Steps>

When you connect, InstantCampaign creates a list called **Shopify Customers — your-store.myshopify.com** and registers for your store's order and checkout events.

## What gets synced

Each sync (**Sync Now**) imports:

* **Products and variants**, shown under **Synced Products** with search and paging.
* **Customers**. Each customer with an email becomes or updates a contact, with first and last name, and is added to the **Shopify Customers** list. Customers without an email are skipped.

The Shopify page shows **Products Synced**, **Sync Status** (**Idle**, **Syncing** or **Sync Error**) and **Last Synced**. Only one sync can run at a time. Syncs don't run on a schedule, so click **Sync Now** whenever you want to refresh.

<Warning>
  Each customer's email marketing consent in Shopify decides how they arrive:

  | Shopify email consent              | New contact                     | Existing contact                      |
  | ---------------------------------- | ------------------------------- | ------------------------------------- |
  | Subscribed                         | **Active**                      | Unchanged                             |
  | Pending (confirmation not clicked) | **Pending**, not sent to        | Unchanged                             |
  | Unsubscribed                       | **Unsubscribed**                | Set to **Unsubscribed** on every list |
  | Not subscribed / no consent        | **Unsubscribed** (not mailable) | Unchanged                             |

  A sync never re-subscribes an existing contact or list membership.
</Warning>

## Events and journeys

After you connect, Shopify tells InstantCampaign about orders and checkouts as they happen. Each event is recorded on the contact, matched by email. A contact is created if none exists yet: **Active** if the buyer opted in to email marketing in Shopify, **Pending** if their Shopify consent is still pending, otherwise **Unsubscribed**, so their orders and goals are still tracked but they aren't mailed. An existing contact's status is never changed by an event. Each event can also start a journey, for contacts who are **Active**.

| Shopify activity                                                                                            | Event name                 | Journey data                                                           |
| ----------------------------------------------------------------------------------------------------------- | -------------------------- | ---------------------------------------------------------------------- |
| Checkout started                                                                                            | `shopify_checkout_started` | `data.cart` (items, total, currency, checkout link as `data.cart.url`) |
| Checkout abandoned: an hour after a checkout started, with no order from it or from the same customer since | `shopify_abandoned_cart`   | `data.cart`, as above                                                  |
| Order created                                                                                               | `shopify_order_created`    | `data.order`                                                           |
| Order paid                                                                                                  | `shopify_order_paid`       | `data.order`                                                           |
| Order fulfilled                                                                                             | `shopify_order_fulfilled`  | `data.order` plus `data.fulfillment`                                   |
| Order cancelled                                                                                             | `shopify_order_cancelled`  | `data.order` plus `data.cancel_reason`                                 |

`data.order` includes the order's `name`, `number`, `currency`, `subtotal`, `tax`, `shipping`, `discount`, `total` and the customer.

To use one, create a journey with the **API Event** trigger and enter the event name exactly as shown, for example `shopify_order_fulfilled`. In the journey's emails, use the data with Liquid, for example `{{ data.order.total }}`. See [Automation triggers](/guides/audience-and-campaigns/automation-triggers#api-event).

The Shopify page's **Quick Start** section lists typical journeys for each event: **Abandoned Cart**, **Post-Purchase**, **Order Created**, **Order Fulfilled** and **Order Cancelled**. **Shopify Automations** lists your **Active Journeys** that use Shopify events, with how many contacts each has enrolled.

<Tip>
  For cart recovery, trigger on `shopify_abandoned_cart`: it only fires for customers who didn't buy, so the first reminder can go out straight away. The **Abandoned Cart Recovery** journey template sends a reminder, then after a day checks for an order before it offers a discount. Use `shopify_checkout_started` if you want to react the moment a checkout begins.
</Tip>

## Disconnect

Click **Disconnect** on the Shopify page and confirm. Syncing and events stop, and synced products are hidden. Contacts and events already synced stay in InstantCampaign. Uninstalling the app from the Shopify admin does the same: the Shopify page shows the store as not connected, and you can connect it again at any time.

## Troubleshooting

| What you see                                                | What to do                                                                                                                                                                                                                                     |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Enter your store URL in the format: mystore.myshopify.com" | Use the `myshopify.com` domain, not your custom domain.                                                                                                                                                                                        |
| **Sync Error**                                              | Click **Sync Now** again. If it keeps failing, disconnect and reconnect the store.                                                                                                                                                             |
| "A sync is already in progress"                             | Wait for the current sync to finish.                                                                                                                                                                                                           |
| A journey doesn't start after an order                      | Check that the journey is active, uses the **API Event** trigger, and has the exact event name. The order must include an email, and the contact must be **Active**: a buyer who didn't opt in to marketing in Shopify doesn't enter journeys. |
