Order routing

Order routing automatically routes orders to fulfillment locations based on a set of routing rules. You can use the default Shopify settings or further refine your order routing based on your business needs.

Order routing is available in Shopify after you set up 2 or more activelocations. It uses rules to determine the locations to use to fulfill each item in a customer order. By adding, removing, and rearranging rules, you can determine how locations are prioritized.

How order routing works

Order routing works by applying a series of rules to an order and then prioritizing locations based on the results. The locations with the highest priority ranking are selected to fulfill the order.

By default, rules are configured to optimize for fulfillment from the closest location within the destination market that has all of the items in the order in stock. There’s no need to modify your order routing settings if the default settings work for your business.

Routing rules

The following rules are applied by default to all new Shopify stores with 2 or more locations.

Minimize split fulfillments

Optimize for fulfilling the order in the fewest number of packages. Locations that have all items in stock are prioritized over those that don’t.

When none of your locations have all of the items in stock, this rule will prioritize the locations that result in the fewest number of packages.

Stay within the destination market

Locations that are in the same market as the shipping address will be prioritized over those that aren’t.Learn more about Shopify Markets

Ship from closest location

The location closest to the shipping address (measured in a straight line using the Haversine formula) will be prioritized.

TheShip from closest locationrule functions as a tiebreaker and will always select the location closest to the destination address. For best results, this rule should always be the last rule applied.

If there are two locations that share the same address, then the older of the two (based on the date they were added to Shopify) will be prioritized.

Use ranked locations

Prioritizes locations using a group-based ranking that you define for your business.

For example, if you want your warehouses to be prioritized over your storefront locations, then create a location group for all of your warehouses and another location group for all of your storefronts. Locations in the first group will be prioritized over locations in the second group.

Locations in the same location group share the same rank. For example, all of the locations in the topmost location group share a ranking of 1, whereas all of the locations in the second location group share a ranking of 2.

Example order routing

Rules run from top to bottom, and each rule is applied to the results of the previous rule. The final result determines which locations fulfill the order. The following is an example of how order routing rules are applied:

First, a customer places an order with a New Jersey shipping address. The store has 4 locations that can potentially fulfill the order: New York, Vancouver, Miami, and Texas.

The order routing rules are configured to be applied accordingly:

  1. TheMinimize split fulfillmentsrule is applied. New York, Vancouver, and Miami have all of the items in stock, so they continue to the next rule. Texas does not.
  2. TheStay within the destination marketrule is applied. The order is being shipped to an address in the United States, so New York and Miami continue to the next rule. Vancouver does not.
  3. TheChoose closest locationrule is applied. New York is closer to New Jersey than Miami, so New York is prioritized and Miami isn't.
  4. The order is assigned to the New York location.

Managing routing rules

You can update your routing rules from theOrder routingpage in Shopify.

Steps

  1. From your Shopify admin, go toSettings>Shipping and delivery.
  2. In theOrder routingsection, clickManage. You can add, remove, or rearrange order routing rules, or change the settings on existing rules by doing any of the following actions:
    • To add a routing rule to your setup, clickAdd rule, and then select the rule that you want to add. ClickManageto select any rule options, and then clickSaveto add the rule.
  3. ClickSave.
    • To remove a routing rule, click thexicon.
    • To rearrange the routing rule, click and drag the icon on the rule.
    • To change the settings of an existing location rule with options, clickManageon the rule.
  4. ClickSaveto apply the settings to new orders.

Common configurations

The following are suggested configurations for order routing rules. You can follow them to set up rules that meet your store's needs.

Always ship from the closest location

If you prefer shipments to always ship from the closest location, even if it means splitting up the order into multiple packages, then use theShip from closest location规则的。

Steps:

  1. From your Shopify admin, go toSettings>Shipping and delivery.
  2. In Order Routing, clickManage.
  3. ClickAdd rule.
  4. ClickShip from closest location. If this rule is greyed out, then it means that it’s already active in your configuration.
  5. Click thex图标在配置到任何其他规则only theShip from closest locationrule remains.
  6. ClickSave.

Prioritize your closest warehouse location

If you have some locations that should ship orders first, like a third-party logistics service or warehouse, then rank those locations above your non-warehouse locations.

Steps:

  1. From your Shopify admin, go toSettings>Shipping and delivery.
  2. In Order Routing, clickManage.
  3. ClickAdd rule.
  4. ClickUse rannked locations.
  5. Click theDrag icon ⠀to move the rule to the top of the list.
  6. On the rule, clickManage.
  7. Drag warehouse locations to the topmost location group. Leave any locations that shouldn't be prioritized in the bottom location group.
  8. ClickDone.
  9. If you have multiple warehouse locations, then add theShip from closest locationrule at the end to break any ties.
  10. ClickSave.

Frequently asked questions

Is order routing the right place to define overselling behavior?

No, overselling behavior remains the same and it’s configured at the product level. Learn more abouttracking inventory

Can I set up restrictions to avoid shipping to certain locations?

Not using order routing, but you can set up shipping restrictions by setting upshipping profiles.

Can I combine rules in any way I want?

Yes, you can add, remove, and rearrange rules as you need them.

Will I lose sales if I don't set up the right configuration?

No, order routing won't prevent you from selling your products. If the configuration isn't optimal, then orders might be shipped in more boxes or be assigned to a location that is further away.

Will my order routing configuration overwrite my current shipping profiles?

No, shipping profile configuration isn't affected by order routing.

Ready to start selling with Shopify?Try it free