Variant daily sold quantity

Keep a variant metafield updated with the number of units sold each day. Resets daily. Use it to display real-time demand, create urgency, or trigger automated workflows in Shopify Flow. Perfect for optimizing inventory and boosting conversions!

This metafield is live updated with accumuluated quantity of ordered variants as orders come in during the day (the 'day' being with respect to the shop's defined timezone). The quantity automatically resets as the day changes and either a new order comes in or there is no order for the day (meaning the day's quantity is reset to 0).

Details

  • Name
    espresso.daily_sold_quantity
    Description

    Metafield namespace and key

  • Name
    number_integer
    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. 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
    id
    Description

    The variant id

  • Name
    date
    Description

    The date for the daily sold quantity (in ISO 8601 format)

  • Name
    quantity
    Description

    The updated daily sold quantity

  • Name
    quantityFrom
    Description

    The value of the daily sold quantity before the update. Will be 0 for the first trigger of the day

  • Name
    product
    Description

    A reference to the product that owns the variant

Example content

{
    "id": "gid://shopify/ProductVariant/47953429430610",
    "date": "2025-02-14",
    "quantity": 123,
    "quantityFrom": 120,
    "product": "gid://shopify/Product/47953429430610"
}

See also

Was this page helpful?