Best selling variant (30 days)
Automatically rank the top-n most ordered variants from the last 30 days. Use it to highlight the best selling variants in your store or build a live updated smart collection to show your customers what's moving fast.
This metafield is automatically set for variants that are in the top 10, 20, 30 or 50 (by quantity) variants ordered in the past 30 days. If the variant is outside the top-n (or no orders in the past 30 days mention the variant), the metafield is deleted. The number of orders considered is capped to be the latest 10,000 orders within the past 30 days.
Details
- Name
espresso.best_selling_30_days
- Description
Metafield namespace and key
- Name
boolean
- Description
Metafield type
- Name
variant
- Description
Scope of Shopify object that owns the metafield
When you initially enable this metafield, the individual variant metafields will be set in a background task. If you have a large number of orders in the past 30 days, this may take anywhere from a few minutes to a few hours. Once the metafields are set, they will be updated in real-time
Flow trigger
Updates to this metafield fires a trigger that can used to start a Shopify Flow workflow.
- Name
product
- Description
A reference to the product being updated (where the variant is part of)
- Name
id
- Description
The variant id
- Name
isBestSeller
- Description
A boolean indicating if the variant is a best seller (true or false)
Example content
{
"product": "gid://shopify/Product/47953429430610",
"id": "gid://shopify/ProductVariant/876244311112",
"isBestSeller": true
}