Generate Daily Product Rankings Based On Sales Data
Keep your best-selling products front and center with daily sales-based rankings. This template crunches your sales numbers every 24 hours, gives each product a numbered rank, and shuffles your collection order to showcase what's hot right now. Note: This template requires the Store Shopify Orders in a Database template to be installed and connected.
Trusted by 1,000+ Shopify merchants — from solo operators to scaling brands.

How it works
10 steps to start generating daily product rankings from sales data automatically
Schedule
Schedule
Setup Variables
Setup Variables
Custom SQL Query (Sales Analysis)
Custom SQL Query (Sales Analysis)
Get List of Products from Best Sellers Collection
Get List of Products from Best Sellers Collection
Loop over Products in Best Sellers Collection
Loop over Products in Best Sellers Collection
Set Best Sellers Index Product Metafield to 0
Set Best Sellers Index Product Metafield to 0
Loop over Best Selling Products
Loop over Best Selling Products
Retrieve Product
Retrieve Product
Set Best Sellers Index Product Metafield By Order
Set Best Sellers Index Product Metafield By Order
Sort Products in Best Sellers Collection
Sort Products in Best Sellers Collection
*Required: The following must be used with this workflow.
Ready to start generating daily product rankings from sales data automatically
Get setup in 12 minutes.
Frequently asked questions
How do I change the time period for rankings?
Edit the "Setup Variables" transform step and change the "Days Back" value in the mapping. For example, set to 7 for weekly rankings, 30 for monthly, or 90 for quarterly best-sellers.
Can I display the ranking number on product pages?
Yes, the best_sellers_index metafield can be accessed in Shopify themes. Use Liquid like {{ product.metafields.custom.best_sellers_index }} to display the ranking, or create conditional logic to show "#1 Best Seller" badges.
What happens to products that drop out of the top rankings?
They remain in the collection with their ranking metafield set to 0 (from the reset step). To automatically remove dropped products, you'd need to add logic that compares the current collection to the new rankings and removes products not in the top N.
Make this template your own!
Customize this workflow even further:
You're in good company
"MESA has been a game changer for us. And, if you ever get stuck, their support team is always super helpful."
"It's like Zapier but exactly designed for Shopify. I have been able to complete all the workflows that I've needed."
"The MESA team has been amazing at helping us set up our automations. We would highly recommend this app!"
Ready to start generating daily product rankings from sales data automatically?
7-day free trial • 12 min setup • Cancel anytime
Need help? Our automation experts will help you personalize this workflow for free. Contact support
