Skip to main content
Stockful writes 11 metafields to Shopify - 7 at the variant level and 4 at the product level. All metafields have public_read storefront access and are available in Liquid, the Storefront API, and the window.stockful JavaScript API.

Namespace

All metafields use the namespace app--326028230657--stockful.

Variant metafields

These are written to each ProductVariant and reflect per-variant inventory data.

stock_status

Current stock status for this variant.
PropertyValue
Keystock_status
Typesingle_line_text_field
Possible valuesin_stock, low_stock, out_of_stock
Update frequencyReal-time (within seconds of inventory change)
Internally, Stockful also tracks an “overstock” status for merchant analytics - but on the storefront this is normalized to in_stock since customers don’t need to know a product is overstocked.
{% assign status = product.selected_or_first_available_variant.metafields.app--326028230657--stockful.stock_status.value %}

{% if status == "low_stock" %}
  <span class="badge badge--warning">Low Stock</span>
{% elsif status == "out_of_stock" %}
  <span class="badge badge--danger">Out of Stock</span>
{% endif %}

days_of_supply

Estimated number of days until this variant runs out of stock, based on current sell-through velocity.
PropertyValue
Keydays_of_supply
Typenumber_integer
Range0 to 999+ (null if velocity is zero)
Update frequencyDaily
{% assign days = product.selected_or_first_available_variant.metafields.app--326028230657--stockful.days_of_supply.value %}

{% if days and days <= 7 %}
  <span>Only {{ days }} days left!</span>
{% endif %}

velocity_trend

Sales velocity classification based on ABC analysis and sell-through rate.
PropertyValue
Keyvelocity_trend
Typesingle_line_text_field
Possible valuesselling_fast, steady, slow
Update frequencyDaily
  • selling_fast - ABC class A (top 80% of revenue) with positive velocity
  • steady - ABC class B (next 15% of revenue) with positive velocity
  • slow - ABC class C (bottom 5%) or no measurable velocity
{% assign trend = product.selected_or_first_available_variant.metafields.app--326028230657--stockful.velocity_trend.value %}

{% if trend == "selling_fast" %}
  <span class="badge badge--purple">Selling Fast</span>
{% endif %}

projected_stockout

The estimated date when this variant will be out of stock, in ISO 8601 format.
PropertyValue
Keyprojected_stockout
Typesingle_line_text_field
FormatISO 8601 date (e.g. 2026-05-15) or null
Update frequencyDaily
{% assign stockout = product.selected_or_first_available_variant.metafields.app--326028230657--stockful.projected_stockout.value %}

{% if stockout %}
  <span>Expected to sell out by {{ stockout | date: "%B %d" }}</span>
{% endif %}

abc_class

Revenue-based classification of this variant using ABC analysis.
PropertyValue
Keyabc_class
Typesingle_line_text_field
Possible valuesA, B, C
Update frequencyDaily
  • A - Top 80% of revenue (your best sellers)
  • B - Next 15% of revenue
  • C - Bottom 5% of revenue
{% assign abc = product.selected_or_first_available_variant.metafields.app--326028230657--stockful.abc_class.value %}

{% if abc == "A" %}
  <span class="badge badge--gold">Best Seller</span>
{% endif %}

restock_status

Whether new stock is expected for this variant.
PropertyValue
Keyrestock_status
Typesingle_line_text_field
Possible valuespending, needed, none
Update frequencyDaily
  • pending - Incoming stock has been recorded (purchase order or transfer in transit)
  • needed - Stock is at or below reorder point and no incoming stock is recorded
  • none - No restock action required
{% assign restock = product.selected_or_first_available_variant.metafields.app--326028230657--stockful.restock_status.value %}

{% if restock == "pending" %}
  <span>Restock on the way</span>
{% elsif restock == "needed" and stock_status == "out_of_stock" %}
  <span>Back in stock soon</span>
{% endif %}

sold_last_30d

Total units sold for this variant across all locations in the past 30 days.
PropertyValue
Keysold_last_30d
Typenumber_integer
Range0+
Update frequencyDaily
{% assign sold = product.selected_or_first_available_variant.metafields.app--326028230657--stockful.sold_last_30d.value %}

{% if sold and sold > 50 %}
  <span>{{ sold }} sold in the last 30 days</span>
{% endif %}

Product metafields

These are written to the Product and aggregate data across all variants.

stock_status (product)

The worst stock status across all variants of this product.
PropertyValue
Keystock_status
Typesingle_line_text_field
Possible valuesin_stock, low_stock, out_of_stock
Update frequencyReal-time
The “worst” status means: if any variant is out_of_stock, the product is out_of_stock. If any variant is low_stock (and none are out), the product is low_stock.
{% assign status = product.metafields.app--326028230657--stockful.stock_status.value %}

{% if status == "out_of_stock" %}
  <div class="product-card__badge">Out of Stock</div>
{% elsif status == "low_stock" %}
  <div class="product-card__badge">Low Stock</div>
{% endif %}

low_stock_variant_count

Number of variants that are low_stock or out_of_stock.
PropertyValue
Keylow_stock_variant_count
Typenumber_integer
Range0+
Update frequencyReal-time
{% assign low = product.metafields.app--326028230657--stockful.low_stock_variant_count.value %}

{% if low and low > 0 %}
  <span>{{ low }} {{ low | pluralize: 'variant', 'variants' }} running low</span>
{% endif %}

velocity_trend (product)

The dominant velocity trend across all variants, weighted by ABC classification (A-class variants carry more weight).
PropertyValue
Keyvelocity_trend
Typesingle_line_text_field
Possible valuesselling_fast, steady, slow
Update frequencyDaily
{% assign trend = product.metafields.app--326028230657--stockful.velocity_trend.value %}

{% if trend == "selling_fast" %}
  <div class="product-card__badge product-card__badge--trending">Trending</div>
{% endif %}

total_sold_30d

Sum of units sold across all variants in the past 30 days.
PropertyValue
Keytotal_sold_30d
Typenumber_integer
Range0+
Update frequencyDaily
{% assign total = product.metafields.app--326028230657--stockful.total_sold_30d.value %}

{% if total and total > 100 %}
  <span>{{ total }}+ sold recently</span>
{% endif %}