Skip to main content
Ranked location groups helps you control which locations should fulfill orders first. Instead of manually arranging individual locations like in Shopify’s native rule, this rule automatically groups similar locations together based on their type or characteristics.

Why use ranked location groups

When you have multiple fulfillment locations, you need control over which locations should be tried first. Maybe you want warehouses to ship orders whenever possible, saving your retail stores for walk-in customers. Or perhaps you want to preserve specialty locations for orders that actually need their unique capabilities.
Shopify’s native ranked locations rule requires you to manually drag and drop each location into order. If you have 50 warehouses, you need to arrange all 50 manually. With ranked location groups, all warehouses automatically get the same priority.
Common scenarios where this rule helps:
  • Prioritize warehouses over retail stores for online orders
  • Use third-party logistics providers only when your own locations can’t fulfill
  • Keep specialty locations (like those with engraving equipment) available for orders that need them
  • Route orders to specific regions first

How location ranking works

The rule assigns priority levels to your locations. Shopify tries to fulfill orders starting with the highest priority locations, then moves to lower priorities if needed. Think of it like a preference list:
  • First choice: Try these locations first
  • Second choice: If first choice can’t fulfill, try these
  • Third choice: If neither can fulfill, try these
  • And so on…

Understanding fulfillment groups

Each different product in a customer’s cart is handled separately. If a customer orders 5 different products, each product gets its own fulfillment decision. This means:
  • A t-shirt might ship from your warehouse
  • A mug might ship from your store (if the warehouse is out of stock)
  • A custom item might ship from a specialty location
Your ranking preferences apply to each product individually based on where that specific product is available.

Types of selection

You can group locations in three ways:
Choose specific locations individually, similar to Shopify’s native rule but grouped together.
{"type": "MANUAL", "value": ["location_1", "location_2"]}
Best for: Small groups of specific locations that don’t share common characteristics

How groups work together

Combining multiple criteria

When you need locations to meet multiple requirements, list all requirements in one selector:
{"type": "TAG", "value": ["fast-shipping", "vip"]}
This finds locations that have both tags. Only locations with both “fast-shipping” and “vip” tags will match.

Alternative options

When you want to match locations that meet any of several criteria, use multiple selectors in the same group:
[
  {"type": "TYPE", "value": "WAREHOUSE"},
  {"type": "TAG", "value": ["3PL"]}
]
This matches any warehouse or any location tagged as “3PL”. A store with the “3PL” tag would match, as would any warehouse.

Priority order

Locations are checked against each group in order. Once a location matches a group, it gets that group’s ranking and isn’t checked against later groups. For example, if you have:
  1. First group: Locations tagged “vip”
  2. Second group: All warehouses
  3. Third group: All stores
A warehouse tagged “vip” gets first priority (from the first group), not second priority (from the warehouse group).

Common configurations

Warehouse and store separation

The most common setup: prioritize warehouses for online orders while keeping stores for walk-in customers.
{
  "groups": [
    [{"type": "TYPE", "value": "WAREHOUSE"}],
    [{"type": "TYPE", "value": "STORE"}]
  ]
}
All warehouses get first priority, all stores get second priority. Simple and effective for most businesses.

Using third-party logistics

When you work with external fulfillment partners but want to prioritize your own locations first.
{
  "groups": [
    [
      {"type": "TYPE", "value": "WAREHOUSE"},
      {"type": "TAG", "value": ["3PL"]}
    ],
    [{"type": "TAG", "value": ["3PL"]}],
    [{"type": "TYPE", "value": "STORE"}]
  ]
}
Wait, this won’t work as intended. The first group would match any warehouse OR any 3PL location. Here’s the correct approach:
{
  "groups": [
    [{"type": "TAG", "value": ["owned"]}],
    [{"type": "TAG", "value": ["3PL"]}],
    [{"type": "TYPE", "value": "STORE"}]
  ]
}
Tag your own warehouses as “owned” to prioritize them, then 3PL locations, then stores.

Premium service locations

Route VIP or expedited orders to locations equipped for fast fulfillment.
{
  "groups": [
    [{"type": "TAG", "value": ["fast-shipping"]}],
    [{"type": "TYPE", "value": "WAREHOUSE"}],
    [{"type": "TYPE", "value": "STORE"}]
  ]
}
Locations tagged for fast shipping get priority, regardless of whether they’re warehouses or stores.

Preserving specialty equipment

Keep locations with special capabilities available for orders that need them.
{
  "groups": [
    [{"type": "TAG", "value": ["standard"]}],
    [{"type": "TYPE", "value": "WAREHOUSE"}],
    [{"type": "TYPE", "value": "STORE"}],
    [{"type": "TAG", "value": ["engravable"]}]
  ]
}
By ranking engravable locations last, they remain available for orders that actually need engraving services.

Business customer prioritization

Separate B2B fulfillment from regular consumer orders.
{
  "groups": [
    [{"type": "TAG", "value": ["b2b"]}],
    [{"type": "TYPE", "value": "WAREHOUSE"}],
    [{"type": "TYPE", "value": "STORE"}]
  ]
}
B2B-tagged locations handle business orders first, keeping your regular fulfillment flow separate.

What happens when

When no locations match

If a location doesn’t match any of your groups, it still remains available for fulfillment but will be tried last, after all grouped locations.

When a group matches nothing

If you create a group that doesn’t match any locations (like searching for a tag you haven’t used yet), the system simply skips to the next group. No errors occur.

With multiple products

Each product in an order is evaluated separately. A customer ordering three items might have:
  • Item 1 fulfilled from a warehouse
  • Item 2 fulfilled from a store (if the warehouse doesn’t stock it)
  • Item 3 fulfilled from a different store
Your ranking preferences guide each decision, but actual fulfillment depends on where each product is available.

Working with other rules

Ranked location groups is one rule type in Shopify’s order routing system. You can use multiple instances of this rule and combine it with other rule types.

Rule evaluation order

Rules are evaluated in the priority order you set in the order routing configuration. Each rule can modify or override previous rules’ decisions.

Interaction with constraints

Fulfillment constraint rules can completely exclude locations from consideration. Rankings only apply to locations that remain eligible after constraints are applied. For example, if a constraint rule excludes all stores for orders over $500, your ranking rule won’t override that exclusion.

Multiple ranking rules

You can add multiple instances of the ranked location groups rule. Each instance can have different configurations and conditions. Later rules can override rankings from earlier rules.
When multiple ranking rules apply to the same fulfillment group, the last rule’s rankings take precedence.

Best practices

Start simple

Begin with basic type-based ranking (warehouses vs stores) and add complexity only when needed. Simple configurations are easier to understand and maintain.

Use meaningful tags

Create tags that clearly describe location capabilities or characteristics:
  • Good: next-day-capable, heavy-items, fragile-handling
  • Avoid: loc1, groupA, temp

Plan for growth

Design your tag structure to accommodate future locations. If you’re opening new warehouses, ensure your tag system can handle them without major reconfiguration.

Test thoroughly

After configuring, place test orders to verify behavior:
  1. Create orders with single items
  2. Create orders with multiple items
  3. Check which locations are selected
  4. Verify the ranking logic matches your expectations

Document your strategy

Maintain notes about why certain rankings exist. This helps when reviewing or updating configurations later, especially if multiple team members manage order routing.

Limitations

  • Maximum 10 ranking groups per configuration
  • Maximum 100 manual location IDs total across all groups
  • Maximum 10 tags per selector
  • Maximum 5 selectors per group
  • Configuration must process within 256KB memory limit
  • Cannot combine type and tag requirements in a single selector (can’t express “warehouses with express tag”)
  • Cannot use negative conditions (can’t express “locations without a specific tag”)
  • Cannot create conditional rules based on order attributes (can’t have different rankings for VIP customers)
  • Rankings apply to all fulfillment groups equally (can’t rank differently for different products)
  • Rankings don’t guarantee fulfillment from specific locations, only influence selection order
  • Actual fulfillment still depends on inventory availability
  • Cannot override hard constraints from other rules
  • Changes to configuration don’t affect orders already in fulfillment

Frequently asked questions

Shopify’s native rule requires you to manually list individual location IDs and arrange them in order. If you have 50 warehouses, you need to add all 50 IDs manually. Our rule uses dynamic grouping based on types and tags, so all warehouses automatically get the same priority without manual updates.
Locations that don’t match any group receive the lowest rank and are considered last. They remain available for fulfillment but only after all ranked locations are tried.
Yes. This rule works alongside fulfillment constraints, inventory rules, and other location rules. Rules are evaluated in the order you configure them in Shopify’s order routing settings.
The rule can theoretically handle unlimited locations since it uses grouping logic rather than listing individual locations. The practical limit depends on the complexity of your configuration and the number of unique combinations.
No. Rankings only influence the order in which locations are considered. Actual fulfillment depends on inventory availability, shipping capabilities, and other business rules.
Each item in an order is ranked independently as its own fulfillment group. This means different items might fulfill from different locations based on where they’re available, even with the same ranking preferences.