Shopify Functions
Shopify Order Routing Functions
Custom Shopify order routing rules built as location rule Functions: rank fulfillment locations by distance, capacity, product or customer type.
With more than one warehouse or store, every order raises a question: which location should ship it? Shopify’s built-in order routing covers the basics, like shipping from the closest location or following a fixed priority list. When your rules are more specific than that, a custom location rule Function makes the decision for you.
Rank locations by your own rules
A location rule looks at the items in an order and ranks the locations that could fulfill them. The ranking can take into account the delivery address, the products, whether it is a business order, and data you keep on each location. For example, you could:
- ship from the location closest to the customer
- keep perishable items to locations with cold storage
- route business orders to your wholesale warehouse
- move orders elsewhere once a location reaches its daily capacity
On Shopify Plus, by request
Custom location rules are a Shopify Plus feature, and Shopify enables the API by request. We help with that request, then build and test the rule against your real orders and locations before it goes live.
Routing and constraints work together
Routing picks the best location from the ones allowed. Fulfillment constraints set the hard limits, like items that must ship together. Most multi-location stores need both.
What we build
Distance and speed
Prefer the location closest to the customer, or the one that can ship fastest.
Capacity rules
Move orders elsewhere once a location reaches its daily capacity.
Product-based routing
Send perishable, age-restricted or oversized items to the locations set up for them.
B2B routing
Route business orders to the warehouses that handle wholesale.
Questions, answered
What is an order routing location rule?
It is a custom rule in Shopify's order routing settings. At checkout, Shopify runs it to rank the locations that could fulfill each item, and uses that ranking to decide where the order ships from.
Who can use custom order routing rules?
Shopify Plus stores, by request. Shopify enables the Order Routing Location Rule API on request for Plus merchants. We help with the request, then build and test the rule once access is granted.
How does it work with Shopify's built-in routing?
Your custom rule is added to your order routing settings alongside Shopify's own rules. We test the combined result on real orders and locations before it goes live.
Can routing prevent split shipments?
Routing ranks locations but does not forbid any. To make items ship together, or only from certain locations, pair it with fulfillment constraints.
Related services
Fulfillment Constraints
Keep items shipping together and restrict which locations can fulfill them.
Learn moreShopify Plus Development
A Shopify Plus agency for bespoke builds, custom checkout, Functions and upgrades to Plus.
Learn moreShopify Functions Development
Custom back-end logic for discounts, payments, delivery and validation, built on Shopify Functions.
Learn moreReady to build a store worth talking about?
Tell us where your store is today and where you want it to go. We reply within two working days with a clear next step.