Max IT solutionsShopify App Store

Shopify Order Routing: How Shopify Picks the Location

Updated , first published · 4 min read

Shopify order routing decides which of your locations fulfills an online order. It runs a list of rules from top to bottom, and by default that list is: minimize split fulfillments, stay within the destination market, then ship from the closest location. The result is that an order goes to the nearest location in the customer’s market that has everything in stock. Routing only applies when you have two or more locations that fulfill online orders, and you can reorder, add or remove rules under Settings > Shipping and delivery.

The rules and the example come from Shopify’s Help Center pages on understanding order routing, read on October 23, 2026, and setting up order routing, read on October 31, 2026.

The default rules

Each rule works on the locations the previous rule left, so the order of the list matters.

  1. Minimize split fulfillments. Locations that have every item in stock come first. If none has everything, the rule prefers the locations that make the fewest packages.
  2. Stay within the destination market. Locations in the same market as the shipping address are preferred.
  3. Ship from the closest location. The location nearest the shipping address wins, measured in a straight line, which can differ from driving distance. Shopify advises applying this rule last, where it breaks ties left by the others. Locations with unverified addresses are skipped by this rule.

Two more rules can be added, and both can be used more than once:

Rule What it does Example use
Use ranked locations Prioritizes groups of locations in the order you set Warehouses before retail stores
Use location metafields Prioritizes by a true/false or number metafield on each location A has_capacity flag you switch off when a warehouse is overloaded

A worked example

Shopify’s own example: a customer orders with a New Jersey shipping address, and the store has four locations, New York, Vancouver, Miami and Texas.

Step Rule Locations left Why
1 Minimize split fulfillments New York, Vancouver, Miami Texas doesn’t have every item
2 Stay within the destination market New York, Miami Vancouver is outside the US market
3 Ship from closest location New York Closer to New Jersey than Miami

The order is assigned to New York. Now change one fact: New York is missing one item. Step 1 leaves Vancouver and Miami, step 2 removes Vancouver, and Miami gets the order as a single package, even though New York is closer. The default list prefers one parcel from further away to two parcels from nearby. Shopify advises keeping Ship from the closest location last; moving it higher would favor nearby locations even when that splits the order into more packages.

Variations worth considering, in our view:

  • Retail stores that also ship online: add Use ranked locations near the top with your warehouses in the first group, so store shelves aren’t emptied by web orders unless the warehouse can’t fill them.
  • A warehouse that falls behind in peak season: add a location metafield such as has_capacity and a Use location metafields rule, then switch the flag off for that warehouse while it catches up.
  • Cross-border stock: keep Stay within the destination market if duties or delivery times make cross-border fulfillment expensive; drop it if one central warehouse ships everywhere.

Change the rules

Go to Settings > Shipping and delivery, click Order routing in the Shipping section, then the arrow icon. From there:

  • Add a rule: click Add rule, select it, Save.
  • Edit a rule: click the pencil icon, change it, Done, then Save.
  • Reorder: drag a rule by its handle, then Save.
  • Remove: click the trash icon, then Save.

Before relying on routing, check two settings. A location takes part only if Fulfill online orders from this location is on; otherwise it’s excluded. Routing also doesn’t prevent overselling; it assigns orders to locations without holding stock. Inventory across several locations is covered in multi-warehouse inventory.

Custom rules

Rules beyond the five built-in ones can be written as custom location rules, but Shopify lists that extensibility as early access, limited to enrolled Partners; Shopify Plus merchants have to join the Partners program to deploy custom location rules. In our view the built-in rules, plus ranked locations and a metafield, cover the common cases. What happens after an order is routed, from automatic fulfillment to fulfillment services, is in automated order fulfillment. The shipping and returns hub has the related guides.

FAQ

How does Shopify decide which location fulfills an order? Shopify applies your order routing rules from top to bottom. By default it prefers locations that can ship the whole order, then locations in the customer’s market, then the closest one.

Can I make Shopify always ship from my warehouse first? Add the Use ranked locations rule and put your warehouse in the first location group. Locations in that group are prioritized over the others.

Does order routing work with one location? Order routing needs two or more fulfillment locations. With one, the rules have no effect.

Can I write my own routing rules? Custom location rules are in early access for enrolled Partners, and Plus merchants need to join the Partners program to deploy them. The five built-in rules are available to every store with multiple locations.