Adobe Commerce markets
Declare the markets of an Adobe Commerce store in its connector, so the agent's catalog requests carry the request headers of the market the shopper is on. How a market is selected, how address rules match, the limits, and what the checks don't cover.
An Adobe Commerce store that sells to several markets usually tells them apart with request headers: one store view code per market, sometimes a store code or a website code too. A connector has one set of request headers, so on its own it answers for one market only.
Declaring markets in the connector fixes that. For each shopper message sent from your storefront, the agent picks the market of the page and sends that market's headers to Adobe.
Not checked on a live Adobe Commerce store yet
The selection and the headers sent are covered by our own tests. They have not been checked against a live Adobe Commerce store yet. Test each market on your storefront before you rely on it.
Markets exist on Adobe Commerce connectors only. Every other connector type refuses them.
What a market is
A market has three parts:
- A code. 1 to 64 letters, digits,
_or-, starting with a letter or a digit. Codes are compared exactly, soFRandfrare two markets. - Addresses (optional). Where the market's pages are: a host, or a host and a path prefix. See How an address rule matches.
- Headers. At least one request header, each with a name and a value. When the market is selected, each of its headers replaces the connector's header of the same name (upper and lower case don't matter), and a header the connector doesn't have is added. The connector's other headers and its bearer token are sent unchanged.
Any visitor can select a declared market
The market is chosen from two things the shopper's browser controls: the code the page declares and the address of the page. A visitor can change both. Neither is ever sent to Adobe, only the header values you saved are, but any visitor can make the agent answer for any market you declared. Never declare a market that gives access to private prices or a private catalog: a B2B price list, a customer group, a pre-production store view.
Header values of a market are never secret. They have no Secret option, they are stored as typed, and the dashboard, the REST API and the MCP server show them in clear. Reserved header names are refused as they are for the connector's own headers, so a market can't set Authorization or Cookie. A market header also can't have the name of one of the connector's secret headers (upper and lower case don't matter), because it would replace a secret value with one stored in clear. The write is refused from both sides: when you add such a header to a market, and when you mark a connector header Secret while a market uses its name.
How a market is selected
For each message a shopper sends from the panel embedded on your storefront, in this order:
- The code the page declares. If the page called
iadvize('set', { market: { code } })and a declared market has exactly that code, that market is selected. - An address rule that matches the page. Otherwise, the market whose address rule matches the page's address best is selected.
- The connector's own headers. Otherwise no market is selected and the request carries the connector's headers as saved.
A declared code that names no market is ignored: the selection moves on to the address rules.
iadvize('set', { market: { code: 'be_fr' } })The selection is made again for every message, so a shopper who moves from one market's pages to another's gets the new market from their next message. Nothing about it is stored with the conversation.
The first answer to a starter question that is served from a stored copy is only reused for the same market with the same headers, so one market's prices never answer another market's shopper.
How an address rule matches
An address is a host (fr.example-store.com) or a host followed by a path prefix (example-store.com/fr/).
- The host must be the same, exactly.
example-store.comdoes not matchwww.example-store.comorfr.example-store.com. - The path matches by whole segments.
example-store.com/fr/matches/frand/fr/shoes/trail-runner, not/france/or/fr-be/. The path keeps its case. - The most specific rule wins. When several rules match, the one with the longest path is used. A rule with a host alone matches every page of that host and loses to any path rule that also matches.
With these three markets:
| Market | Addresses |
|---|---|
fr | example-store.com/fr/ |
be_fr | example-store.com/fr/be/ |
uk | uk.example-store.com |
| Page | Market selected |
|---|---|
https://example-store.com/fr/shoes | fr |
https://example-store.com/fr/be/shoes | be_fr: both rules match, the longer path wins |
https://uk.example-store.com/shoes | uk |
https://example-store.com/de/shoes | none: the connector's own headers |
https://example-store.com/fr/shoes, the page declares the code uk | uk: the code comes first |
An address is written without https://. A port, a query string, a fragment or a . or .. segment makes it invalid. There is no wildcard: a * is refused anywhere in an address, in the host or in the path. The host is saved in lower case and a path is saved with a closing /, so Example-Store.com/fr is stored as example-store.com/fr/. An address can belong to one market only.
Plain ASCII only
An address takes unaccented letters, digits and URL punctuation, nothing else.
Write a host with accented or non-Latin characters in its punycode form
(xn--exmple-cua.com, not exämple.com). Write a path with accents or spaces
percent-encoded (example-store.com/caf%C3%A9/, not
example-store.com/café/). Percent-escapes are compared as written, so their
case matters: a browser encodes with upper-case hex digits (%C3%A9) and
keeps an escape already present in a link as it was written. Copy the path
from the address your pages are actually served at.
What address rules need
Address rules use the page address the tag reads on your storefront. They match nothing when that address doesn't reach the agent:
- The site's page reading must be on. With Read the current page switched off for the site, or on a page that calls
iadvize('set', { pageSignal: false }), no address is sent. See Two ways to switch it off. - The page's host must be an authorized domain. An address whose origin is not on the site's authorized domains list is dropped.
A code the page declares doesn't depend on page reading. If you switch page reading off, declare the code on your pages instead.
Where markets don't apply
- The hosted page and the Playground. The AI Storefront page and the Playground have no storefront page, so no market is selected: they use the connector's own headers. Set those to the market you want as the default.
- The connection test, the health check and the tool refresh. All three send the connector's own headers only. None of them tries a market's headers.
A wrong market header doesn't fail a check
Because no check sends a market's headers, a mistake in one (a store view code that doesn't exist, a header name with a typo) leaves the connector healthy. It shows up as an empty or wrong catalog for the shoppers of that market only. After you declare or change a market, open the agent on a page of that market and search for a product.
Links don't follow the market
A market changes the headers sent to Adobe, so the catalog and the prices in the agent's answers are the market's. The links are not built from the market:
- Product links. A link Adobe returns is kept only when it is on the same origin as the site's URL in the agent. Any other link, one on a market's own host included, is replaced by the connector's product URL template, where
{siteUrl}is the origin of the site's URL whatever market was selected. - The cart link. It is always built from the cart URL template, with the same
{siteUrl}.
One host or one path per market: links go to the site's address
The connector has one product URL template and one cart URL template for all
its markets. On a store with one host per market (uk.example-store.com),
product and cart links point to the site's own host, not the market's. On a
store with one path per market (example-store.com/fr/), a templated link
carries no market path: only a link Adobe itself returns on the site's origin
keeps it. Check where the links of each market land before you rely on them.
Declare the markets
You declare markets in the Markets card of the connector's page. The REST API and the MCP server set the same list: see Through the REST API or the MCP server.
In the dashboard
Start once the connector answers for your default market (see Connect Adobe Commerce).
Open Connectors, then your Adobe Commerce connector. The Markets card is under Request headers. With no market declared it reads No market yet: the agent sends the connector's request headers for every shopper.
Choose Add a market. A market opens with a code, its page addresses and one header.
In Code, enter the code your pages declare for this market, fr_fr for
example. The code is required even when you rely on addresses only.
In Page addresses, enter where the market's pages are, one address per
line: a host (fr.example-store.com) or a host and a path
(example-store.com/fr/). Leave the field empty if your pages declare the
code. See How an address rule matches.
In Header name and Value, enter the header this market sends, the store view code first. The name field suggests the names of the connector's own request headers, the secret ones left out. Add a header adds another one, up to 10 per market. A market keeps at least one header.
Repeat for each market, then choose Save changes at the top of the page. Nothing is stored until you save. The markets are sent with the rest of the page, and only when you changed the card.
To remove a market, choose the bin next to its code, then save.
The card is also on the form that installs a new Adobe Commerce connector, so you can declare the markets when you install it.
A member without the Connectors: Edit permission sees the card but can't change it.
What the card checks when you save
The card's checks are part of the page's validation. When you choose Save changes and something is wrong, nothing is saved, each message appears under its field and the first faulty field takes the focus:
- a market with no code, or a code that is not letters, digits,
_and-starting with a letter or a digit; - a code used by two markets;
- an address that is not a host with an optional path, an address already used (by this market or another one), or more than 10 addresses in a market;
- a market with no header, or a header with a name and no value or a value and no name;
- a header name that is not a valid header name or is reserved (
Authorization,Cookie), or two headers with the same name in one market (upper and lower case don't matter); - a header value with a character outside plain, single-line text.
A market whose fields are all empty is ignored. Two rules are checked on our servers only, when the list is saved: a market header with the name of one of the connector's secret headers, and the limit on the headers of one request. When one of them refuses the list, the reason appears at the bottom of the card and nothing is saved.
The card has no test button for a market. After you save, open the agent on a page of each market and search for a product.
Through the REST API or the MCP server
- REST API: the
marketsfield of Update a connector, or of Install a connector for a new Adobe Commerce connector. Get a connector returns them. - MCP server: the
marketsfield ofupdate_connectorsandinstall_connectors.list_connectorsreturns them. See Manage a site's connectors.
The MCP tools that write need the Connectors: Edit permission. A body for PATCH /api/v1/connectors/{connectorId}:
{
"markets": [
{
"code": "fr",
"addresses": ["example-store.com/fr/"],
"headers": [{ "name": "X-Store-View-Code", "value": "fr" }]
},
{
"code": "uk",
"addresses": ["uk.example-store.com"],
"headers": [
{ "name": "X-Store-Code", "value": "uk_store" },
{ "name": "X-Store-View-Code", "value": "uk_en" }
]
}
]
}The header names and values above are examples: use the ones of your Adobe Commerce setup.
Replacing the list
markets replaces the whole stored list. A market you leave out is removed,
and "markets": [] removes them all. Leave the field out to keep the markets
as they are. The connector's page in the dashboard follows the same rule: a
save sends the whole list as the card shows it when you changed the card, and
leaves the markets out when you did not, so they stay as they are.
Limits
| Limit | Value |
|---|---|
| Markets per connector | 50 |
| Headers per market | 1 to 10 |
| Addresses per market | 0 to 10 |
| Length of an address | 255 characters |
| Length of a header name | 100 characters |
| Length of a header value | 2,048 characters |
| Headers of one request | 20: the connector's own plus the ones a single market adds |
The last limit is checked when you change the markets and when you change the connector's own headers. A market header that replaces one of the connector's doesn't count twice.
A list is refused as a whole when two markets share a code, when a market names the same header twice, when an address is invalid or already used by another market, or when a header has no value.
Connect Adobe Commerce
Create the Adobe Commerce connector from the Storefront MCP URL and its request headers, set how product links and images are built, and which tools start on.
BigCommerce
What the agent does on a BigCommerce store, how to set it up in order (connect it, install the tag, report its orders) so sales are credited to the agent.