Skip to main content
You can create multiple merchandising rules targeting the same collection and sort order combination. This enables sophisticated merchandising strategies where different rules apply based on contextual conditions or time windows.

First-match-wins evaluation

When multiple rules target the same collection/sort combination, the system evaluates them in database order (typically by creation date). The first rule whose contextual conditions match the current session context is applied. Rules without contextual conditions always match and act as fallback rules. Example scenario:
Rule 1: US visitors → Show US-specific merchandising
Rule 2: UK visitors → Show UK-specific merchandising  
Rule 3: No conditions → Default merchandising for all other visitors
When a visitor from the US browses the collection, Rule 1 matches first and is applied. UK visitors see Rule 2, and all other visitors see Rule 3.
Rules are evaluated in the order they were created. If you need to change rule precedence, you may need to recreate rules in the desired order.

Overlap detection validation

To prevent conflicting merchandising rules, the system validates that contextual conditions don’t overlap when creating or updating rules. This ensures that only one rule can match a given visitor at any time. What constitutes overlapping conditions: The system analyzes the contextual conditions of all existing rules for the same collection/sort combination and determines if the new rule’s conditions could match the same visitor as an existing rule. Non-overlapping conditions (allowed):
  • country == US and country == CA (different equality values)
  • country in [US, CA] and country in [UK, DE] (no common values)
  • source == klaviyo and source == google (different marketing sources)
Overlapping conditions (blocked):
  • country == US and country == US (identical conditions)
  • country in [US, CA] and country in [CA, UK] (common value: CA)
  • country == US and country in [US, CA] (US is in the list)
Validation behavior: When you attempt to create or update a rule with overlapping conditions, you’ll see an error message:
The contextual conditions overlap with an existing rule "[Rule Name]" 
for this collection and sort order.
This validation ensures your merchandising strategy remains predictable and prevents ambiguous situations where multiple rules could apply to the same visitor.
The overlap detection uses heuristic analysis and may not catch all complex overlapping scenarios with deeply nested OR conditions. The validation provides best-effort protection while allowing legitimate non-overlapping rules to coexist.

See also