Guide · 7 minute read

How to sort Shopify collections by stock, margin and sales speed.

Shopify can sort a collection by best selling, price, date or name. It can't sort by how much stock you have, how much you make, or what's selling this week. Here's how to do it anyway.

Men's topsA to ZSales speedStock to clearYour rules
 ↑1
 ↑1
 ↑1
 ↑1
 ↑1
 ↑1
Push linen this week
Linen goes up until Sunday.

What Shopify's sort options miss

Built-in sortThe problem
Best sellingAll-time sales. Last year's hit stays on top after it has stopped selling
NewestEverything older than a week sinks, best sellers included
PriceSays nothing about what shoppers want
ManualPerfect, until you have 40 collections to keep up to date

None of them know your margin or your stock. So your top row can be full of low-margin products, or products about to sell out, while 140 days of stock sits on page three.

The numbers you need

  • Sales speed: units sold per day over the last 30 days. Better than all-time best selling.
  • Days of stock: current stock divided by sales speed. Low means it's about to run out; high means it needs a push.
  • Margin: (price − cost) ÷ price. Add cost per item to your variants in Shopify to get it.
  • Trend: this week's pace compared with the month. Over 1 means it's picking up.

You can work these out from a Shopify sales report and an inventory export in a spreadsheet.

Sorting by hand

  1. 01Export the numbersAnalytics → Reports → Sales by product for the last 30 days, and Products → Export for stock and cost.
  2. 02Score each productPick a goal. For margin: sort by margin, but drop anything that sold under 2 units. For clearing stock: sort by days of stock, highest first.
  3. 03Set the collection to manualIn the collection, change Sort to Manually and drag products into your order.
  4. 04RepeatWeekly at least. Sales speed and stock change every day.

Sorting automatically

StoreAi's autopilot merchandiser does those steps every day (every hour on Pro). Pick a goal per collection: most revenue, best margin, clear old stock or launch new lines. It previews each new order with a reason for every move, keeps pinned products in place, and keeps every past order for undo.

For anything the goals don't cover, write a rule in plain English, such as “push linen until the end of August”. See plain-English sorting rules.

Questions

Can a smart collection have a manual order?
Yes. The collection's conditions decide which products are in it, and the sort order is separate. Set Sort to Manually and the order sticks.
What if I don't track inventory?
Days of stock can't be worked out, so leave that signal out and sort by sales speed and margin.

Try it on your own store. Free.

Install free on ShopifyFree plan · No card · Billed by Shopify