Home
Theme & Metafields

Preorder metafields

Which preorder data lives at the shop (offer) level vs the variant level vs the market level — and how to read each.

STOQ writes preorder configuration and live state to Shopify metafields in the restockrocket_production namespace, so a theme or headless storefront can render preorder UI directly. (Preorder offers in the dashboard are selling plans in the data.)

Note

Building headless or Hydrogen? The Storefront SDK reads all of these for you and answers "is this variant preorderable, and with which plan?" — you rarely need to parse metafields by hand. This page is the underlying contract.

Which level holds what

The most common point of confusion: an offer's configuration is stored once at the shop level — not on each variant. What lives on the variant is which offer applies and the live counts.

LevelOwnerHoldsKey metafields
Shop (offer config)ShopThe full config of every enabled offer — button text, shipping copy, limits — and each offer's variant_idsselling_plans
VariantProduct variantWhich offers apply to this variant + live preorder stateselling_plan_ids, preorder_count, preorder_max_count, shipping_text
MarketProduct variantPer-market preorder counts and limits (for market-scoped offers)market_preorder_count, market_preorder_max_count

Is this variant preorderable?

  1. Read the variant's selling_plan_ids — non-empty means it's attached to one or more offers. (Equivalently, the variant's id appears in an enabled offer's variant_ids in the shop-level selling_plans.)
  2. Look that plan up in the shop-level selling_plans to get its display copy — button text, shipping text, limits.
  3. For quantity limits, read the variant's preorder_count / preorder_max_count — or the market-keyed market_preorder_count / market_preorder_max_count for market-scoped offers.

In short: render decisions come from variant-level metafields; display copy comes from the shop-level offer config.

Reference