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
| Fulfillment Constraints | Order Routing Rules | |
|---|---|---|
| Effect | Blocks locations entirely | Ranks locations by preference |
| If no stock at preferred location | Checkout blocked | Falls back to next priority |
| Configured in | Charlie app | Shopify Order Routing settings |
| Use case | ”B2B orders can ONLY ship from warehouses" | "Prefer warehouse for B2B, but allow stores as backup” |
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
Access order routing settings
Go to Charlie → Settings → Order routing or Shopify → Settings → Shipping and delivery → Order routing.
Configure the condition (When)
Set up which customers trigger this rule:
For Customer tags, choose the operator:
| Condition | Description |
|---|---|
| Customer B2B | Targets customers with a B2B account in Shopify |
| Customer tags | Targets customers based on tags assigned in Shopify |
| Operator | Effect |
|---|---|
| Includes | Rule triggers when customer has any of the specified tags |
| Does not include | Rule triggers when customer does NOT have the specified tags |
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:
| Selector type | Description |
|---|---|
| Specific locations | Choose individual locations manually |
| Location type | All Warehouses or all Stores |
| Location tag | Locations with specific tags |
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.
Result: B2B orders prefer warehouses. If the warehouse is out of stock, stores can still fulfill. No checkout blocking.
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.
Result: VIP customers’ orders prefer flagship stores. If out of stock, warehouses are tried, then other stores.
Regional customers prefer local fulfillment
A retailer wants customers in specific regions to be served from nearby locations first.Tag customers by region
Use Shopify Flow to automatically tag customers based on their shipping address (e.g.,
east-coast, west-coast).New customers prefer warehouse (quality control)
A retailer wants orders from new customers to be fulfilled from warehouses where quality control is more consistent.Tag verified customers
Use Shopify Flow to add a
verified tag after a customer’s first successful order.verified tag) prefer warehouse fulfillment for consistent quality.
Combining with constraints
For maximum control, combine routing rules with constraints:| Rule type | Purpose |
|---|---|
| Constraint | Block locations that absolutely cannot fulfill |
| Routing rule | Prioritize among remaining eligible locations |
-
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?
Customer tags rule not triggering
Customer tags rule not triggering
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.