> ## 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 Zid

> Connect your Zid store from Popcorn or the Zid App Market, see what syncs, set VAT, payments and shipping, and how the Zid subscription works.

Connect Zid so your AI agent sells from your live Zid catalog, creates orders in Zid with cash on delivery, bank transfer or a payment link, tracks orders with shipping details, and keeps your customer list current. If you buy Popcorn through the Zid App Market, the subscription is applied to this workspace through the same connection.

## Before you start

* A Zid store you can sign in to.
* A Popcorn role that can manage integrations (**Owner** or **Admin**).
* Allow pop-ups for Popcorn: the authorization opens in a pop-up window.

## Connect from Popcorn

**1. Open Integrations**

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

**2. Approve access**

A pop-up opens on Zid. Sign in and approve the access request.

**3. Wait for confirmation**

The pop-up closes on its own. Popcorn shows **Zid connected** and the row reads **Connected**. If the pop-up closes without connecting, you see **Couldn't connect to Zid. Try again.** Click **Connect** again.

## Connect from the Zid App Market

Installing Popcorn from the Zid App Market brings you to a Popcorn page titled **Connect your Zid store** ("Link your Zid store so your agent can answer questions about your products and orders."). If you are not signed in, Popcorn asks you to sign in first.

**1. Click Connect Zid**

A pop-up opens on Zid and the page reads **Waiting for Zid** ("Finish signing in to Zid in the window that opened."). Approve the connection in Zid, and the pop-up closes by itself. Keep the page open until you're done.

**2. Wait for confirmation**

On success the page shows **Zid connected** and takes you to **Integrations** ("After connecting, we'll take you to Integrations."). If it shows **Zid isn't connected yet**, read the reason under it, such as "The window closed before Zid finished connecting. Try again and approve the connection in Zid.", and click **Connect Zid** again, or use **Go to integrations** and connect from the **Zid** row.

If your browser blocks the pop-up, the page says "Your browser blocked the Zid window. Allow pop-ups for this site and try again." The page also lists what to try under **If nothing happens**, and **Contact support** under **Need help?**

## What happens when you connect

* Popcorn saves your store ID and store URL.
* Popcorn asks Zid whether your prices include VAT and which payment methods the store accepts, and starts from those answers. A choice you made yourself is never overwritten by a later read.
* Popcorn subscribes to Zid notifications for product creation, updates, publishing and deletion, for new orders and order status and payment changes, and for customer creation and updates. Once a day Popcorn re-checks the order notifications it uses to keep stock current and restores any that are missing.
* A full product import and a full customer import start in the background. The row shows **Resyncing products…** until the product import finishes.
* If you have no delivery options in Popcorn yet, Popcorn adds your active Zid delivery options for you, with the fee Zid sets for each zone when Zid shares it. See [Shipping methods](#shipping-methods).
* Any Zid App Market subscription events received before the store was connected are applied now.
* Active [automated campaigns](https://docs.trypopcorn.ai/campaigns/automated-campaigns.md) get their Zid triggers re-registered, so **Reconnect** also repairs campaigns that stopped firing.

## What syncs

**Products**

* Name, description, images, product link, keywords, price and sale price. A sale price is used only while its sale period is active.
* Every product needs a SKU. Products without a SKU are skipped and do not appear in Popcorn.
* A published product is active in Popcorn only when Zid lists it at a location that sells on your website, whatever the quantity there. This doesn't depend on **Product quantities**. A product listed only at locations that sell through Zid Cashier (your branch tills) or on marketplaces stays inactive, because shoppers can't buy it on your website. A variant is judged by its own locations. If Popcorn can't read where your locations sell, products are saved as Zid lists them.
* A parent product with variants is not sellable itself; its variants are the sellable products, and they inherit the parent's images and link when they have none of their own.
* Stock is the quantity at locations that sell on your website. Stock marked as infinite is treated as always available.
* Zid custom option fields and custom user input fields become product custom options, so the agent asks for them during checkout. See [the synced catalog](https://docs.trypopcorn.ai/products/catalog.md).

**Customers**

* Name, mobile number, email, city and country, and tags.
* Each imported customer shows **Zid** as its source on the customer profile. See [customers](https://docs.trypopcorn.ai/customers/overview.md).

### VAT for Zid prices

Popcorn stores final customer prices, so it needs to know whether the prices in Zid already include VAT. Zid tells it, and you can say otherwise.

Click the gear icon on the **Zid** row to open **Zid settings** ("Zid tells your agent whether your prices include VAT."). The gear shows only to roles that can edit settings. Popcorn asks Zid every time the dialog opens ("Checking with Zid"), then shows one of these:

| What the dialog says | What it means |
| - | - |
| **Checked with Zid just now**: "Your prices include 15% VAT, so your agent quotes them as they are." (or "Your prices don't include VAT, so your agent adds 15% when it quotes them." or "VAT is off for your store, so your agent quotes prices as they are.") | Your agent follows what Zid says. Click **Check again** to ask Zid again. |
| **Zid says prices include VAT**, **Zid says prices don't include VAT** or **Zid says VAT is off for your store**, with "You chose to add 15%, so your agent follows your choice and a price it quotes may not match your Zid checkout." | You chose something different from Zid. Your agent follows your choice. Click **Use Zid's answer** to follow Zid instead; you see "Your agent now follows Zid". |
| **Zid says prices don't include VAT** with "Zid didn't say how much to add, so tell your agent below." | Zid gave no rate. Enter it below. |
| **Zid didn't share your tax settings** ("Reconnect Zid so it can share them, or choose below.") | Click **Reconnect Zid** or **Try again**, or choose yourself. If you're not sure, the dialog suggests adding one product to your Zid cart: if VAT is added on top of its price (delivery doesn't count), choose **Don't include VAT**; if not, choose **Include VAT**. |

To choose yourself, click **Not right? Choose it yourself**. Under **Prices in Zid**, choose **Include VAT** (your agent quotes each price as it is in Zid) or **Don't include VAT** (your agent adds the VAT rate when it quotes a price), and for the second enter the **VAT rate (%)**, for example 15 ("A number, like 15."). Click **Save**. You see **VAT saved**, or **VAT saved. Prices in your catalog are being updated.** when the change affects prices; Popcorn reprices your catalog in the background.

Settings → General also has a **VAT** panel. With Zid connected it says "VAT is set in your Zid settings" and **Open Zid settings** takes you to this dialog.

## Ongoing updates

| Change in Zid | Effect in Popcorn |
| - | - |
| Product created, updated or published | Added or updated in **Products**, and pushed to your Meta catalog if one is connected. |
| Product deleted | Removed from **Products**. |
| Order created, or its status or payment status changes | Stock for the products in that order is refreshed. When Zid reports the order as paid, an order the agent created is marked paid. |
| Customer created or updated | Added or updated in **Customers**. |
| A stock location starts or stops selling on your website | Product notifications don't report this. Click **Resync products** to update your catalog straight away. Popcorn also checks your locations once a day while your plan is active and reads your catalog again when they changed. |

Zid access tokens are refreshed automatically. If Zid reports that the stored credentials are no longer valid, Popcorn clears them and syncs, orders and tracking stop working until you click **Reconnect** (or **Connect**) on the Zid row and authorize again.

Zid also checks the permissions of the Zid user who connected the store, whatever the app was approved for. If that user lacks one, such as permission to view orders, Zid refuses those requests: for example, products sync but the agent can't look up orders. **Store health** then shows **Store account lacks permission**, and **View details** says what Zid refused (for a sync, which permission is missing). Click **Reconnect** on the Zid row and approve with the store owner's Zid account, or give the user that connected the store the permission in Zid. See [Store health](https://docs.trypopcorn.ai/integrations/commerce-health.md).

## Checkout and payment

When the agent completes a sale, Popcorn creates the order in Zid using the payment method the customer chose: **Cash on delivery**, **Bank transfer** or **Payment link** (Zid Pay). Each is matched to the corresponding payment method in your Zid store, and a method counts only when Zid has it turned on. A Zid payment link created by Popcorn expires 24 hours after it is created.

* **Popcorn starts from what Zid accepts.** When you connect, Popcorn reads which of the three your store takes and offers only those. It also reads the cash on delivery fee Zid adds, when Zid names a single amount, and includes it in quotes.
* **Your own choice wins.** Once you change payment methods under **Settings → Payment**, a later read of Zid never overwrites them, and an order for a method you have turned off is refused. A method your Zid store has turned off is never used on an order, even when Zid still lists it.
* **No method on means no order.** If Zid has every payment method off, or you turn them all off, the agent doesn't create the order: it tells the customer your team will confirm how they can pay, and hands the conversation over.
* **Fees as Zid charges them.** When your Zid checkout adds VAT on top of a delivery fee or a cash on delivery fee, the agent quotes the fee with that VAT, so the summary matches what the customer pays. Delivery options synced from Zid's zones, at the fee Zid sets, take this from your Zid tax settings. For any other fee, Popcorn learns it from the first Zid order that uses the fee, and learns again after you change the fee; until then the fee is quoted as you entered it.

When the customer taps **Confirm order**, Popcorn checks each product in Zid again, including that it still has stock for your website. If one is no longer for sale, the order isn't created and the customer is told their cart changed and gets a fresh summary.

Zid prices the order when it is created: any automatic (store-wide) discount that the cart qualifies for is applied, and a discount code the customer gave is applied on top. The confirmation message gives the customer Zid's own order number and the total Zid reports. The order in Popcorn shows that total, with the delivery and cash on delivery fees as Zid charged them, so it can be lower than the summary the customer confirmed; a fully discounted order shows a total of 0.

If no payment option has been set yet and Zid can't be read, a new workspace starts with **Cash on delivery** on. See [shipping and payment](https://docs.trypopcorn.ai/settings/shipping-and-payment.md) and [orders](https://docs.trypopcorn.ai/orders/overview.md).

## Shipping methods

Under **Settings → Shipping**, click **Sync from store** to open **Sync shipping from your store** and import your Zid delivery options. Zid prices each delivery option by zone, so a delivery option with several zones is listed once per zone, each with:

* the cities the zone covers,
* the fee Zid sets for the zone (a zone priced by weight has none: enter one),
* the zone's cash on delivery terms: **Cash on delivery fee** with the amount, **Cash on delivery, no fee**, or **No cash on delivery**.

Zid doesn't share delivery times, so enter **Fastest delivery (days)** for each one you choose, then click **Sync methods**. Each zone becomes its own option under **Shipping options**, showing its cash on delivery terms under the fee. If Popcorn can't read Zid's zones, it lists each delivery option once with its cities and no fee, and you enter the fee yourself.

At checkout the agent charges the zone's own fees, and won't take a cash on delivery order for a zone that doesn't accept it: it offers the delivery options to that city that do, or another payment method. See [how the agent uses shipping](https://docs.trypopcorn.ai/settings/shipping-and-payment.md#how-the-agent-uses-shipping-at-checkout).

## Order tracking

When a customer asks about an order, the agent looks it up in Zid by order number (Zid's, or Popcorn's own "P" number from **Orders**) and checks that the customer's phone number matches the order; a mismatch is refused. With only a phone number, it finds the customer's five most recent orders. Either way, each order's answer can include the order status, shipping method, estimated delivery, tracking number and tracking link, delivery status and the order's history. 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 Zid 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 Status Updated** | An order's status changes |
| **Order Payment Status Updated** | An order's payment status changes to paid or unpaid |
| **Abandoned Cart Created** | A shopping cart is abandoned |
| **Abandoned Cart Completed** | An abandoned cart is completed |

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

## Subscription through the Zid App Market

If you buy a Popcorn plan in the Zid App Market, Zid notifies Popcorn and the plan is applied to the workspace whose connected Zid store matches. Popcorn recognises the **Cheese** plan (monthly and yearly) and plans named **Salt** or **Cheese**; a plan it does not recognise is treated as the free plan.

| Zid event | What Popcorn does |
| - | - |
| Subscription activated, renewed or upgraded | The plan becomes active until the end date Zid reports. |
| Renewal reminder (sent three days before the end date) | Nothing changes. |
| Subscription suspended (Zid ends the paid period, usually within a day of the end date) | The plan ends, with its credits. **Plan and billing** shows **Ended on** with the date, and your agent stops replying to customers and hands their conversations to your team until you renew. If the suspension never arrives, the plan ends two days after the end date. |
| Subscription expired (when Zid removes the app, five days after the end date) or refunded | Access under that plan ends; a refund ends it at once. |
| App uninstalled from Zid | Nothing changes in Popcorn. The store stays connected until you contact support. |

If you subscribe before connecting the store in Popcorn, the subscription is held and applied as soon as you connect. See [plans and credits](https://docs.trypopcorn.ai/billing/plans-and-credits.md) and [top-ups and renewal](https://docs.trypopcorn.ai/billing/top-ups-and-renewal.md).

## Related

* [Connect your store](https://docs.trypopcorn.ai/integrations/overview.md)
* [Store health](https://docs.trypopcorn.ai/integrations/commerce-health.md)
* [Troubleshooting](https://docs.trypopcorn.ai/integrations/troubleshooting.md)


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