Shopify Storefront cart attributes and notes via cartAttributesUpdate and cartNoteUpdate

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. Use cartAttributesUpdate to attach an array of AttributeInput objects (key-value string pairs) to the cart; these flow through to the resulting order's attributes.
  2. Use cartNoteUpdate to set a free-text note on the cart that will appear on the resulting order as the order note.
  3. Keep attribute keys namespaced (e.g., prefixed with your app name) to avoid collisions with other integrations writing to the same cart.
  4. Read cart.attributes and cart.note back in the mutation response to confirm the values were stored.
  5. Query these fields later by fetching the cart by ID using the cart query to verify persistence across sessions.
  6. Consult current Shopify docs for any length limits on note text and the maximum number of attribute key-value pairs allowed per cart.

Known gotchas

Related routes

Shopify Storefront API cartCreate and cartLinesAdd mutations
shopify.dev · 6 steps · unrated
Shopify Storefront cart discount codes via cartDiscountCodesUpdate
shopify.dev · 6 steps · unrated
Apply cart attributes and metafields in a Shopify Checkout UI Extension using applyAttributeChange
ecommerce-ops · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans