Skip to main content
Sort Orders

Steps

  1. Go to Sort Orders and click Create.
  2. Add simple rules (like newest or price) or combine a few signals.
  3. Give it a clear name so your team knows when to use it.
  4. Save your sort order.

Sorting Attribute Types

Simple Attributes

Sort by product attributes like price, title, or sales metrics. These are the most common sorting rules.

Priority Rules

Boost or demote products matching specific conditions. Priority rules cluster matching products at the top or bottom of results based on their position in the sort order:
  • First position: Promotes matching products to the top (DESC ordering)
  • Other positions: Demotes matching products to the bottom (ASC ordering)

Soft Demotion

When demoting products in a search context, enable Soft Demotion to apply threshold-based relevance demotion. Items above the relevance threshold are immune to demotion, while items below receive proportional demotion. When available:
  • Only appears for priority rules on relevance sort orders
  • Only applies in search context (not browse)
  • Only available for demotion direction (ASC)
How it works:
  • Items with relevance score >= threshold → immune to demotion
  • Items with relevance score < threshold → proportional demotion based on distance below threshold
Relevance threshold:
  • Default: 0.5 (range: 0-1)
  • Higher threshold (e.g., 0.7): Only highly relevant items are immune; more products receive demotion
  • Lower threshold (e.g., 0.3): More items are protected; only weak matches receive demotion
UI control: When creating a demotion priority rule on a relevance sort order, a Soft Demotion toggle appears. Enable it to reveal a Relevance Threshold slider that controls which products are immune to demotion:
  1. Enable the Soft Demotion toggle
  2. Adjust the Relevance Threshold slider (0-100, representing 0.0-1.0)
  3. The current threshold value is displayed next to the slider
  4. Items with relevance at or above this threshold are immune to demotion
Falls back to hard demotion in browse context. Available operators: Text operators:
  • equals / does not equal - Exact match
  • contains / does not contain - Partial text matching
  • begins with / does not begin with - Prefix matching
  • ends with / does not end with - Suffix matching
  • in / not in - Match any value in a list (enables multi-select)
  • is null / is not null - Check if attribute has a value (hides value field)
Numeric operators:
  • equals / does not equal - Exact numeric match
  • greater than / greater than or equal - Value comparisons
  • less than / less than or equal - Value comparisons
  • between / not between - Range matching (requires two values)
  • in / not in - Match any value in a list (enables multi-select)
  • is null / is not null - Check if attribute has a value (hides value field)
Date operators:
  • equals / does not equal - Exact date match
  • after / before - Date comparisons
  • between / not between - Date range matching (requires two values)
  • is null / is not null - Check if attribute has a value (hides value field)
Tag operators:
  • contains / does not contain - Check if tag exists
  • in / not in - Match any tag in a list (enables multi-select)
Examples: Promote scenario - Priority rule in first position:
1. Priority Rule: vendor equals "Nike"
2. Sort by: Sales (7d) - Descending
Result: All Nike products appear first, then remaining products sorted by sales. Demote scenario - Priority rule in last position:
1. Sort by: Title - Ascending
2. Priority Rule: vendor equals "Nike"
Result: Non-Nike products appear first (sorted by title), then Nike products at the bottom. Soft demotion scenario - Threshold-based demotion in search:
1. Sort by: Relevance Score - Descending
2. Priority Rule: tags contains "clearance" (Soft Demotion: enabled, Threshold: 0.6)
Result: Clearance items above the 0.6 threshold are immune to demotion. Clearance items below the 0.6 threshold receive proportional demotion based on how far below the threshold they are. Only works in search context. Multi-value selection - Using in or notIn operators: When you select the in or notIn operator in the UI, multi-select functionality is automatically enabled, allowing you to select multiple values in a single rule.
1. Priority Rule: vendor in ["Nike", "Adidas", "Puma"]
2. Sort by: Sales (7d) - Descending
Result: All products from Nike, Adidas, or Puma appear first, then other brands sorted by sales.
1. Priority Rule: tags in ["featured", "bestseller", "new-arrival"]
2. Sort by: Price - Ascending
Result: Products with any of the specified tags appear first, sorted by price, then remaining products. Null operators - Check if attributes are set: When you select is null or is not null, the value field is automatically hidden since these operators check for presence/absence of data.
1. Priority Rule: compare_at_price is not null
2. Sort by: Discount Percentage - Descending
Result: Products on sale (with compare-at price set) appear first, sorted by discount.
1. Sort by: Sales (7d) - Descending
2. Priority Rule: inventory_quantity is null
Result: Products with inventory tracking appear first, products without tracking at the bottom. Range exclusion - Using not between:
1. Sort by: Sales (7d) - Descending
2. Priority Rule: variant_price not between [100, 200]
Result: Products priced outside 100100-200 appear first, products in that range at the bottom.

Weighted Groups

Combine multiple attributes with different weights to create sophisticated ranking algorithms.

Soft Boost (Beta)

Apply a decaying multiplier to boost products matching conditions while maintaining natural ranking. Unlike priority rules, soft boost creates interleaving rather than clustering.
Soft boost is currently in beta. To join the beta program, contact your account manager or support team.
Key differences from priority rules:
  • Natural interleaving: Boosted products are distributed throughout results based on their base score
  • Decaying multiplier: Products with lower base scores receive larger relative boosts
  • Requires following attribute: Soft boost must be followed by another sort attribute to modify
Configuration:
  • Attribute: The product attribute to check (e.g., tags, vendor, options)
  • Operator: Condition operator (see available operators below)
  • Value: The value to match (multi-select available for in and notIn operators, hidden for is null and is not null)
  • Boost Mode: Choose between multiplicative (default) or additive mode
    • Multiplicative: Multiplies base value by a boost factor (requires non-zero base values)
    • Additive: Adds a percentile-based value (works even when base value is 0)
  • Boost Strength (multiplicative mode only): Intensity of the boost (default: 0.25, range: 0-10)
  • Percentile Target (additive mode only): Target percentile for boosted products (default: 50, range: 0-100)
  • Decay Rate: How quickly the boost diminishes (default: 100, range: 1+)
Available operators for soft boost: All the same operators available for priority rules can be used with soft boost, including:
  • Text operators: equals, does not equal, contains, does not contain, begins with, does not begin with, ends with, does not end with, in, not in, is null, is not null
  • Numeric operators: equals, does not equal, greater than, greater than or equal, less than, less than or equal, between, not between, in, not in, is null, is not null
  • Date operators: equals, does not equal, after, before, between, not between, is null, is not null
  • Tag operators: contains, does not contain, in, not in
Example (Multiplicative): Boost products tagged “featured” while sorting by sales:
1. Soft Boost: tags contains "featured" (Boost Mode: Multiplicative, Boost Strength: 0.5, Decay Rate: 100)
2. Sort by: Sales (7d) - Descending
Example (Additive): Sprinkle new arrivals with zero sales into best sellers:
1. Soft Boost: tags contains "new-arrival" (Boost Mode: Additive, Percentile Target: 75, Decay Rate: 500)
2. Sort by: Sales (7d) - Descending
Example (Multi-value): Boost products with any of multiple tags using in operator: When you select the in or notIn operator in the UI, multi-select is automatically enabled.
1. Soft Boost: tags in ["featured", "bestseller", "trending"] (Boost Mode: Multiplicative, Boost Strength: 0.5, Decay Rate: 100)
2. Sort by: Sales (7d) - Descending
When to use additive mode:
  • Boosting products with zero or near-zero base values (new arrivals with no sales)
  • Creating a specific target position in the sort order
  • “Sprinkling” new products into established rankings
Soft boost cannot be the last sorting attribute. The dashboard will show a validation error if you attempt to save a sort order with soft boost as the final attribute.
Learn more about soft boost in the Sort Orders documentation.

Explain with AI

The Explain with AI feature provides human-readable explanations of your sort order configuration, making it easier to understand what a sort order does and how it will rank products. How to use:
  1. Create or edit a sort order with at least one sorting expression
  2. Click the Explain with AI button in the card header (next to AI Builder / Add Expression buttons)
  3. Review the plain-language explanation that appears at the top of the card
What it does: The AI analyzes your complete sort order configuration and generates a clear explanation that describes:
  • How products will be ranked
  • What metrics or attributes are being used
  • Which products will be promoted or demoted
  • The business impact of your sorting logic
When to use it:
  • Understand complex configurations: Get clarity on sort orders with multiple weighted groups, priority rules, or soft boosts
  • Document your strategy: Generate explanations to share with your team or document merchandising decisions
  • Verify logic: Confirm that your sort order configuration matches your intended merchandising strategy
  • Learn from examples: Understand how different sorting expressions work together
Example explanations: Relevance sort with metric boost:
Products are primarily ranked by how well they match the search query. Sales performance over the last 7 days is used to boost popular products higher in results, with a moderate influence on the final ranking. Out-of-stock products are demoted to the bottom of search results so customers see available items first.
Collection sort with priority rules:
Featured products are promoted to the top of the collection. The remaining products are then sorted by their sales performance over the last 7 days, with best sellers appearing first. Out-of-stock products are pushed to the bottom so customers see available items first.
Weighted group sort:
Products are ranked by a balanced combination of sales performance (70%) and profit margin (30%). This ensures that both revenue and profitability influence the product order, helping you showcase items that drive both sales volume and healthy margins.
Use Explain with AI to verify that priority rules are promoting or demoting the correct products. The AI will describe exactly which products match your conditions and what happens to them.

Tip

  • Start simple. You can refine weights over time.
  • Use soft boost for subtle promotion that maintains organic ranking.
  • Use Explain with AI to document complex sort orders for your team.