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

# Connect Shopify

> Connect your Shopify store, understand what syncs, set phone-only checkout and custom checkout fields, and see which events drive campaigns.

Connect Shopify so your AI agent sells from your live catalog, sends customers a Shopify checkout link, answers order-status questions from real order data, and keeps your customer list current. Connection takes one authorization; Popcorn then stays in sync through Shopify's own notifications.

## Before you start

* A Shopify store you can sign in to as a staff member with permission to install apps.
* A Popcorn role that can manage integrations (**Owner** or **Admin**).
* Allow pop-ups for Popcorn: the authorization opens in a pop-up window.

## Connect

**1. Open Integrations**

Go to **Integrations** and click **Connect** on the **Shopify** row.

**2. Choose the store**

A pop-up opens on Shopify. If you are signed in to several stores, Shopify asks which one to use.

**3. Approve the app**

Review the access the **Popcorn AI** app requests (products, orders, checkouts, draft orders, returns and customers) and approve it.

**4. Wait for confirmation**

The pop-up shows **Connecting Shopify** and then "Shopify is connected. This window closes by itself." Back on **Integrations**, the row reads **Connected** and Popcorn shows **Shopify connected. Your products are syncing.**

If the pop-up closes without connecting, Popcorn shows **Couldn't connect to Shopify. Try again.** Click **Connect** once more. If the pop-up itself says "This connection link was already used. Close this window and connect again.", close it and start again from **Connect**. If you install the app from Shopify's side instead, Popcorn starts the same authorization automatically once you are signed in to Popcorn.

## What happens when you connect

* Popcorn records your store's primary domain so campaign link buttons open on the domain your customers know.
* Popcorn creates the storefront access it needs to build checkouts.
* Popcorn subscribes to Shopify notifications for product creation, updates and deletion, paid orders, and customer creation and updates.
* A full product import and a full customer import start in the background. The Shopify row shows **Resyncing products…** until the product import finishes.
* Active [automated campaigns](https://docs.trypopcorn.ai/campaigns/automated-campaigns.md) get their Shopify triggers re-registered, so **Reconnect** also repairs campaigns that stopped firing.

## What syncs

**Products**

* Title, description, images, tags, product link and status. A product is active in Popcorn only when its Shopify status is **Active**.
* Price and compare-at price. A variant is on sale only when its compare-at price is higher than its price: Popcorn then shows the compare-at price struck through beside the price, on **Products** and in what the agent sends. A compare-at price equal to or lower than the price is ignored.
* Variants, up to the first 100 variants per product.
* Stock is the quantity sellable on the **Online Store** sales channel. Point-of-sale and wholesale inventory are not counted. With **Product quantities** on, a product that syncs with 0 is marked inactive, as on any store. Otherwise Popcorn doesn't hold back an active Shopify product because its stock reads 0; see [Products the agent can't sell](https://docs.trypopcorn.ai/products/catalog.md#products-the-agent-cant-sell).

**Customers**

* Name, phone number, email, tags and marketing consent. A customer who opted out of marketing is marked unsubscribed; a sync never re-subscribes anyone.
* Customers without a phone number are imported too.
* Each imported customer shows **Shopify** as its source on the customer profile. See [customers](https://docs.trypopcorn.ai/customers/overview.md).

## Ongoing updates

| Change in Shopify | Effect in Popcorn |
| - | - |
| Product created or updated | The product is added or updated in **Products**, and pushed to your Meta catalog if one is connected. |
| Product deleted | The product is removed from **Products**. |
| Order paid | An order the agent created for that checkout is marked paid. |
| Customer created or updated | The customer is added or updated in **Customers**. |
| Customer data deletion request from Shopify | Popcorn deletes the data it synced for that customer. After you uninstall the app, Shopify's shop deletion request makes Popcorn delete all customer data synced from that store. |

To force a fresh import at any time, click **Resync products** on the Shopify row. See [Connect your store](https://docs.trypopcorn.ai/integrations/overview.md) for the resync limits.

## Shopify settings

Click the gear icon on the connected **Shopify** row to open **Shopify settings** ("Choose how your agent places Shopify orders."). Change what you need and click **Save**; you see **Shopify settings saved**. **Cancel** closes the dialog without saving.

### Allow phone-only checkout

On by default. "Turn on if your Shopify store accepts orders with only a phone number. When off, your agent asks customers for an email before it creates the order."

### Custom checkout fields

Turn on **Custom checkout fields** ("Collect extra details at checkout, like a gift message or sender name.") to ask customers for more than the standard details. The answers are attached to the Shopify checkout the agent creates.

> [!WARNING]
>
> The dialog shows **Re-add Create order to your agents**: "New checkout fields apply to Create order added from now on. If your agents already have Create order, remove it and add it again." See [agent capabilities](https://docs.trypopcorn.ai/agents/capabilities.md).

**1. Find fields**

Click **Find fields from abandoned checkouts**. Popcorn reports "Found 2 new checkout fields" (with the number it found), **No new checkout fields found** or **No checkout fields found in recent abandoned checkouts**. If it can't search, you see "Couldn't find checkout fields. Try again."

**2. Review the list**

Under **Checkout fields**, each field has a **Required** checkbox, an **Enabled** checkbox, **What the agent asks the customer** (a text field; Popcorn starts it with "Ask the customer for" followed by the field's name), and an **Answer type**: **Text**, **Number**, **Phone**, **Email**, **Yes or no**, **Date**, **Time** or **Date and time**.

**3. Save**

Click **Save**. If the checkout fields don't save but phone-only checkout did, you see "Phone-only checkout was saved, but checkout fields weren't. Try again."; if nothing saved, "Couldn't save Shopify settings. Try again."

## Checkout on Shopify

When the agent completes a sale, Popcorn builds a Shopify cart with the customer's details and the collected attributes, and sends the customer a Shopify checkout link. The order appears in **Orders** and waits for payment until Shopify reports the order as paid. See [orders](https://docs.trypopcorn.ai/orders/overview.md).

* **Payment**: the customer pays in Shopify checkout. The payment methods your agent can offer follow what you turn on under **Settings → Payment**; a new workspace starts with **Cash on delivery** on. If no method is on, the agent doesn't create the order and hands the conversation over.
* **Shipping**: rates and delivery windows are handled inside Shopify checkout, so the order summary in the chat has no delivery line and **Settings → Shipping** offers no **Sync from store**. Use **Add delivery coverage** to list the countries and cities your agent can accept before sending a Shopify checkout. See [shipping and payment](https://docs.trypopcorn.ai/settings/shipping-and-payment.md).

## Order tracking

When a customer asks about an order, the agent looks it up in Shopify by order number and checks that the customer's phone number (or the email address on the order) matches; a mismatch is refused. If the customer gives only a phone number, or quotes Popcorn's own order number (as on **Orders**, "P" and six digits), Popcorn finds the customer in Shopify by phone and returns their five most recent orders. Switch on **Track orders** on the agent's **Actions** tab to use this; see [agent capabilities](https://docs.trypopcorn.ai/agents/capabilities.md).

## Events for automated campaigns

These Shopify events are available as triggers when you create an [automated campaign](https://docs.trypopcorn.ai/campaigns/automated-campaigns.md):

| Event | Sent when |
| - | - |
| **Order Created** | A new order is created |
| **Order Paid** | An order is paid |
| **Order Updated** | An order is updated |
| **Order Edited** | An order is edited |
| **Order Fulfilled** | An order is fulfilled |
| **Order Partially Fulfilled** | Part of an order is fulfilled |
| **Order Cancelled** | An order is cancelled |
| **Checkout Created** | A checkout is started |
| **Checkout Updated** | A checkout is updated |

For abandoned-checkout messages, Popcorn checks whether that customer has placed an order since the checkout and skips the message if they have.

## Related

* [Connect your store](https://docs.trypopcorn.ai/integrations/overview.md): actions on the row, resync limits, one active store.
* [Store health](https://docs.trypopcorn.ai/integrations/commerce-health.md): see whether sync, checkout and tracking are healthy.
* [Troubleshooting](https://docs.trypopcorn.ai/integrations/troubleshooting.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.