Build a Shopify cartTransform Function using the expand operation to display bundled component items from a single parent cart line
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
Scaffold a new cartTransform Function with `shopify app generate extension --type cart_transform` and set the API version to 2025-07 or later
In `run.graphql`, query the cart lines you want to expand, including the merchandise ID and any metafield flags that identify bundle parent lines
In your Function's `run` entry point, return an `ExpandOperation` for each bundle parent line: set `expandedCartItems` to an array of component merchandises with their quantities and optional fixed prices
Set the `image` and `title` override on each expanded item if you want components to display with custom presentation in the cart UI
Deploy with `shopify app deploy`; the Function target is `cart.transform` — confirm it appears in the Partner Dashboard under Extensions
Test on a development store by adding a bundle product to cart and inspecting that the expanded components appear as separate line items
Known gotchas
Expand operations are rejected by Shopify if a selling plan is attached to the parent line — bundle expansion and subscriptions cannot be combined on the same line item
Fixed pricing on expanded components requires API version 2024-01 or later; earlier versions treat all component prices as derived from the parent
The update operation (price adjustment) requires a Shopify Plus plan or development store; expand and merge do not have this restriction
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?