Unlike fulfillment constraints which block locations, customer routing rules prioritize locations. If the preferred location is out of stock, Shopify automatically falls back to the next available location.
Constraints vs Routing
How customer routing rules work
A customer routing rule has two parts:- When (condition): Which customers trigger the rule
- Then (groups): How to rank locations when triggered
Configure a customer routing rule
1
Access order routing settings
Go to Charlie → Settings → Order routing or Shopify → Settings → Shipping and delivery → Order routing.
2
Add the Customer Rules rule
Find Charlie’s Customer Rules and add it to your routing strategy.
3
Configure the condition (When)
Set up which customers trigger this rule:
For Customer tags, choose the operator:
4
Configure location groups (Then)
Create ranked groups of locations. Group 1 has highest priority, Group 2 is the fallback, and so on.For each group, click Add selector and choose how to select locations:
5
Enable the rule
Toggle the rule to Enabled when you’re ready to apply it to live orders.
Condition types
- Customer B2B
Automatically targets customers who have a B2B account in Shopify.Best for:
- Preferring warehouses for wholesale orders
- Routing B2B to locations with bulk packaging
- Separating B2B from B2C fulfillment flows
This condition requires Shopify B2B to be enabled on your store.
Examples
B2B orders prefer warehouse
A wholesaler wants B2B orders to be fulfilled from warehouses when possible, with stores as backup.1
Create the rule
- Condition: Customer B2B
- Operator: Is B2B = true
2
Configure groups (Then)
- Group 1: Location type = Warehouse
- Group 2: Location type = Store
VIP customers prefer flagship stores
A luxury retailer wants VIP customers to receive orders from flagship stores with premium service, but allows other locations as backup.1
Tag VIP customers
In Shopify Admin, add the tag
vip to your VIP customers.2
Tag flagship stores
Add the tag
flagship to your flagship store locations.3
Create the rule
- Condition: Customer tags
- Operator: Includes
- Value:
vip
4
Configure groups (Then)
- Group 1: Location tag =
flagship - Group 2: Location type = Warehouse
- Group 3: Location type = Store
Regional customers prefer local fulfillment
A retailer wants customers in specific regions to be served from nearby locations first.1
Tag customers by region
Use Shopify Flow to automatically tag customers based on their shipping address (e.g.,
east-coast, west-coast).2
Tag locations by region
Add regional tags to your locations (e.g.,
east-coast, west-coast).3
Create rules for each region
East Coast rule:
- Condition: Customer tags includes
east-coast - Group 1: Location tag =
east-coast - Group 2: All other locations
- Condition: Customer tags includes
west-coast - Group 1: Location tag =
west-coast - Group 2: All other locations
New customers prefer warehouse (quality control)
A retailer wants orders from new customers to be fulfilled from warehouses where quality control is more consistent.1
Tag verified customers
Use Shopify Flow to add a
verified tag after a customer’s first successful order.2
Create the rule
- Condition: Customer tags
- Operator: Does not include
- Value:
verified
3
Configure groups (Then)
- Group 1: Location type = Warehouse
- Group 2: Location type = Store
verified tag) prefer warehouse fulfillment for consistent quality.
Combining with constraints
For maximum control, combine routing rules with constraints:
Example: B2B fulfillment strategy
-
Fulfillment Constraint: B2B customers → Include only locations tagged
b2b-enabled→ Non-B2B locations are blocked -
Customer Routing Rule: B2B customers → Prefer locations tagged
bulk-packaging→ Bulk-capable locations are preferred among the eligible B2B locations
Best practices
Use routing for preferences
Use routing rules when you have preferences but can accept alternatives. Reserve constraints for hard requirements.
Automate customer tagging
Use Shopify Flow to automatically tag customers based on behavior, purchase history, or location.
Combine with inventory rules
Add Inventory Rules after Customer Rules to prefer locations with more stock among the prioritized group.
Test with different customer types
Place test orders as different customer types to verify routing behavior.
Troubleshooting
B2B orders not routing to expected locations
B2B orders not routing to expected locations
Check:
- Is the rule enabled?
- Is the customer actually a B2B customer in Shopify?
- Does the preferred location have stock?
- Are there constraint rules blocking the location?
- Is another routing rule with higher priority overriding this one?
Wrong group being selected
Wrong group being selected
Remember: Shopify tries groups in order and uses the first one with available stock. If Group 1 is out of stock, it moves to Group 2 automatically.Verify stock levels at each location for the products in question.
Related
Customer Constraints
Block locations based on customers (hard rules)
Ranked Location Groups
Create default location priorities
Cart Rules
Prioritize by cart properties
Location Tags
Set up tags for flexible grouping