Days of inventory remaining
Easily spot which products are in critical, low, moderate, or healthy overall inventory supply based on sales demand during the last 30 days. Combine with SKU coverage to get the full picture to optimize your restocking decisions.
The days of inventory remaining metric estimates how long a product's inventory will last based on sales trends over the last 30 days and provides insights into stock depletion risks.
Only inventory-tracked variants are included and only inventory from locations that have been assigned to fulfill online orders are included in the calculation per variant. The calculation for the metafield on your product is a weighted average of the number of days of inventory remaining across your variants, with priority for fast-selling, low-inventory variants.
The actual days of inventory remaining (e.g. 3.75
) is rounded down to the nearest whole number (e.g. 3
) and assigned one of these values based on the number of whole days remaining:
- Urgent = estimated 0-1 days of inventory, action needed immediately; stock could run out today or tomorrow
- Critical = estimated 2-5 days of inventory, requires restocking within the next few days to avoid stockouts
- Low = estimated 6-10 days of inventory, restock within the next week to prevent gaps in availability
- Moderate = estimated 11-20 days of inventory, restock within the next few weeks, depending on your lead time
- Healthy = estimated 21+ days of inventory, inventory is sufficient for now; restock only if expected sales increase
As a merchant you can now:
- Filter products by remaining inventory days to identify risks early and prioritize restocking.
- Combine filters with SKU coverage for a full picture of stock health if you have multiple variants.

Details
- Name
espresso.inventory_remaining
- Description
Metafield namespace and key
- Name
metaobject_reference
- Description
Metafield type. Using a metaobject reference instead of just a number allows for a better filtering experience in Shopify Admin.
- Name
product
- Description
Scope of Shopify object that owns the metafield
Example content
{
"value": "low",
"label": "6-10 days of inventory"
}
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
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
- Name
inventoryRemaining
- Description
One of "urgent", "critical", "low", "moderate", "healthy"
Example content
{
"product": "gid://shopify/Product/47953429430610",
"inventoryRemaining": "critical"
}