NEWStoreClaw Ranks #1 Product of the Week on Product Hunt

Shopify Best Sellers Collection by Time Window: A 2026 Setup Guide

11 Min ReadBy StoreClaw Team

A Shopify best sellers collection sounds like it should update itself as trends shift, but the native sort only measures one thing: total orders since the product was first sold. This guide covers what that default shows, the Shopify Flow workflow that turns it into a rolling 7 or 30-day best sellers collection, and when a paid app is the more practical route instead.

What a Shopify Best Sellers Collection Shows by Default

Sorting any collection by Best Selling, either in the admin or through the storefront URL parameter sort_by=best-selling, ranks products by total order count going back to the day each product was published. There is no built-in setting for 7 days, 30 days, or any other window. A product that sold heavily during a launch six months ago can keep sitting at the top of a Shopify best sellers collection long after it stopped moving, while a product gaining traction this week stays buried under that older order count.

A concrete version of this problem shows up constantly in seasonal or trend-driven catalogs: a product that moved 400 units during a launch promotion in March still outranks a product that has sold 60 units in the past two weeks, even though the second product is clearly the one customers are responding to right now. The collection keeps showing March's winner because Shopify never stops counting it, and nothing in the native sort ever resets that count or weights recent orders more heavily than old ones.

This is not a bug or a hidden setting waiting to be found. It is how the native sort is built, and it is why a store with more than a few months of order history eventually needs one of the two paths below to get a collection that reflects recent sales rather than the whole catalog's history.

The same lifetime counting applies whether the collection pulls from the entire catalog or is scoped to a single category, such as a "Best Sellers in Outerwear" collection built from a tagged subset of products. Narrowing the collection to a category changes which products are eligible to appear, but it does not change how Shopify counts their orders. A category-scoped best sellers collection still ranks by all-time sales within that category, so the same March-launch product can still crowd out a newer one inside a narrower collection just as easily as it does in a storewide one.

Left panel: a calendar icon with a long bar spanning the full width, representing an all-time lifetime range. Right panel: a calendar icon with a short highlighted segment, representing a rolling time window

Two Ways to Get a Rolling Time Window

Closing the gap between lifetime sort and a rolling window comes down to two concrete paths, and which one fits depends more on order volume and comfort with Shopify's own automation tooling than on budget alone.

Building It Yourself With Shopify Flow

Shopify Flow, the automation builder included on most Shopify plans, can track when a product last sold and remove it from a collection once that window closes. It takes one metafield, one trigger, and a wait step to set up, and it runs inside Shopify with no separate subscription. The tradeoff is setup time and the need to rebuild the workflow if an order volume spike pushes past what a single Flow run can process.

Using a Dedicated App Instead

A collection-sorting app handles the same rolling-window logic without touching Flow, usually adding a lookback-period setting (commonly a dropdown for 7, 14, 30, or 60 days) and refreshing the ranking automatically on a schedule, often every few hours rather than once a day. Some also let a merchant weight recent sales more heavily than older ones instead of using a hard cutoff, which a basic Flow workflow does not do on its own. It costs a recurring fee and adds one more app to the store's stack, but it skips the setup work entirely and tends to hold up better once order volume gets large enough that a DIY Flow workflow needs active maintenance.

Flow itself is included on Basic, Shopify, and Advanced plans, but not every merchant has it enabled or has used it before, and a store on a legacy or heavily customized plan should confirm Flow access before planning around it. A dedicated app sidesteps that question entirely, since it installs independently of whatever automation tooling the store's plan already includes.

Setting Up the Flow Workflow, Step by Step

Before building this, a few things need to already be in place:

  • The Shopify Flow app installed and active on the store

  • Permission to create a new product metafield definition

  • An existing collection set up to add and remove products automatically through Flow actions, rather than a fully manual collection

Three connected square icon tiles showing a tag with a pencil mark, a shopping cart, and a clock with a circular arrow, representing the metafield, order trigger, and timed removal steps

Create the Last-Purchased-Date Metafield

Under Settings, Custom data, Products, add a new metafield definition with a Date and time type. Give it a clear namespace and key, such as custom.last_sold_at, since that exact name is what every later step in the workflow references. This field holds the most recent date a product sold, and it is what the rest of the workflow checks against before deciding whether a product still belongs in the best sellers collection.

Build the Order-Created Trigger and Add-to-Collection Step

Start a new workflow with the Order created trigger. For each line item on the order, add two actions: update that product's last-purchased-date metafield to the order's creation time, and add the product to the best sellers collection using the Add product to collections action. Every new order now both refreshes the timestamp and makes sure a newly selling product lands in the collection, not just products that were already there.

A couple of edge cases are worth building in deliberately rather than discovering later. If the store sells product variants rather than single standalone products, the line item's parent product, not the specific variant, is what needs the metafield update, since the collection itself holds products rather than individual variants. If a product gets unpublished or archived between the order and the later removal check, the removal step should still run without erroring; testing one archived-product scenario before relying on the workflow catches this early rather than after a live order triggers it unexpectedly.

Add the 30-Day Wait and Removal Step

After the add-to-collection action, insert a Wait step set to 30 days. Shopify Flow's current wait limit tops out at 90 days per workflow, so a 7 or 30-day window both fit comfortably within a single wait step, with no multi-stage workaround needed. Once the wait finishes, add a condition that checks whether the metafield still matches the timestamp this specific run wrote. If it matches, no newer order has come in since, so remove the product from the collection. If a newer order already updated the metafield, a separate run from that order is now the one tracking the clock, and this run simply ends without removing anything.

This timestamp-matching check is the part of the workflow that makes multiple orders for the same product behave correctly. Without it, a product selling every few days would get added and removed on overlapping schedules from several runs at once, occasionally dropping out of the collection between two of its own orders. Checking that the metafield still equals the exact value this run wrote, rather than just checking whether 30 days have passed, is what prevents that.

Running Two Windows at Once

A store that wants both a 7-day collection for a homepage carousel and a separate 30-day collection for a dedicated page needs two metafields, not one, since a single Date and time field can only represent one timestamp per product. The order-created trigger updates both metafields at the same time, each wait step runs on its own duration, and each wait step checks only its own metafield before removing a product from its matching collection. The two workflows run independently once set up, so a product dropping out of the 7-day collection has no effect on whether it is still inside the 30-day one.

Manually Pinned Products and Sort Order

A merchant who has manually pinned a specific product to the top of the collection, overriding the automatic sort for that one item, keeps that pin regardless of what the Flow workflow does underneath it. Flow only controls which products are members of the collection, adding and removing them based on the metafield check; it does not touch the display order those products appear in once they are members. A pinned product stays pinned even after the underlying sort data changes, and it still gets removed by the workflow once its own last-sold metafield falls outside the window, just like any other product in the collection. Treating the pin and the membership rule as two separate settings, rather than assuming one overrides the other, avoids confusion when a pinned product unexpectedly disappears because its own sales window closed.

Testing the Workflow Before It Runs on Live Orders

Running a workflow against a live order the first time it is active is a common way to discover a typo in a metafield name or a missing condition. A safer check is placing one test order, confirming the metafield updated to the correct timestamp, and confirming the product shows up in the collection, all before the wait step has even started. Temporarily shortening the wait step to a few minutes for that one test run, then changing it back to 30 days once the removal logic is confirmed working, catches most setup mistakes without waiting a full month to find out something was wrong.

DIY Flow vs. a Dedicated App: Which Fits

FactorShopify Flow (DIY)A Dedicated Collection-Sorting App
Setup time30-60 minutes for one metafield and one workflowMinutes; mostly choosing a lookback period in a settings panel
Ongoing costNone beyond the existing Shopify planA recurring subscription fee
MaintenanceNeeds a check-in if order volume grows enough to strain a single workflowHandled by the app's own infrastructure
FlexibilityFully custom logic, limited only by what Flow supportsLimited to whatever settings the app exposes

Neither path is the correct default for every store. A smaller catalog with light order volume gets a working rolling-window collection from the Flow workflow above without adding anything new to the monthly bill. A larger catalog running close to Flow's processing limits gets more reliability from a dedicated app, at the cost of an ongoing fee.

Order volume is the clearest signal for which side of that line a given store falls on. A store processing a few dozen orders a day rarely strains a single Flow workflow. A store processing hundreds of orders an hour, especially during a sale, is more likely to run into Flow's per-workflow processing limits, and that is usually the point where paying for a dedicated app starts costing less in time than it costs in subscription fees.

Cost over a full year is where the comparison tends to settle for most stores somewhere in between those two extremes. The Flow workflow costs nothing beyond the time spent building and occasionally checking on it, which makes it the cheaper option for as long as it keeps running without intervention. A dedicated app's monthly fee adds up over twelve months into a fixed, predictable cost, which some merchants prefer precisely because it replaces an unpredictable amount of occasional maintenance time with a flat line item that is easy to budget against.

Conclusion

A store still early in its order history, or one comfortable building a Flow workflow once and leaving it alone, gets more value from the DIY path above than from paying for a dedicated app. A store already running close to Flow's processing limits, or one that would rather not maintain a custom workflow, gets more reliability from an app instead. Either way, the lifetime-sort limitation covered at the start of this guide is the reason a Shopify best sellers collection needs one of these two fixes in the first place.

Once that collection is tracking recent sales instead of lifetime totals, the products sitting inside it still need their price and stock to stay accurate as orders keep coming in. StoreClaw can flag a listing in the collection whose price or inventory has drifted from what was recorded, with a shopify connector keeping that order and inventory data current as new sales come in. That monitoring job is separate from the merchandising setup covered above, not a replacement for it.

Make your store smarter with every cycle

Bring your store operations together with StoreClaw.

Frequently Asked Questions

No. The native Best Selling sort, including the sort_by=best-selling URL parameter, always ranks by total lifetime orders. A rolling window requires either the Shopify Flow workflow above or a dedicated app.

Up to 90 days per workflow as of this writing. A 7 or 30-day best sellers window fits well within that limit without needing multiple chained wait steps.

Yes. The workflow operates on collections and product metafields at the data level, not on theme templates, so it works the same way regardless of which theme displays the collection.

Its metafield gets updated to the new order's timestamp by that order's own workflow run. The earlier run's removal check then finds a mismatched timestamp and ends without removing the product, since a more recent sale is now the one keeping it in the collection.

No. This is a technical merchandising setup guide. Shopify Flow's exact features, limits, and plan availability can change; confirm current behavior in Shopify's own documentation before building a workflow that a live store depends on.