Product price history

Track and display how your variants' prices have changed over time. Use the history to show transparency and boost trust in your store.

This metafield automatically collects changes to prices, building up an array of dates and associated prices over time. When a change in a variant's price is detected, the current date and the changed price is used for a new (or updated) date/price entry. Details per entry are available in the details property, so multiple price changes within the same day can be shown.

The date used is the current date (no time part) as seen from the shop's time zone. The entries are always sorted by the date, ready for looping in Liquid, and can be used to show price development over time as seen in major outlets.

Details

  • Name
    espresso.price_history
    Description

    Metafield namespace and key

  • Name
    json
    Description

    Metafield type

  • Name
    variant
    Description

    Scope of Shopify object that owns the metafield

Example content

 [{
     "date": "2025-01-02",
     "price": 12.99,
     "details": [{
         "timestamp": "2025-01-02T09:00:00+00:00Z",
         "price": 11.99,
     },
     {
         "timestamp": "2025-01-02T11:00:00+00:00Z",
         "price": 12.99,
     }]
 },
 {
     "date": "2025-01-09",
     "price": 9.99,
     "details": [{
         "timestamp": "2025-01-09T09:00:00+00:00Z",
         "price": 9.99,
     }]
 },
 {
     "date": "2025-03-24",
     "price": 10.99,
     "details": [{
         "timestamp": "2025-03-24T09:00:00+00:00Z",
         "price": 10.99,
     }]
 }]

Was this page helpful?