Shopify gives every collection a sort order, and for many stores the built-in options are enough for a while. This post is about what comes after: how a collection gets an order that Shopify's options cannot express, and what that means for your store and your theme.
The built-in options, and where they stop
In the Shopify admin, a collection is sorted by one of a fixed list: best selling, product title, price, date, or manually.
Each automatic option uses one criterion. That is the limit. "Best selling" does not know that the best seller has two sizes left. "Newest" does not know that last week's arrivals are not selling. There is no option for "what sells, as long as it is available, with new products given a chance".
The remaining option is manual. A manually sorted collection shows its products in exactly the order you arrange. It can express anything, and somebody has to do the arranging, in every collection, again and again.
What the Admin API adds
The manual order of a collection does not have to be set by dragging products in the admin. Shopify's Admin API has an operation that moves the products of a collection to given positions. An app with the right permission can call it.
That turns "manual" into "set from outside". The order is calculated elsewhere, from whatever data and logic you like, and written to the collection through the API. To Shopify, and to your theme, it is an ordinary manually sorted collection.
Two details matter:
- Only manually sorted collections accept an order. A collection that Shopify sorts by best selling or by price has to be switched to manual first.
- It is the Admin API, not the Storefront API. The Storefront API reads data for a storefront. It cannot change the order of a collection.
What this means for your theme
Nothing. The order lives on the collection, so the theme does what it always does: it asks Shopify for the collection's products and shows them.
There is no script to add, no app block and no extra request when the page loads. This is also why this kind of sorting does not affect the speed of the storefront. All the work happens before the visitor arrives.
One thing to check: a collection page shows the saved order when its sorting is left at the collection's default. If your theme offers visitors a "sort by" menu, their choice still overrides it for their visit, as it should.
What an app needs from you
To read your catalog and write an order, an app needs Admin API access with these kinds of permission:
- Read products, to know your products, variants, stock and collections.
- Write products. This is the permission Shopify requires for reordering a collection's products, even though no product is edited.
- Read orders, if sales are counted from your orders.
It is worth asking any sorting app what it writes. The honest answer for a pure sorting tool is short: the order of products in collections, and the sort mode of a collection when it has to be switched to manual.
How Merchandiser uses it
Merchandiser's Shopify integration works exactly this way.
- It reads your active, published products with their variants, the collections they belong to and their metafields, and counts sales from your orders. Views, add-to-carts, revenue and conversion rate come from Google Analytics 4.
- It calculates the order of each collection with a sorting rule or with Merchandiser AI, keeping your pins in place.
- It saves that order on the collection, and switches a collection to manual sorting when it first applies an order to it.
- It does not change your products, prices, stock, orders or theme.
Each collection is re-sorted on its own schedule; see How Often Should a Collection Be Re-Sorted?
Before you automate
- List the collections that matter. Sorting every collection is possible; start with the ones that carry traffic.
- Note which are sorted automatically by Shopify today. They will become manually sorted collections.
- Check the size data. If sizes are variants with their own stock, size availability can be calculated and used in the sort. See Size-Broken Products.
- Decide the rule per collection. New arrivals, clearance and core categories usually need different ones; Sorting Rules vs. AI Ranking covers the choice.
- Preview before applying. Look at the order a rule produces before it reaches the store.