iAdvize
Back

Declare the markets of an Adobe Commerce store in its connector

Added

An Adobe Commerce connector had one set of request headers, so the agent asked Adobe for one market's catalog whatever page the shopper was on. A store with one store view per market got the same prices and products everywhere.

A connector can now declare markets. A market is a code, the addresses of its pages (optional) and the request headers it replaces or adds, a store view code for example. For each message sent from the panel on your storefront, the agent picks one market and sends its headers to Adobe:

  1. the market whose code the page declares with iadvize('set', { market: { code } });
  2. else the market whose address matches the page best (same host, path matched by whole segments, the longest path wins);
  3. else none, and the connector's own headers are sent as before.

Set them in the Markets card of the connector's page. The card is under Request headers, and on the form that installs a new Adobe Commerce connector. Choose Add a market, give it its code, its page addresses (one per line) and its headers, then Save changes. Saving the page changes the markets only when you changed the card. The REST API and the MCP server set the same list: send markets when you update or install an Adobe Commerce connector. Other connector types refuse the field.

The card reports mistakes when you save. A missing or malformed code, a code or an address used twice, an address that is not a host and a path, a header with no name or no value, a header name that is invalid or reserved (Authorization, Cookie), an invalid header value: the message shows under its field, the first faulty field takes the focus and nothing is saved. A list our servers refuse, because a market header has the name of one of the connector's secret headers for example, shows its reason at the bottom of the card.

On a Shopify connector, the card has nothing to set. It says that markets are followed automatically from the country your storefront displays, and links to the guide for a storefront that doesn't expose its country.

What to know before you use it:

  • Any visitor can select a declared market, from the browser. Never declare one with private prices or a private catalog (B2B, pre-production).
  • A market's header values are never secret: the dashboard, the API and the MCP server show them in clear.
  • Matching by address needs the site's page reading switched on and the page's host in the authorized domains. A declared code needs neither.
  • The hosted page and the Playground use the connector's own headers.
  • Links don't follow the market. Product and cart links are still built from the site's own address and the connector's URL templates, so on a store with one host or one path per market, prices follow the market but links can point to the site's default address.
  • The connection test, the health check and the tool refresh use the connector's own headers only. A wrong market header doesn't fail a check: it shows as an empty or wrong catalog for that market's shoppers.

This has not been checked on a live Adobe Commerce store yet. Test each market on your storefront before you rely on it.

A connector with no declared market behaves as before.

Resources

The Markets card on the page of an Adobe Commerce connector, with two markets. The first has the code fr_fr, the page address example.com/fr/ and the header X-Store-View-Code set to fr_fr. The second has the code de_de, the page address de.example.com and the same header set to de_de. An Add a market button sits under them.