The shopper's own cart on Shopify
On a Shopify store with the web tag, the assistant adds to and reads the cart behind your store's cart icon. What the shopper sees, what the tag does, and what stays separate.
On a Shopify store with the web tag, the assistant works on the shopper's own cart: the one behind your store's cart icon and checkout. Before, it built a separate cart of its own, so a product it added did not show up in your store's cart and a product the shopper added on the site was invisible to the assistant.
This page explains how that works and what it means for your store. It applies to a site with a Shopify connector.
What the shopper sees
- An add shows in the store cart on the next page view. The assistant writes to the cart from AISA's servers, not from the shopper's browser. Your theme is not told, so the cart icon count and the cart drawer do not refresh on the page the shopper is on. They show the new line when the shopper loads another page or reloads.
- The assistant sees what the shopper put in the cart on your site. When it reads the cart, it reads the lines the store holds at that moment, whoever added them. Quantities the shopper changed on the site are kept: when the assistant adds a product that is already in the cart, it adds to the quantity the cart holds. A quantity of 0 removes the product. When the assistant changes a specific cart line, it sets that line's quantity. A quantity that is not a whole number is refused and the cart is left unchanged. Several changes in one step run one after the other, so none overwrites another.
- The assistant never shows the cart's access link. Where the separate cart gave the shopper Shopify's checkout link, the assistant points the shopper to your store's cart page (
/cart, or the page under your locale prefix such as/fr-ca/cart) when the page sent a valid one.
The cart card
Each time the assistant reads or changes the shopper's cart, the panel shows a card with that cart under the answer. It is built from the cart Shopify returned, not from what the assistant wrote, so it shows what the store actually holds at that moment.
The card shows:
- Your cart, with the line "As the assistant last saw it" under the title.
- One row per cart line: the product name (cut after two lines), the quantity ("Qty 2") and the unit price when the cart gives one. The first 5 lines are listed, then "+3 more" for the rest.
- Total: the cart's total as Shopify states it, when the cart gives one. It is never added up from the lines, so it can include a discount the lines don't show.
- Your cart is empty. in place of the lines when the cart has none.
- Go to cart: opens your store's cart page (
/cart, or the page under your locale prefix) in a new tab. It shows only when the page sent a valid cart page address. It does not change the cart.
The card is read-only. It has no quantity or remove buttons: the shopper changes the cart by asking the assistant, or on your store's own cart page.
Only the latest card shows in full. When the assistant reads or changes the cart again, the earlier card collapses to one line, such as "Cart: 3 items" (the sum of the quantities), with a smaller Go to cart. After a page reload, a resumed conversation shows its cards collapsed too: the full card is for the cart read on the page the shopper is on.
The card does not refresh on its own. If the shopper changes the cart on your site (in the cart drawer, on a product page), the card on screen keeps the cart as the assistant last saw it. The next time the assistant reads or changes the cart, a new card shows the cart as it is then.
No card shows when the cart cannot be read whole: Shopify returned an error, or a line has no name or no whole, positive quantity. A partial cart is never shown as the shopper's cart. The assistant's answer is unaffected.
Where it shows: only in the panel of the web tag, on a Shopify store where the shared cart is bound. The AI Storefront, the Playground and other platforms keep a separate cart, as described below, and show no cart card.
In the dashboard, a conversation's transcript shows its latest cart card in full, without Go to cart, and its earlier ones collapsed.
What is recorded
Two events are recorded, as for product cards:
- A cart view, once per full card, the first time it scrolls into view.
- A Go to cart tap, the first tap on each card.
Neither is recorded for a shopper who objected to measurement, nor in a preview. A cart is not a product, so neither event counts in the product figures: the Activity report's Impressions & clicks, the Event check table, and the "saw a product" and "clicked a product" steps of an A/B test's funnel leave them out. ⚠ No report shows cart views or Go to cart taps yet.
It works the same for a shopper who objected
A shopper who objected to measurement still gets the shared cart. The tag's cart read and the cart reference sent with each message do not check the objection, because they carry out what the shopper asked for (adding a product to their own cart) and measure nothing. The reference is not used to attribute orders: the conversation join key stays a separate, objection-gated mechanism.
The shopper-facing data-usage notice says so. On a Shopify store the assistant reads the cart from the store's page and sends it with each message. The key that gives access to the cart is used for that request only, is never stored and is never shown to the language model. The assistant may create an empty cart, whether or not the shopper objected.
What the tag does
All of this runs in the tag, on Shopify storefronts only (the tag detects window.Shopify).
- It reads the cart when the panel opens. It calls your store's
cart.jsand, when the cart exists, sends its reference to the assistant's panel. It also re-reads the cart on route changes and when the tab becomes visible again, so a later message carries the cart the page holds then. An unchanged cart is not sent twice. - It creates an empty cart if the visitor has none. A visitor with no cart has only a throwaway token. When the panel opens, the tag calls your store's own
cart/update.jswith no changes, so Shopify creates a real, empty cart. This sets Shopify's own cart cookie in the visitor's browser even if they add nothing. - It sends nothing before the panel exists. A page where the shopper never opens the assistant makes no cart request for this feature.
- It stays silent on failure. If a request fails, the conversation runs on its own separate cart, as before.
The cart reference contains the cart's access key, which can read and change the cart. The tag sends it only to the assistant's own origin and holds it in memory, never in storage or a cookie of its own. It is not given to the language model, and it is removed from the cart results the assistant keeps, so it is not stored in the conversation.
This relies on a Shopify behaviour that Shopify does not document: its cart service accepts the store's own cart token. We verified it on test stores. If Shopify changes it, the assistant falls back to a separate cart and its link, as described below.
What stays as before
The shared cart is bound only for the web surface (your storefront with the tag) on a site with a Shopify connector. Everything else keeps a separate cart and its own checkout link:
- the hosted AI Storefront page (
/s/{key}), - the Playground and evaluation runs,
- other platforms (BigCommerce, Adobe Commerce and so on).
A request with no valid reference also falls back to a separate cart, and so does a turn where Shopify answers that the cart no longer exists. The assistant then carries on with a cart of its own for the rest of that turn.
Counting: the panel and the storefront are separate sources
An add made by the assistant is recorded by AISA as an add_to_cart event from the panel. It is counted in the Sales report as an add from the assistant. On the shared cart, the event carries the lines and the currency but not the cart's token, which is the shopper's own cart token.
The Shopify pixel counts adds on your pages as a separate source. Do not add the two together: they are different counts, and the assistant's adds are not guaranteed to appear in the pixel's. Whether Shopify's own add-to-cart event fires for an add made by the assistant can depend on your theme and setup, so the pixel may or may not show it.
Your own analytics (your pixel, GA4, Meta) may not see the assistant's adds either. They listen to events in the shopper's browser, and the assistant's add is written from the server. The panel's add_to_cart event is the record of it.
Count add-to-carts and orders on your Shopify store
Install the AISA pixel in Shopify's Customer events so the add-to-carts shoppers make on your own pages are counted next to the assistant's, and your completed orders reach AISA.
Agents
Create and manage your AI Shopping Assistants as agents, each with its own configuration versions, and choose which one is live on your site.