The urgency bar is a low-stock indicator on the product page. When inventory drops at or below the threshold, customers see a progress bar with the remaining count, like "Only 3 left in stock".

It uses real Shopify inventory data. No fake scarcity, no reset, no loop.

Quick setup

  • Create metafield: custom.show_urgency on Products, type True or false.
  • Set threshold: in theme editor → Product section → Low stock threshold (default 10).
  • Toggle per product: open a product → Metafields → Show Urgency → True.

Where it appears

Product page (PDP) only. Not in featured product, variant quick-view, or product cards.

Step 1: Create the metafield definition

One-time setup per store.

  1. Admin → Settings > Custom data > Products.
  2. Click Add definition.
  3. Name: Show Urgency
  4. Namespace and key: custom.show_urgency
  5. Type: True or false
  6. Save.

Step 2: Set the threshold

  1. Online Store > Themes > Customize.
  2. Open the Default product template.
  3. Click Product information section.
  4. Under Inventory, set Low stock threshold (default 10).
  5. Save.

Step 3: Enable on a product

  1. Open the product in Admin.
  2. Scroll to Metafields.
  3. Toggle Show Urgency to True.
  4. Save.

How it behaves

Inventory state Display
Above threshold "In stock" indicator
At or below threshold (above zero) Urgency bar with count
Zero "Out of stock" indicator
Variant change Re-evaluates and updates

Things to know

  • Requires Shopify inventory tracking on the variant. No tracking = no urgency bar.
  • Threshold is template-level. Metafield is per-product.
  • Bar text comes from your locale files (Content > Languages > urgency strings).
  • Use bulk metafield editor or CSV import to enable on many products at once.