Skip to main content
Layers checks your published sort orders for two kinds of overlap and calls them out in the dashboard so you can consolidate before they clutter the storefront picker.

What gets flagged

Layers surfaces two flavors of duplicate separately:
  • Same setup — Two sort orders compile to the same ranking configuration once weights, direction, and order are normalized. This is a strong signal that one of the two can be deleted or renamed.
  • Returns same first N — Two sort orders are configured differently but produce the same top ranked products against your live catalog. This catches setups that look distinct on paper but converge to the same output.
When a pair matches on both, Layers shows only Same setup. The setup match is the more actionable finding.
Sort orders that depend on per-request context, such as geo distance or conditional expressions, are excluded from the results-based check because their output changes per visitor.

Where it appears

Sort orders list

An orange warning triangle appears next to the name of any published sort order that has a twin. Hover or focus the triangle to see which kind of duplicate it is:
  • Same setup as <name> — the two sort orders compile to the same configuration.
  • Returns the same first <N> products as <name> — the two sort orders produce identical top results, where N is the depth the check compared.
The tooltip names the twin sort order. To open the twin, find it in the list or use the link in the editor alert. Layers flags only one sort order in each pair. Layers keeps the canonical member — the system default or the one with the lowest display order — unflagged so your primary configuration stays clean.

Sort order editor

Opening a flagged sort order shows an alert at the top of the editor with a link to its twin, so you can compare setups side by side before deciding which to keep.

When to act on a flag

  • Same setup — Almost always safe to delete or unpublish the duplicate. If both are intentional (for example, one is used only by a recommendation block and one drives the storefront), rename them so the difference is obvious to the team.
  • Returns same first N — Worth a closer look. The two sorts might legitimately agree on today’s catalog but diverge as inventory or metrics shift. Preview each one on a few collections before deleting.

How the check runs

  • Setup-based matches recompile on every save, so the triangle appears (or clears) as soon as you change an expression.
  • Results-based matches refresh nightly, and also on save for the sort order you just edited. The editor alert shows how long ago the check ran.

Next steps