Skip to main content
Stockful can write live inventory data to Shopify metafields and expose a JavaScript API for theme developers - giving you stock status badges, urgency messaging, location availability, and more, all without writing backend code.

What you get

11 metafields

7 variant-level + 4 product-level metafields written daily and updated in real time

Theme blocks

Drop-in badge and location availability blocks - no code required

Developer API

window.stockful JavaScript API for custom integrations

Code examples

Copy-paste Liquid and JavaScript snippets for common patterns

Quick start

1. Enable storefront data

Go to Settings > Storefront in the Stockful app and toggle Enable storefront data. Choose which metafields to sync.

2. Activate the app embed

In your Shopify admin, go to Online Store > Themes > Customize. Open the App embeds panel and enable Stockful.

3. Add blocks to your product page

Still in the theme editor, navigate to your product template. Click Add block and choose:
  • Stockful Badge - shows stock status, urgency, and social proof
  • Stockful Location Availability - “Check store availability” button with a drawer

4. Customize (optional)

Each block has settings for shape, colors, and display options. For advanced customization, read the data reference and build your own Liquid templates using metafields directly.

How data flows

Inventory change
  → Stockful processes change
  → Metafields written to Shopify (real-time for status, daily for analytics)
  → Available via Liquid, Storefront API, and window.stockful
Real-time updates: stock_status metafields update within seconds of an inventory change. Daily sync: Analytics metafields (days of supply, velocity, sold count, etc.) sync once per day as part of the daily analytics run.

Accessing metafields

Stockful’s metafield namespace is app--326028230657--stockful. Use this in your Liquid templates and Storefront API queries.

In Liquid

{{ product.metafields.app--326028230657--stockful.stock_status.value }}

In the Storefront API (headless)

query ProductWithStock($handle: String!) {
  product(handle: $handle) {
    stockStatus: metafield(namespace: "app--326028230657--stockful", key: "stock_status") {
      value
    }
    totalSold: metafield(namespace: "app--326028230657--stockful", key: "total_sold_30d") {
      value
    }
  }
}