Skip to main content

Overview

Sort Orders determine the sequence in which products appear on collection pages. You can fine-tune product visibility using a combination of priority rules, product attributes, weighted attribute groups, and soft boost (Beta). These expressions help align product sorting with your marketing strategies and customer preferences.

Priority Rules: Position-Based Behavior

Priority rules use conditional logic to cluster matching products either at the top or bottom of results. The behavior depends on the rule’s position in your sort order:
  • First position: Promotes matching products to the top (DESC ordering - matching items first)
  • Other positions: Demotes matching products to the bottom (ASC ordering - matching items last)
This position-based behavior allows you to create both promotion and demotion scenarios within the same sort order configuration. You can configure sort orders manually or use the AI Sort Builder (Beta) to generate configurations from natural language descriptions.

Enable as Storefront Sort

When creating or editing a sort order, you can control whether it is synced to Shopify as a metaobject using the Enable as Storefront Sort toggle. This option is enabled by default for regular sort orders, allowing them to be referenced in Shopify’s admin and Storefront API. Variant sort orders (used in experiments) automatically have this option disabled, as they are only used internally by the Layers API for A/B testing and do not need to be available in Shopify. When you toggle a sort order to be used as a variation, Enable as Storefront Sort is automatically disabled. Learn more about how sort orders are synced to Shopify in Metaobjects & Metafields. images/sort-order-dashboard-image.png

Sort Order Architecture

Sort Orders build upon the attribute foundation and can be enhanced with sequences, while being subject to merchandising rule overrides: Sort Orders can also leverage segmented metrics to automatically personalize product rankings based on visitor context like geographic location or marketing channel.

Why Sort Orders Matter

Sort Orders shape how products are presented on collection pages so shoppers find the right items faster. Use priority rules, attributes, and weighted groups to reflect your brand strategy and customer preferences. For step‑by‑step instructions, see:

Common Sort Order Recipes

The platform provides pre-configured sort orders that implement common merchandising patterns. These can be used as-is or customized for your specific needs.

Best Selling

Description: Sort by sales performance using 7-day revenue data. Products with highest revenue appear first. Dependencies: Automatically creates “Total Sales (7d)” metric if not present. Sorting Logic:
  • Primary: Metrics (Total Sales 7d) - Descending
  • Products with highest 7-day sales rank first
Use Case: Default sort for collection pages to showcase top performers. Drive sales by highlighting proven winners.

Newest

Description: Sort by product creation date. Most recently published products appear first. Sorting Logic:
  • Primary: Published At - Descending
  • Most recently published products rank first
Use Case: “New Arrivals” collections or highlighting latest inventory additions. Keep collection pages fresh with newest items.

Price: High to Low

Description: Sort by price in descending order. Most expensive products appear first. Sorting Logic:
  • Primary: Variant Price - Descending
  • Highest priced products rank first
Use Case: Luxury or premium product collections. Allow customers to browse from highest to lowest price points.

Price: Low to High

Description: Sort by price in ascending order. Least expensive products appear first. Sorting Logic:
  • Primary: Variant Price - Ascending
  • Lowest priced products rank first
Use Case: Budget-conscious collections or value-oriented merchandising. Help customers find affordable options first.

Soft Boost Sorting (Beta)

Soft Boost is a sorting technique that applies a decaying multiplier to boost products matching specific conditions. Unlike priority rules that cluster boosted products at the top, soft boost creates natural interleaving by applying a boost that decreases as the base sort value increases.
Soft boost sorting is currently in beta. To join the beta program, contact your account manager or support team.

How Soft Boost Works

Soft boost supports two modes: multiplicative (default) and additive. Each mode uses a different formula to boost products matching specific conditions.

Multiplicative Mode (Default)

Multiplicative mode applies a decaying multiplier to the base score. This produces natural interleaving because:
  • Products with low base scores get a larger relative boost (the exponential decay is minimal)
  • Products with high base scores get a smaller relative boost (the exponential decay is significant)
  • Non-matching products receive no boost (multiplier = 1)
Limitation: Multiplicative mode fails when the base value is zero. Products with zero base values (like new arrivals with no sales) remain stuck at the bottom regardless of boost settings.

Additive Mode

Additive mode adds a percentile-based value to the base score. The percentile value is computed from the Nth percentile of all base sort values, where N is the percentile target (e.g., 50 = median, 80 = 80th percentile). Key advantages:
  • Works with zero base values: Products with no sales data can still be boosted effectively
  • Percentile-based targeting: Control where boosted products appear in the distribution
  • Ideal for new arrivals: “Sprinkle” new products with no performance history into established rankings
When to use additive mode:
  • Boosting products with zero or near-zero base values (new arrivals, products with no sales)
  • Creating a specific target position in the sort order (e.g., boost to 75th percentile)
  • Sprinkling new products into a best-selling sort order without clustering them at the top

Soft Boost vs. Priority Rules

FeatureSoft BoostPriority Rules
Product DistributionNatural interleaving throughout resultsClusters boosted products at top
Boost BehaviorDecaying multiplier based on base scoreFixed boost/demote logic
Use CaseSubtle promotion while maintaining organic rankingStrong promotion or demotion
ConfigurationBoost strength + decay rateCondition + weight
Example: For a collection sorted by sales with a soft boost on tags = 'featured':
  • Priority Rule: All featured products appear first, regardless of sales
  • Soft Boost: Featured products with low sales get a significant boost, but high-selling non-featured products can still rank higher

Configuration Parameters

Boost Mode

Determines the formula used to boost matching products.
  • Options: multiplicative (default) or additive
  • Default: multiplicative
Multiplicative mode:
  • Multiplies the base value by a boost factor
  • Best for products with non-zero base values
  • Uses boost_strength parameter
Additive mode:
  • Adds a percentile-based value to the base score
  • Works even when base value is 0
  • Uses percentile_target parameter
  • Ideal for new arrivals or products with no performance data

Boost Strength (Multiplicative Mode Only)

Controls the intensity of the initial boost. Higher values provide stronger boosts to matching products.
  • Range: 0 to 10
  • Default: 0.25
  • Recommended: 0.25 to 1.0 for subtle promotion, 1.0 to 2.0 for stronger effects
  • Only used in multiplicative mode
Example Impact (with Decay Rate = 100):
  • Product with base score 10 and Boost Strength 0.5: 10 × 1.409 = 14.09 (+41%)
  • Product with base score 100 and Boost Strength 0.5: 100 × 1.184 = 118.4 (+18%)

Percentile Target (Additive Mode Only)

Controls the target percentile for boosted products in additive mode. Products matching the condition will receive a boost that places them approximately at this percentile of the sort order.
  • Range: 0 to 100
  • Default: 50
  • Recommended: 50-75 for moderate visibility, 75-90 for high visibility
  • Only used in additive mode
Example Impact:
  • Percentile target 50: Boosted products appear around the median position
  • Percentile target 75: Boosted products appear in the upper quartile
  • Percentile target 90: Boosted products appear near the top
The percentile is computed over all products’ base values, providing a stable reference point for positioning.

Decay Rate

Controls how quickly the boost diminishes as the base score increases. Higher values make the boost decay more slowly.
  • Range: 1 and above
  • Default: 100
  • Recommended: 50-200 for multiplicative mode, 200-500 for additive mode
Example Impact (with Boost Strength = 0.5 or Percentile Target = 75):
  • Decay Rate 50: Boost decays faster, more aggressive interleaving
  • Decay Rate 200: Boost decays slower, boosted products stay higher longer
  • Decay Rate 500: Very slow decay, suitable for additive mode with sparse data

Configuration Requirements

Soft boost cannot be the last sorting attribute. It requires a following sort attribute to modify. The dashboard will display a validation error if you attempt to save a sort order with soft boost as the final attribute.

Example Use Cases

Boost products tagged as “featured” while maintaining sales-based ranking:
1. Soft Boost: tags contains "featured" (Boost Mode: Multiplicative, Boost Strength: 0.5, Decay Rate: 100)
2. Sort by: Sales (7d) - Descending
Result: Featured products with moderate sales rank higher, but top-selling non-featured products can still win.

Sprinkle New Arrivals into Best Sellers (Additive Mode)

Interleave new arrivals with zero sales into a best-selling sort order:
1. Soft Boost: tags contains "new-arrival" (Boost Mode: Additive, Percentile Target: 75, Decay Rate: 500)
2. Sort by: Sales (7d) - Descending
Why additive mode? New arrivals have zero sales, so multiplicative mode would fail. Additive mode adds a percentile-based value, allowing products with no sales history to be boosted into the upper portion of results. Result: New arrivals with zero sales appear distributed throughout the top 75% of results, naturally interleaved with established best sellers. As new products accumulate sales data, the boost gradually diminishes and their organic sales performance takes over. Use case: Perfect for fashion retailers launching seasonal collections, where new items need visibility before they have sales history. The 75th percentile target ensures new arrivals appear in the upper portion without completely dominating the sort order.

Highlight Recently Published Products (Multiplicative Mode)

Give recently published products a boost without completely overriding popularity:
1. Soft Boost: published_at > 30 days ago (Boost Mode: Multiplicative, Boost Strength: 0.75, Decay Rate: 150)
2. Sort by: Total Sales - Descending
Result: New products get visibility while established bestsellers remain competitive.

Regional Preference (Multiplicative Mode)

Boost products from specific vendors for certain markets:
1. Soft Boost: vendor equals "Local Brand" (Boost Mode: Multiplicative, Boost Strength: 0.5, Decay Rate: 100)
2. Sort by: Relevance Score - Descending
Result: Local brand products rank higher while maintaining relevance-based ordering.

Works With Other Features

Soft boost integrates with other sort order capabilities:
  • Segmented Metrics: Apply soft boost to segmented metric scores for personalized boosting
  • Sequences: Soft boost respects product sequences when enabled
  • Multiple Attributes: Chain multiple soft boosts or combine with weighted sorting

Best Practices

  • Choose the Right Mode: Use multiplicative mode for products with non-zero base values, additive mode for products with zero or near-zero values (like new arrivals)
  • Start with Default Values: Begin with Boost Strength = 0.25 (multiplicative) or Percentile Target = 50 (additive) and Decay Rate = 100, then adjust based on results
  • Test Different Parameters: Use sort order experiments to compare different boost configurations
  • Monitor Distribution: Preview your sort order to ensure products are distributed as expected
  • Avoid Over-Boosting: Keep Boost Strength below 1.0 for most use cases to maintain natural ranking
  • Match Decay Rate to Score Range: Use higher decay rates (200-500) for additive mode or metrics with large value ranges
  • Additive Mode for Zero Values: When boosting products with no performance data (new arrivals, products with no sales), always use additive mode

Priority Rule Examples

Promoting Products (First Position)

When a priority rule is in the first position, it promotes matching products to the top of results. Example: Promote Nike products
1. Priority Rule: vendor equals "Nike"
2. Sort by: Sales (7d) - Descending
Result:
  • All Nike products appear first (regardless of sales)
  • Within Nike products, sorted by sales
  • Non-Nike products appear after, sorted by sales
Use case: Feature a specific brand or collection at the top of search results while maintaining secondary sorting for both groups.

Demoting Products (Other Positions)

When a priority rule is in any position other than first, it demotes matching products to the bottom of results. Example: Demote out-of-stock products
1. Sort by: Sales (7d) - Descending
2. Priority Rule: inventory_quantity equals 0
Result:
  • In-stock products appear first, sorted by sales
  • Out-of-stock products appear at the bottom
Use case: Push less desirable products (out of stock, discontinued, low ratings) to the bottom while maintaining primary sort order for the rest.

Multiple Priority Rules

You can combine multiple priority rules to create sophisticated ranking logic: Example: Promote featured, demote out-of-stock
1. Priority Rule: tags contains "featured"
2. Sort by: Sales (7d) - Descending
3. Priority Rule: inventory_quantity equals 0
Result:
  • Featured products appear first (promoted)
  • Regular in-stock products in the middle, sorted by sales
  • Out-of-stock products at the bottom (demoted)

Priority Rules with Limit

Priority rules support a limit parameter to control how many matching products are promoted or demoted: Example: Promote top 5 new arrivals
1. Priority Rule: published_at > 7 days ago (limit: 5)
2. Sort by: Sales (7d) - Descending
Result:
  • Top 5 newest products appear first
  • Remaining products sorted by sales (including other new products beyond the limit)

Best Practices

  • Balance Weights: Avoid extreme weight differences to ensure fair influence of attributes.
  • Monitor Impact: Regularly review conversion rates and customer behavior to refine sorting strategies.
  • Use Priority Rules Wisely: Place priority rules in the first position to promote products, or in other positions to demote them. Consider the position carefully to align with merchandising goals.
  • Leverage Recipes: Start with pre-configured sort orders and customize them based on your specific merchandising goals.
  • Test Position Changes: Use sort order experiments to test whether promoting or demoting specific products improves conversion rates.
For further details, see the Browse API or contact our support team.

Using Segmented Metrics in Sort Orders

Segmented metrics enable automatic personalization of product rankings based on each visitor’s context. When you include a segmented metric in a sort order, the system intelligently selects the most relevant metric value for each visitor without requiring separate sort orders for different audiences.

How It Works

When you add a segmented metric to a sort order, the system automatically uses the visitor’s context to select the appropriate metric value. For a visitor from the United States, the system uses US-specific performance data when available. For a visitor from Canada, it uses Canadian data. If segment-specific data isn’t available, the system falls back to the overall value, ensuring all visitors see ranked results. This happens transparently at query time. You configure the segmentation once in your metric and sort order, and the system handles all the complexity of matching visitor context to the right data.

Smoothing Factor

The smoothing factor controls how segment-specific and global performance data are blended when ranking products. This parameter helps balance the responsiveness of segment-specific rankings with the stability of global trends. How it works: When a segmented metric is used in a sort order, the system calculates a weighted blend of segment-specific data and global data for each product:
final_score = (segment_value × segment_weight) + (global_value × global_weight)
The smoothing factor (default: 50) determines these weights. Lower values prioritize segment-specific performance, making rankings more responsive to local trends. Higher values blend in more global data, providing stability when segment data is sparse or noisy. Choosing a value:
  • 1-50 (Segment-focused): Use when you have sufficient data in each segment and want rankings to closely reflect segment-specific performance. Best for high-traffic stores with established regional patterns.
  • 50-100 (Balanced): The default range balances segment-specific insights with global trends. Suitable for most use cases where you want personalization without excessive volatility.
  • 100-200 (Global-focused): Use when segment data is sparse or when you want rankings to remain stable across segments. Best for new stores, low-traffic segments, or when testing segmentation.
Example scenarios:
  • Geographic segmentation with high traffic: Set smoothing factor to 25-50 to prioritize country-specific performance data
  • Marketing channel segmentation with limited data: Set smoothing factor to 100-150 to blend channel-specific trends with overall performance
  • New segment with minimal data: Set smoothing factor to 150-200 to rely primarily on global performance until segment data accumulates
You can configure the smoothing factor when adding a segmented metric to a sort order. The system applies this blending automatically at query time for each visitor.

Benefits

Segmented metrics in sort orders deliver more relevant product rankings to different audiences:
  • Geographic relevance: Products that perform well in a visitor’s country or region rank higher for that visitor
  • Channel optimization: Visitors from paid ads see rankings optimized for paid traffic, while organic visitors see organic-optimized rankings
  • Automatic adaptation: Rankings adjust to each visitor without manual intervention or duplicate sort orders

Works With Other Features

Segmented metrics integrate seamlessly with other sort order capabilities:
  • Weighted sorting: Combine multiple segmented metrics with different weights to create sophisticated ranking algorithms
  • Conditional rules: Apply segmented metrics only when specific conditions are met
  • Priority rules: Use segmented metrics alongside boost and demote logic for fine-tuned control
screenshot of creating a sort order with segmented metrics

Learn More

Sort Order Experiments

Sort Order Experiments allow you to A/B test different sort orders across your storefront APIs to determine which arrangement of products leads to better engagement and conversion rates.

Overview

With Sort Order Experiments, you can:
  • Create A/B tests for different sort orders across Browse, Text Search, Image Search, and Similar Products APIs
  • Target specific collections (for Browse experiments) or run experiments across all search requests
  • View detailed metrics on how each variation performs
  • Make data-driven decisions about which sort orders to implement
Sort Order Experiments are created and managed directly within the Sort Orders section of your Layers dashboard. Each experiment compares a base sort order (Variant A) with a variant sort order (Variant B) to help you determine which arrangement of products performs better. Sort Order Experiments

Supported API Types

Experiments can target any of the following API types:
  • Browse: Test sort orders on collection pages. You can target specific collections or all collections.
  • Text Search: Test sort orders for text-based search queries across your entire catalog.
  • Image Search: Test sort orders for image-based visual search results.
  • Similar Products: Test sort orders for similar product recommendations.
When creating an experiment, you select which API type to target. For Browse experiments, you must also specify which collections the experiment applies to. For Search experiments (Text Search, Image Search, and Similar Products), the experiment applies to all requests of that type.

Running Experiments

Use experiments to compare a base sort order with a variant and see which performs better. Set a traffic split, configure targeting, and monitor results to make data-driven decisions.

Experiment Settings

  • Name: A descriptive name to identify your experiment
  • Target API Type: The API to run the experiment on (Browse, Text Search, Image Search, or Similar Products)
  • Base Sort Order: The current sort order that will be shown to the control group
  • Variant Sort Order: The new sort order that will be shown to the test group
  • Collections: For Browse experiments only, select all collections, a single collection, or multiple specific collections to target
  • Traffic Split: Percentage of traffic that will see each variation (default is 50/50)
  • Advanced Targeting Conditions: Optional filters to determine which visitors are eligible for the experiment (e.g., UTM parameters)

Monitoring Experiments

Once your experiment is running, you can monitor its performance in the experiment results section within the sort order:
  • Visitors: Number of visitors in each group
  • Views: Product views in each group
  • Clicks: Product clicks in each group
  • Add to Carts: Number of products added to cart in each group
  • Purchases: Number of purchases in each group
  • Conversion Rate: Percentage of visitors who made a purchase
  • Confidence Level: Statistical confidence in the results

Ending an Experiment

You can end an experiment at any time:
  1. Navigate to the Sort Orders section in your Layers dashboard
  2. Select the sort order containing the experiment
  3. Click on the “Experiments” tab
  4. Click “End Experiment” for the experiment you want to conclude
  5. Review the final results
  6. Implement the winning sort order if desired

Advanced Usage

UTM-Based Sorting

You can use experiments with a 100% traffic split and advanced targeting priority rules to show different sort orders based on UTM parameters. This allows you to create specialized landing experiences for different marketing campaigns. For example, you could set up an experiment that shows a special sort order only to visitors coming from a specific email campaign by targeting the UTM source and campaign parameters.

API-Specific Experiments

Each experiment targets a specific API type, allowing you to run independent experiments across different parts of your storefront. For example, you could simultaneously run a Browse experiment on your collection pages and a Text Search experiment on your search results, each with different sort order variations. This targeted approach enables you to optimize each discovery channel independently and measure the impact of sort order changes on specific user journeys.

Best Practices

Allow experiments to run until they reach statistical significance (usually indicated by a high confidence level).
For clearest results, only test one change at a time. If you want to test multiple sort orders, run separate experiments.
Be aware that seasonal factors may influence your results. Consider running experiments during typical periods for your business.
Don’t focus solely on one metric. Look at the full picture including views, clicks, add-to-carts, and purchases.

See also