See all services → Shopify Plus Partner
API Developer

Resolve Market Metafield Ties by Lowest Market Handle

Where two equally specific markets set the same metafield, Shopify now returns the value from the market with the lowest handle instead of the one updated most recently. The rule applies on every API version.

Executive summary

What changed

Market metafields resolve against the buyer’s most specific matching market, and specificity is usually unambiguous: a market scoped to France beats one scoped to the EU. The tie case is where it got interesting. If a buyer matched two markets of equal specificity that both set the same metafield key, Shopify chose whichever had been updated most recently.

That rule is now alphabetical ordering on the market handle, and the lowest handle wins. It applies to the Storefront API, Liquid, and the Function APIs on every API version, with no version gate and no opt in. If your markets never overlap, nothing changes for you.

Worth tracking alongside it: a separate change in Storefront API 2027-01 makes Market.metafields match requested keys in any case, as Market.metafield already does. The tie-break change is live now, while case matching waits for the version bump.

Why it matters

This fixes a class of bug rather than adding capability. Under the old rule, the value a buyer saw depended on edit history. A merchandiser updating an unrelated field on one market could silently flip which market’s value a tied buyer resolved to, with no deploy and no code change.

Handle ordering is boring, which is the point. It is stable, readable off the Markets settings page, and reproducible in staging. It is also arbitrary. Nothing says the alphabetically first handle holds the commercially correct value, so if a tie resolves to the wrong answer, stop depending on the tie: set the metafield on only one overlapping market, or make one market genuinely more specific.

For most Plus stores the exposure is narrow. Two equally specific markets covering one buyer usually signals a market structure that grew by accretion, so a tie is worth treating as a configuration smell and a prompt to revisit the wider internationalization setup.

Role-specific impact

Use-case example

Real-world scenario

A Plus merchant selling across the EU runs a pan-EU market with the handle eu-general and a second, equally specific market with the handle eu-b2b-overflow, both setting a free shipping threshold metafield. A Belgian buyer matches both. Under the old rule the cart drawer threshold tracked whichever market was edited last, swinging between 75 EUR and 150 EUR across a quarter with no deploys, and support logged 14 tickets about a threshold that changed mid-session. Under handle ordering, eu-b2b-overflow wins every time: still the wrong value, but a stable one, and the real fix is to clear the metafield from the overflow market.

Implementation checklist

  1. List your markets with their handles and flag any that share geographic specificity and could match the same buyer.
  2. For each flagged set, list the metafield keys set on more than one of those markets.
  3. Work out which handle sorts lowest and confirm its value is the one buyers should see.
  4. Where it is not, remove the metafield from the other markets rather than renaming handles to game the sort order.
  5. Re-test affected storefront surfaces per region: cart, product pages, and any logic branching on the metafield value.

FAQ

Q: Can I pin an API version to keep the previous tie-break behaviour?

A: No. It applies to the Storefront API, Liquid, and the Function APIs on every version, so there is no version to sit on. Audit the affected queries instead of planning to defer.

Q: How do I tell whether my store is affected at all?

A: Only if a buyer can match two or more equally specific markets that both set the same metafield key. If your markets are disjoint, or only one sets the key, resolution never reaches the tie-break.

Resources

Market object in the Storefront API

Need guidance? Talk to Makro.