RankRobin sort rules: metrics, windows, and cadences for Shopify collections
Last updated: May 21, 2026
A sort rule is what RankRobin runs against a collection to decide product order. Every rule is built from three things: a metric, a time window, and a cadence.
Metrics
| Metric | What it ranks on |
|---|---|
units | Total units sold over the window |
revenue | Total revenue (shop currency) over the window |
order_count | Number of orders the product appeared in |
revenue_per_day | Revenue averaged across days in the window |
trending_7v7 | Last 7 days vs the 7 days before, weighted toward growth |
Pick the metric that matches what you mean by “best.” units and revenue are the most common.
Time windows
| Window type | Example |
|---|---|
| Rolling | Last 30 days from today |
| Fixed | A specific calendar range |
| Year-over-year | The same range from a previous year (used for seasonal sorting) |
Year-over-year windows depend on the historical order backfill. RankRobin runs the backfill on install; year-over-year sorts become accurate once it completes.
Cadence
How often the rule re-runs:
- Daily - once per day, at 3am in your shop’s timezone
- Hourly - once per hour
- Manual - only when you click Sort now
Templates
A template is a saved rule (metric + window + cadence) you can apply to multiple collections. Edit the template once and every linked collection picks up the change on its next run.
Use a template when you want the same sort logic across many collections. Use an inline rule when one collection needs something different.
Pinned products
Pin a product to a fixed position from the collection page in the dashboard. Pinned products stay locked at the top; the metric sorts everything else.
Out-of-stock products
Each rule has an option to push out-of-stock products to the bottom regardless of metric. Off by default. When a product comes back in stock, it returns to its ranked position on the next sort run.
Ties
When two products score identically on the chosen metric, RankRobin breaks the tie by total units sold over the same window, then by product ID. Tie-breaks are stable: re-running the rule on the same data produces the same order.
Products with no sales in the window
Products with zero sales in the window are placed at the bottom of the ranked section by default. Set the rule’s No-sales fallback to newest to keep new products visible while they’re still gathering data, or to manual to leave their position untouched by the rule. They’re never removed from the collection.