Best selling product (30 days)

Automatically have each of the top-n most ordered products from the last 30 days flagged as a best-seller. Use it to highlight the best selling products in your store or build a live updated smart collection to show your customers what's moving fast.

This metafield is automatically set for products that are in the top 10, 20, 30 or 50 (by quantity) products ordered in the past 30 days. If the product is outside the top-n (or no orders in the past 30 days mention the product), 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
    product
    Description

    Scope of Shopify object that owns the metafield

When you initially enable this metafield, the individual product 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

  • Name
    isBestSeller
    Description

    A boolean indicating if the product is a best seller (true or false)

Example content

{
    "product": "gid://shopify/Product/47953429430610",
    "isBestSeller": true
}

Was this page helpful?