Last sold
Keep a product metafield updated with details from the latest order. Use it to display engaging details like how recently it was purchased or where the order was placed from. This adds transparency and social proof to your product listings.
This metafield is live updated with curated details from the latest order for the product as seen in orders during the past 60 days. If no orders in the past 60 days mention the product, the metafield is deleted.
Details
- Name
espresso.last_sold
- Description
Metafield namespace and key
- Name
json
- Description
Metafield type
- Name
product
- Description
Scope of Shopify object that owns the metafield
Example content
{
"created_at": "2025-01-02T15:50:00Z",
"billing_address": {
"city": "Sydney",
"province": "New South Wales",
"province_code": "NSW",
"country": "Australia",
"country_code": "AU"
}
}
When you initially enable this metafield, the individual product metafields will be set in a background task. If you have a large catalog, this may take anywhere from a few minutes to a few hours. Once the metafields are set, they will be updated in real-time
Example implementation
{% assign last_sold = product.metafields.espresso.last_sold.value %}
{% if last_sold %}
<p>
This product was most recently ordered on {{ last_sold.created_at | date: '%B %d, %Y' }}. from {{ last_sold.billing_address.country }}.
</p>
{% endif %}