> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# What syncs

> Which Shopify products and orders Captain imports, and how it keeps them current.

Captain imports your published products and the order data it needs to measure search revenue, and keeps both in sync.

**You'll need:** a connected store. Nothing else to set up. Sync runs on its own.

## Products

Captain indexes a product only when both of these are true:

* Its status is **Active**.
* It's published to the **Online Store** sales channel, with a publish date that has already passed.

Draft, archived and unpublished products stay out. A product scheduled for a future date appears after that date, on the next sync.

When a product changes to draft, archived or unpublished, or is deleted, Captain removes it from search when it processes Shopify's notification, usually within minutes. If a notification is missed, the next successful scheduled resync removes it.

### What each record holds

Each variant is one record. Search groups variants by product.

* From the product: title, description, vendor, type, tags, collections, images and handle.
* From the variant: title, options, SKU, barcode, price, compare-at price, stock and availability.

## How sync runs

* **First import.** After the store connects, Captain exports the full catalog from Shopify in bulk and builds the index. Large catalogs take a few minutes.
* **Live updates.** Captain subscribes to Shopify's product create, update and delete notifications. Each one updates the matching records in the background.
* **Scheduled resync.** Captain re-reads the whole catalog at the interval you chose when connecting (6 hours unless you changed it). This catches anything a notification missed.
* **Manual sync.** **Sync now** on the connection starts a sync at any time.

Captain checks the signature on every Shopify notification and ignores any that fail.

## Orders

Captain keeps the minimum it needs to measure search revenue. For each order that counts, Captain records one purchase event with:

* the variant IDs, quantities and prices after discounts
* Shopify's order subtotal and currency
* the order time
* the anonymous `captain_user_token`, when the order has one

An order without a token is recorded under its Shopify order ID and isn't linked to search. Captain stores no customer names, email addresses, postal addresses, phone numbers or customer IDs.

From the [Captain web pixel](/guides/product-search/shopify/analytics#the-captain-web-pixel), Captain also records each add to cart by a consenting shopper: the variant, quantity, price and the anonymous token. For a completed checkout it keeps only a hash of the checkout token, to match express checkout orders.

#### Test, cancelled and refunded orders

Captain drops test orders, and orders already cancelled when it reads them, so they count zero revenue.

When an order changes after Captain records it, Captain counts what the shopper still paid for:

* A cancellation or a full refund removes the order from revenue.
* A partial refund lowers the order to the lines kept.
* An edit, for example with an item removed, restates the order at what it's worth now.

The first import counts each order at its current value, so an order refunded before the store connected counts only what's left.

#### Prices that include tax

On stores whose prices include tax, Shopify's subtotal includes that tax, so the revenue Captain records does too.

#### Order history

The first import reads the last 60 days of orders. Each Shopify connection shows how far back its orders go and why. Importing up to 365 days needs Shopify's approval for `read_all_orders`, which Captain hasn't received yet.