Skip to content

Preorder metafields

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

Last updated

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.)

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
  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.

Was this page helpful?

Still stuck? Ask Quinn or chat with support