Playbook · Storefront API cart metafield blank
Shopify Storefront API cart metafield blank? Prove the cart owner, write path, and one cart query.
Written for a Shopify DTC owner whose Storefront API cart metafield is null or omitted on cart / cartCreate responses while product metafields or Admin cart notes look fine. Start with Cart-owned definition, cart GID, cartMetafieldsSet vs attributes, and one GraphQL selection—not with a Hydrogen rewrite. This is distinct from Storefront API metafield blank (product/shop owners) and from cart attributes not saving.
Nico at Latch AI Ops · Sep 17, 2026 · ~10 minute read
Buy the 72-hour install — $997SF API versionCart noteMerchant FAQ
01
A blank cart metafield is not a blank product Storefront field.
Use this page when Storefront API cart requests succeed but a Cart-owned metafield is null, omitted, or never written. If the miss is on product, variant, or shop in Storefront GraphQL, use Storefront API metafield blank. If buyers only lose note/attribute lines at checkout, stay on the cart attributes / note playbooks.
Capture cart GID (or token), API version, namespace.key, write mutation used, and one response fragment before rotating storefront tokens.
02
Prove Cart definition ownership and the exact cart GID.
In Settings → Custom data, confirm the definition owner is Cart (not Product or Customer). Record exact namespace.key and type. Soft-link Storefront API version metafield missing when the field only appears after an API version bump.
Confirm the cart GID in the client matches the cart you mutate. A stale browser cart token against a new cartCreate looks like a blank metafield.
03
Check cartMetafieldsSet separately from attributes and note.
Cart attributes and cart note are not metafields. If the app only calls cartAttributesUpdate or sets note, a metafields selection will correctly return null. Use cartMetafieldsSet (or the documented write for your API version) with the same namespace.key, then re-query.
Save a short reversible test value. If the write mutation errors on access or type, fix definition/access before blaming Hydrogen cart loaders. Keep tokens out of screenshots.
04
Inspect one cart query selection and the raw JSON.
Select metafield(namespace: "…", key: "…") { value type } or an explicit metafields list on the same cart. Classify: omitted from the query, node null, empty string, present in JSON but dropped by the client, or never written.
Do not conflate this with Online Store Liquid cart properties. Storefront API cart metafields and theme line-item properties are different surfaces.
05
Retest one cart and keep a small proof packet.
Create or refresh one cart, write once, query once. Record API version, cart GID, namespace.key, write mutation result, raw query JSON, and client render. Rebuild loaders only after that packet exists.
Classify the miss as wrong owner, attributes-vs-metafield confusion, write failure, query selection, stale cart token, or client parse. Keep it separate from product Storefront blanks and checkout UI extension metafield blanks.
06
When to stay DIY vs pay $997.
Stay DIY when one definition, write mutation, cart token, or query selection explains the blank. Keep the proof packet so future Storefront cart changes stay reversible.
Pay for the $997 one-time install when several Shopify surfaces, headless carts, apps, and ops alerts need to be wired and documented on one live store. Nico at Latch AI Ops can connect the agreed workflow in a 72-hour window after collaborator access. No earnings claim, conversion guarantee, or theme rebuild is included; owner passwords are not requested.