Skip to main content
Customer rules let you prioritize locations based on who is buying. When specific customer types or segments place orders, you can control which locations should be preferred for fulfillment.
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 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”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:
  1. When (condition): Which customers trigger the rule
  2. 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:
ConditionDescription
Customer B2BTargets customers with a B2B account in Shopify
Customer tagsTargets customers based on tags assigned in Shopify
For Customer tags, choose the operator:
OperatorEffect
IncludesRule triggers when customer has any of the specified tags
Does not includeRule triggers when customer does NOT have the specified tags
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

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
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.
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
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.
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
West Coast rule:
  • Condition: Customer tags includes west-coast
  • Group 1: Location tag = west-coast
  • Group 2: All other locations
Result: Customers are served from their nearest region first, reducing shipping time and cost.

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
Result: New customers (without the verified tag) prefer warehouse fulfillment for consistent quality.

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: B2B fulfillment strategy
  1. Fulfillment Constraint: B2B customers → Include only locations tagged b2b-enabled → Non-B2B locations are blocked
  2. Customer Routing Rule: B2B customers → Prefer locations tagged bulk-packaging → Bulk-capable locations are preferred among the eligible B2B locations
Result: B2B orders can only ship from B2B-enabled locations (constraint), and prefer those with bulk packaging (routing).

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

Check:
  1. Is the rule enabled?
  2. Is the customer actually a B2B customer in Shopify?
  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. Does the customer actually have the tag in Shopify? (Check Customers → Customer profile)
  2. Is the tag spelled exactly the same? (Tags are case-sensitive)
  3. Is the operator correct? (“Includes” vs “Does not include”)
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.