Setting up location metafields for order routing

You can set up your order routing rules using location metafields to prioritize locations based on the values that you configure in your location metafields.

You can use a boolean or single numeric type location metafield. For example, if you define a boolean location metafield named has_capacity, then you can prioritize locations with capacity to fulfill your orders.

Before you start

You need to complete the following tasks before you can create an order routing rule with a location metafield:

Supported metafield definition types

You can use the following metafield definition types for location metafields:

  • Integer (single numeric)
  • Decimal (single numeric)
  • True or false

Add a location metafield to your order routing rule

After you create your metafield, you can add an order routing rule using your location metafield.

Steps:

  1. From your Shopify admin, go to Settings > Shipping and delivery.

  2. In the Order routing section, click the icon.

  3. Click Add rule.

  4. Click Use location metafield.

  5. From the Metafield drop-down menu, select a location metafield that you want to use for your order routing rule.

  6. Select the metafield values.

  7. Click Done

  8. Click Save.

Can’t find the answers you’re looking for? We’re here to help.