Unlike fulfillment constraints which block locations, cart 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 | ”Orders > €500 can ONLY ship from secure warehouse" | "Prefer secure warehouse for high-value orders, but allow stores as backup” |
How cart routing rules work
A cart routing rule has two parts:- When (condition): Which cart properties trigger the rule
- Then (groups): How to rank locations when triggered
Configure a cart 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 cart properties trigger this rule:
Choose the appropriate operator and enter the value.
| Condition | Description |
|---|---|
| Total cart quantity | Total number of items in the cart |
| Total cart amount | Total value of the cart in your store currency |
| Line item has attribute | Items with specific custom attributes |
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
- Total cart quantity
- Total cart amount
- Line item has attribute
Triggers based on the total number of items in the cart.Operators available:
Best for:
| Operator | Description |
|---|---|
| Equal | Cart has exactly this many items |
| Not Equal | Cart does not have exactly this many items |
| Greater Than | Cart has more than this many items |
| Less Than | Cart has fewer than this many items |
| Greater Than Or Equal | Cart has this many or more items |
| Less Than Or Equal | Cart has this many or fewer items |
- Routing bulk orders to warehouses
- Preferring stores for single-item orders
Examples
Large orders prefer warehouse
A retailer wants orders with more than 10 items to prefer warehouse fulfillment for efficient bulk packing.
Result: Large orders prefer warehouses. If the warehouse is out of stock, stores can still fulfill. No checkout blocking.
High-value orders prefer secure locations
A jewelry retailer wants orders over €500 to prefer locations with secure handling and insurance.
Result: High-value orders prefer certified locations. If out of stock, other warehouses are tried, then stores.
Gift-wrapped items prefer flagship stores
A fashion brand offers gift wrapping, and wants these items to prefer stores with premium packaging services.Create the rule
- Condition: Line item has attribute
- Operator: Equal
- Attribute key:
gift_wrap - Attribute value:
true
Small orders prefer local stores
A retailer wants single-item orders to prefer nearby stores for faster delivery.
Result: Single-item orders prefer stores (potentially closer to the customer). Warehouses are the backup.
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: Orders > €1000 → Include only locations tagged
insured→ Uninsured locations are blocked -
Cart Routing Rule: Orders > €500 → Prefer locations tagged
secure-packaging→ Secure locations are preferred among eligible locations
Combining with other routing rules
Cart rules work well with other routing rules:| Combination | Use case |
|---|---|
| Cart + Inventory Rules | Large orders prefer warehouses with most stock |
| Cart + Customer Rules | VIP customers with large orders get premium treatment |
| Cart + Capacity Rules | Bulk orders avoid locations at capacity |
- Cart Rules: Orders > 10 items → Prefer warehouses
- Inventory Rules: Among warehouses, prefer those with most stock
- Capacity Rules: Deprioritize locations near capacity
Best practices
Use quantity for operational efficiency
Route bulk orders to locations equipped for efficient multi-item packing.
Use amount for risk management
Prefer secure locations for high-value orders without blocking checkout.
Use attributes for special handling
Route items with special requirements to capable locations.
Combine with inventory rules
Add Inventory Rules to prefer locations with stock among the prioritized group.
Troubleshooting
Orders not routing to expected locations
Orders not routing to expected locations
Check:
- Is the rule enabled?
- Does the cart actually meet the condition? (Check quantity/amount/attributes)
- Does the preferred location have stock?
- Are there constraint rules blocking the location?
- Is another routing rule with higher priority overriding this one?
Line item attribute rule not triggering
Line item attribute rule not triggering
Check:
- Is the attribute key spelled exactly right? (Case-sensitive)
- Is the attribute actually being set on the line item? Check the cart data in your theme.
- For “Equal” operator, does the value match exactly?
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.
Threshold not working as expected
Threshold not working as expected
Check your operator:
- Greater Than 10 triggers at 11+ items (not 10)
- Greater Than Or Equal 10 triggers at 10+ items