Skip to main content
Cart rules let you prioritize locations based on cart properties. When a cart meets specific criteria like total quantity, total amount, or contains items with specific attributes, you can control which locations should be preferred for fulfillment.
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 ConstraintsOrder Routing Rules
EffectBlocks locations entirelyRanks locations by preference
If no stock at preferred locationCheckout blockedFalls back to next priority
Configured inCharlie appShopify 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:
  1. When (condition): Which cart properties trigger the rule
  2. Then (groups): How to rank locations when triggered

Configure a cart routing rule

1

Access order routing settings

Go to Charlie → Settings → Order routing or Shopify → Settings → Shipping and delivery → Order routing.
2

Add the Cart Rules rule

Find Charlie’s Cart Rules and add it to your routing strategy.
3

Configure the condition (When)

Set up which cart properties trigger this rule:
ConditionDescription
Total cart quantityTotal number of items in the cart
Total cart amountTotal value of the cart in your store currency
Line item has attributeItems with specific custom attributes
Choose the appropriate operator and enter the value.
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:
Selector typeDescription
Specific locationsChoose individual locations manually
Location typeAll Warehouses or all Stores
Location tagLocations with specific tags
Locations that don’t match any group will be ranked last.
5

Enable the rule

Toggle the rule to Enabled when you’re ready to apply it to live orders.

Condition types

Triggers based on the total number of items in the cart.Operators available:
OperatorDescription
EqualCart has exactly this many items
Not EqualCart does not have exactly this many items
Greater ThanCart has more than this many items
Less ThanCart has fewer than this many items
Greater Than Or EqualCart has this many or more items
Less Than Or EqualCart has this many or fewer items
Best for:
  • 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.
1

Create the rule

  • Condition: Total cart quantity
  • Operator: Greater Than
  • Value: 10
2

Configure groups (Then)

  • Group 1: Location type = Warehouse
  • Group 2: Location type = Store
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.
1

Tag secure locations

Add the tag high-value-certified to locations with secure handling processes.
2

Create the rule

  • Condition: Total cart amount
  • Operator: Greater Than
  • Value: 500
3

Configure groups (Then)

  • Group 1: Location tag = high-value-certified
  • Group 2: Location type = Warehouse
  • Group 3: Location type = Store
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.
1

Tag capable stores

Add the tag gift-wrap-capable to stores with gift wrapping services.
2

Create the rule

  • Condition: Line item has attribute
  • Operator: Equal
  • Attribute key: gift_wrap
  • Attribute value: true
3

Configure groups (Then)

  • Group 1: Location tag = gift-wrap-capable
  • Group 2: Location type = Store
  • Group 3: Location type = Warehouse
Result: Gift-wrapped items prefer stores with gift services. Other items in the same cart follow default routing.

Small orders prefer local stores

A retailer wants single-item orders to prefer nearby stores for faster delivery.
1

Create the rule

  • Condition: Total cart quantity
  • Operator: Equal
  • Value: 1
2

Configure groups (Then)

  • Group 1: Location type = Store
  • Group 2: Location type = Warehouse
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 typePurpose
ConstraintBlock locations that absolutely cannot fulfill
Routing rulePrioritize among remaining eligible locations
Example: High-value order strategy
  1. Fulfillment Constraint: Orders > €1000 → Include only locations tagged insured → Uninsured locations are blocked
  2. Cart Routing Rule: Orders > €500 → Prefer locations tagged secure-packaging → Secure locations are preferred among eligible locations
Result: Very high-value orders (>€1000) can only ship from insured locations. High-value orders (>€500) prefer secure packaging locations among those eligible.

Combining with other routing rules

Cart rules work well with other routing rules:
CombinationUse case
Cart + Inventory RulesLarge orders prefer warehouses with most stock
Cart + Customer RulesVIP customers with large orders get premium treatment
Cart + Capacity RulesBulk orders avoid locations at capacity
Example setup:
  1. Cart Rules: Orders > 10 items → Prefer warehouses
  2. Inventory Rules: Among warehouses, prefer those with most stock
  3. Capacity Rules: Deprioritize locations near capacity
Result: Large orders go to the warehouse with the most stock that isn’t overloaded.

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

Check:
  1. Is the rule enabled?
  2. Does the cart actually meet the condition? (Check quantity/amount/attributes)
  3. Does the preferred location have stock?
  4. Are there constraint rules blocking the location?
  5. Is another routing rule with higher priority overriding this one?
Check:
  1. Is the attribute key spelled exactly right? (Case-sensitive)
  2. Is the attribute actually being set on the line item? Check the cart data in your theme.
  3. For “Equal” operator, does the value match exactly?
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.
Check your operator:
  • Greater Than 10 triggers at 11+ items (not 10)
  • Greater Than Or Equal 10 triggers at 10+ items
Use the right operator for your threshold.