Get a free Shopify store audit

Shopify's Order Routing Beta: Caching and Tie-Break Rules

Shopify's Order Routing Location Rule Function API caches results for 15 minutes and resolves multi-function ties in a specific order. Here's how.

Shopify's Order Routing Beta: Caching and Tie-Break Rules — ASSOSIATIX Journal

Shopify’s Order Routing Location Rule Function API lets a Shopify Plus merchant write a custom Shopify Function that decides which warehouse or store fulfills each line item in a cart — split shipments across locations, deprioritize a warehouse that’s hit its daily capacity, or rank locations by a product metafield. On November 5, 2026, Shopify’s developer changelog added that these functions can now rank locations across multiple fulfillment groups in the unstable Function APIs, extending a beta that already has some mechanics worth understanding before you build against it.

A Plus-Only Beta for a Specific Problem

The API is only available by request for merchants on a Shopify Plus plan, and deploying a custom app with your own location rules additionally requires enrollment in Shopify’s Partners program. It isn’t a general webhook replacement — its function target is scoped to the checkout flow, and it’s also used for draft orders, order edits, order imports, and can be re-triggered from the Shopify admin. This is infrastructure for integrators building deliberate multi-location fulfillment logic, not a drop-in for every store with more than one warehouse.

The 15-Minute Cache Window

Shopify runs the ranking function when delivery-related cart data changes — cart lines or the delivery address, specifically. If Shopify already has a result for that same data from the last 15 minutes, it reuses the cached result instead of re-running the function. For anything that depends on fast-changing inputs — say, a metafield-based capacity flag updated mid-day — that cache window is the first thing to account for: a function change doesn’t take effect against a given cart’s data until that data itself changes again, or the 15 minutes elapse.

When More Than One Function Ranks the Same Group

Rank values are non-negative integers, lower tried first, and gaps are allowed — 0, 5, 10 ranks the same as 0, 1, 2. Locations a function omits from its ranking are placed last. When only one location-rule function is active, that’s the whole story. When more than one is active on the same fulfillment group, Shopify doesn’t blend or average their outputs. It sorts the functions by their locationRule priority, takes the first function’s ranking as authoritative, and only consults the second function’s ranking to break ties the first function left unresolved — continuing down the priority order only as far as ties persist. Get the priority order wrong and your tie-breaker function can end up doing all the work, or none of it.

What the November 5 Update Adds

The changelog entry describes the new capability only as letting a function “rank locations across multiple fulfillment groups” in the unstable Function APIs — an extension of the per-group ranking model above, rather than a replacement for it. The exact API shape for that cross-group ranking isn’t detailed in Shopify’s published reference yet, so integrators evaluating it should treat the per-group caching and tie-break behavior as the stable foundation and watch the changelog for the API surface that follows.

Sources

Tell us what you're building.

Share a few details and we'll reply within 1–2 business days with questions, a scope and a quote.