Unlock Dynamic Bestsellers: How to Create Time-Sensitive Collections on Shopify for Smarter Marketing

Hey there, fellow store owners! As a Shopify expert who spends a lot of time digging into what makes your businesses tick (and sometimes scratch your heads!), I often find the most valuable insights come directly from you in the community forums. It’s where real-world problems meet creative solutions, and that’s exactly what happened in a recent thread that caught my eye.

The discussion started with a fantastic feature request from Nataliya at Loja Style Me, a fashion merchant. She hit on a pain point many of you with seasonal inventory or fast-moving trends can relate to: the struggle with Shopify’s default “Best Selling” collection sort order.

The Challenge: When "Best Selling" Isn't Always Best

Nataliya articulated it perfectly. While Shopify lets us create automated collections based on things like price, tags, or inventory, and even sort them by “Best Selling,” there’s a big catch. This sorting typically considers your store’s entire historical sales data. For a fashion brand like Loja Style Me, this means their dynamic ads on platforms like Meta Ads or Google Shopping could end up pushing dresses from last summer, or winter coats when spring is in full bloom. It’s not just inefficient; it’s a waste of ad spend and a poor customer experience.

What Nataliya really needed, and what many of you have probably wished for, was the ability to create automated collections sorted by “Best Selling within X days” – think the last 30, 60, or 90 days. Imagine the power of automatically showcasing your current hottest items, not just your all-time greats! This would mean hyper-relevant products directly syncing to your ad channels, boosting efficiency without relying on what she called “expensive, buggy third-party apps.”

The Community Steps Up: A Clever Shopify Flow & Reports Workaround

While Nataliya’s request for a native feature is absolutely valid (and something we hope Shopify considers!), the beauty of the community is often in the ingenious workarounds. A fellow merchant, tim_tairli, jumped in with a brilliant solution that leverages existing Shopify tools: Shopify Analytics Reports and the free Shopify Flow app.

He’d already implemented this for his own store, proving it’s not just theoretical. This approach allows you to define what “best-selling” means to you, over a specific timeframe, and then automatically populate a collection with those products. Let’s break down how you can set this up for your own store.

Step-by-Step: Creating Dynamic Time-Based Bestseller Collections

This method requires two key Shopify features: your store’s Analytics Reports and the Shopify Flow app. If you haven’t explored Flow yet, this is a fantastic reason to dive in – it’s incredibly powerful for automating tasks.

What You'll Need:

Step 1: Craft Your Custom Bestsellers Report in Shopify Analytics

First, we need to tell Shopify exactly what products qualify as “bestsellers” for your desired timeframe. This is done through a custom report. Shopify’s reporting system is quite flexible, allowing you to query your sales data with precision.

  1. Go to your Shopify Admin and navigate to Analytics > Reports.
  2. You’ll need to create a custom report. While there isn't a direct "create custom report from scratch" button for everyone, you can often start with a similar report (e.g., "Sales by product") and modify it, or use a tool that allows direct query input if available in your admin.
  3. The core of this solution lies in a specific Shopify Query Language (SQL-like) snippet. Here’s the query tim_tairli shared, which fetches the top 20 bestsellers from the last 30 days based on net items sold and gross sales:
FROM sales
  SHOW product_id, net_items_sold, gross_sales
  WHERE product_title IS NOT NULL
  GROUP BY product_title, product_id WITH TOTALS
  SINCE startOfDay(-30d) UNTIL today
  ORDER BY net_items_sold, gross_sales DESC
  LIMIT 20

Let's quickly break down this query:

  • FROM sales: We're looking at your sales data.
  • SHOW product_id, net_items_sold, gross_sales: We want to see the product identifier, how many units were sold, and the total revenue.
  • WHERE product_title IS NOT NULL: Ensures we only get valid products.
  • GROUP BY product_title, product_id WITH TOTALS: Aggregates sales data for each unique product.
  • SINCE startOfDay(-30d) UNTIL today: This is the magic! It restricts the data to the last 30 full days, making your bestsellers timeframe-specific. You can change -30d to -60d or -90d to adjust the window.
  • ORDER BY net_items_sold, gross_sales DESC: Sorts the results, prioritizing products with more units sold, then by higher gross sales.
  • LIMIT 20: Caps the list at your top 20 products. Adjust this number as needed.
  1. Save this report with a clear name, like “Last 30 Days Bestsellers.”

Step 2: Automate Collection Updates with Shopify Flow

Once your report is saved, Shopify Flow can tap into it and use the results to update a collection automatically.

  1. Open the Shopify Flow app from your Shopify Admin.
  2. Click “Create workflow” or “New workflow.”
  3. Set the Trigger: Choose “Scheduled time” as your trigger. You’ll want this to run daily to keep your collection fresh. Pick a time when your store traffic is typically low.
  4. Add an Action: After the scheduled trigger, you'll add an action to fetch your report data. Look for an action related to “Get report data” or similar (Flow's actions are constantly evolving, but it has robust reporting integrations). You’ll select the custom report you just created ("Last 30 Days Bestsellers").
  5. Add Another Action: Now, you need to tell Flow what to do with that data.
    • Create a new collection in your Shopify Admin (e.g., “Current Hottest Picks,” “Seasonal Must-Haves”). Make sure it’s an empty, manually managed collection to start.
    • In Flow, add an action like “Remove products from collection” for your target collection. This ensures the collection is cleared before new bestsellers are added, preventing old products from lingering.
    • Then, add another action: “Add products to collection.” For this action, you’ll dynamically feed it the product_ids from the report data you fetched. Flow is smart enough to map these.
  6. Activate Your Workflow: Give your workflow a descriptive name and turn it on!

Tim_tairli mentioned his flow runs daily and updates the collection every day, which is exactly what you want for truly dynamic, relevant collections.

Why This Solution Rocks (and Where a Native Feature Still Shines)

This Shopify Flow and Analytics combo is a powerful workaround. It directly addresses Nataliya’s need to push hyper-relevant, seasonal best-sellers to ad channels without investing in *yet another* third-party app. You're leveraging tools already integrated into the Shopify ecosystem.

It gives you incredible flexibility: want to see bestsellers by gross sales only? Or by profit margin? Or for a specific product type? You can tweak that query to your heart’s content. This level of customization is invaluable for targeted marketing.

Of course, a native Shopify feature would streamline this even further – fewer steps, less configuration, and perhaps more intuitive for merchants less comfortable with custom reports or Flow. It would also directly validate the common need for time-bound "best selling" criteria. But until then, this community-driven solution is a fantastic way to bridge that gap.

It’s a great reminder that sometimes the answers to our biggest challenges are already within reach, often hiding in plain sight within Shopify's powerful suite of tools, or shared by a helpful peer in the community. So, go ahead, give this a try, and make your marketing dollars work smarter for you! If you're not yet on Shopify and seeing this kind of flexibility, it's a great time to start your own Shopify store and tap into these powerful features.

Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools