Shopify Markets
On a Shopify store that sells to several markets, the agent on your storefront answers with the price, currency and product links of the market of the page the shopper is on. How it works, what doesn't follow the page, and what is not verified yet.
If your store sells to several markets with Shopify Markets, the agent on your storefront answers for the market of the page the shopper is on. On a Shopify theme there is nothing to set up, in the connector or in the theme. A storefront that doesn't expose its country, as some headless builds don't, declares it with one line.
The page of a Shopify connector in the dashboard has a Markets card that says the same: markets are followed automatically, and the card has no field to fill in.
This page applies to an agent that has a Shopify connector. Without one, the page's country is not used.
How it works
On the embedded panel of a Shopify storefront:
- The tag reads the country of the page. Shopify exposes the country a storefront page is rendered for (
Shopify.country), whatever form the market's address takes: a subfolder such as/en-gb/, a subdomain or its own domain. The tag passes it to the panel when the panel loads, and the panel sends it with every message. If your page declares a country itself withiadvize('set', { market }), the declared country takes precedence over the one Shopify exposes. - The agent's catalog calls ask for that country. Product search, product lookup and product details go to Shopify with the page's country and the language the agent replies in on that turn. Shopify then answers with that market's price, currency and product links. The agent can't pick another country on its own.
- When the agent creates a cart of its own, it asks Shopify to create it for that country, with the same language. This is the separate cart the agent uses when it can't work on the shopper's own cart. If that cart comes back empty with an out-of-stock warning, the agent creates it once more with no country and no language, and Shopify picks the store's default market. A product that really is out of stock gets the same answer the second time.
The language sent is the one the agent replies in, not the panel's: a shopper who writes in English on a French panel gets catalog data asked for in English, and it can change during a conversation as the reply does. When the shopper's language isn't clear, the panel's language is sent.
The country is used for the request only. It is not stored with the conversation and is not part of the agent's instructions.
What doesn't follow the page's market
- The hosted page and the Playground. The AI Storefront page and the Playground have no storefront page to read, so no country is set. Shopify answers a call that names no country for the store's default market.
- A storefront that doesn't expose the country. The country is read from the page. If your storefront doesn't set
Shopify.countryas two letters (some headless builds don't), the tag reads no country. Declare it from your page instead:iadvize('set', { market: { country: 'GB' } })(see Declare the market of the page). With no country read and none declared, the agent gets no country and Shopify answers for the default market, as on the hosted page. - A country your store doesn't sell to. Shopify falls back to the default market.
- A language the market doesn't publish. Shopify answers in the market's default language.
- A cart that already exists. This feature never sets the market of a cart that already exists. On the shared cart, the shopper's own cart already belongs to the market of its page.
A store with a single market
For a store with a single market, prices and currency don't change. The agent now asks Shopify for the language it replies in, so product titles and links can come back in that language where your store publishes it.
What is not verified yet
Not verified per market yet
Price, currency, product links and language were checked per market on live stores. Stock per market and strikethrough (compare-at) prices per market were not. Creating a cart for a country was checked on a store with one market only, so the currency of a cart the agent creates on a store with several markets is not verified either. Don't rely on them matching the shopper's market until they are.
The shopper's own cart on Shopify
On a Shopify store with the web tag, the agent adds to and reads the cart behind your store's cart icon, and the tag refreshes the cart count on the page. What the shopper sees, what the tag does, and what stays separate.
Adobe Commerce
What the agent does on an Adobe Commerce store, how to set it up in order (connect it, install the tag, report its orders) so sales are credited to the agent.