Overview
A weighted group blends several attributes and metrics into a single sort score so collection pages can balance multiple signals at once. Each feature you add contributes a configurable share of the final score, and you choose whether higher or lower values are better on a per-attribute basis. Use a weighted group when no single attribute captures what you want to rank by — for example, when you want to balance sales performance with freshness, or recency with margin. A weighted group reflects a strategy (“60% sales, 40% new arrivals”) rather than a strict hierarchy.How weighted groups work
Inside the group you add expressions (attributes and metrics). For each expression you set:- A weight, expressed as a share of 100. Layers automatically normalizes weights so they sum to 100 — dragging one slider rebalances the others proportionally, so the share you see is the share each feature actually contributes.
- A preference (attribute expressions only): Higher is better or Lower is better. Metric expressions default to higher is better.
When to use a weighted group
A weighted group is the right tool when you want to combine signals into one ranking rather than apply them in priority order. Reach for it when:- One metric isn’t enough — for example, “best-selling and new”.
- You want to soften a single dominant signal by mixing in a secondary one.
- You want to expose a blended ranking as its own storefront sort option (for example, “Best match”).
Configuration
In the sort order editor, click Add Expression and choose Weighted Groups. A new group is created with one feature row to start.Add expressions to the group
Use the picker to add attributes or metrics. Each row supports:- Feature — the attribute or metric to contribute.
- Preference (attributes only) — Higher is better or Lower is better.
- Weight — the share of the blend, on a slider out of 100.
Group settings
The group header has a settings (gear) icon that opens a sheet with:- Final Sort Direction — Descending (default, highest score first) or Ascending.
- Conditions — optional contextual conditions that gate the entire group. When the conditions don’t match the current request, the whole weighted group is skipped and the next expression in the sort order takes over.
Compose with soft boost or User Affinity
A weighted group is a first-class base in the sort pipeline, so you can layer modifiers on top of its score:- Drop a soft boost below the weighted group to lift products matching a condition within the blended ranking.
- Drop User Affinity below the weighted group to personalize the blend for each shopper.
Observability
Weighted groups participate in the same instrumentation as other sort types:- Score breakdown — open the Lab view for a product to see the active feature contributions and their normalized values.
- Annotations — sort effect annotations show when the weighted group drove a product’s position.
Best practices
- Start with two features. Bigger blends are harder to reason about; add a third feature only when it noticeably changes the ranking.
- Keep weights meaningful. A feature weighted under ~10% rarely changes the order — either raise it or drop it.
- Pick the right preference. Use Lower is better for fields like price when shoppers want cheaper items first, or distance for store-locator sorts.
- Use conditions to scope the blend. If a blend only makes sense for a subset of traffic (a market, a channel), set group conditions instead of duplicating sort orders.
- Preview before publishing. Open the sort order preview and compare a collection with and without the group to confirm the blend produces the order you expect.