Sort a collection by inventory
Use an Inventory rule when the amount left should decide the order, not only whether the product is sold out. More units first is the usual grid. Fewer units first is a clearance push.
Steps
- Open Strategies (Beta) and create a strategy, or edit the one on the collection.
- Add an Inventory rule.
- Choose Descending to put higher stock first, or Ascending to put low stock first.
- On Basic you can only have this one rule. On Plus or Advanced, add a second rule or switch to weights if sales should also count.
- Save, then attach the strategy under Ranking on the collection. Conditions still decide which products belong.
- If empty products must never lead, also push sold-out products down. An inventory sort alone can still leave a zero-stock product in place if you do not add that rule.
- Check the storefront after the run finishes.
Variant Availability % with Most Available ranks by how much of the variant list can still be bought. Sizes In Stock % with Most Sizes In Stock prefers a product that still has more of its sizes. Reordering the Size values themselves is Option Sorting, and that is on Plus and Advanced, not Basic.