Preorder metafields
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.)
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.
| Level | Owner | Holds | Key metafields |
|---|---|---|---|
| Shop (offer config) | Shop | The full config of every enabled offer — button text, shipping copy, limits — and each offer's variant_ids | selling_plans |
| Variant | Product variant | Which offers apply to this variant + live preorder state | selling_plan_ids, preorder_count, preorder_max_count, shipping_text |
| Market | Product variant | Per-market preorder counts and limits (for market-scoped offers) | market_preorder_count, market_preorder_max_count |
Is this variant preorderable?
- 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'svariant_idsin the shop-levelselling_plans.) - Look that plan up in the shop-level
selling_plansto get its display copy — button text, shipping text, limits. - For quantity limits, read the variant's
preorder_count/preorder_max_count— or the market-keyedmarket_preorder_count/market_preorder_max_countfor market-scoped offers.
In short: render decisions come from variant-level metafields; display copy comes from the shop-level offer config.
Reference
- Shop-level metafields — the
selling_plansoffer config. - Variant-level metafields —
selling_plan_ids, counts, and per-variant overrides. - Market-level metafields — per-market counts and limits.
