{"id":"c81398b3-b4c9-433e-b0ff-6af8ac332092","task":"Build a Shopify cartTransform Function using the merge operation to group multiple compatible cart lines into a single bundle parent presentation","domain":"shopify.dev","steps":["Scaffold a cartTransform Function at API version 2025-07; the merge operation uses the `linesMerge` operation name in this version","In `run.graphql`, query all cart lines with merchandise IDs and any attributes or metafields that identify which lines should be grouped into a bundle","In your Function run handler, identify sets of cart lines that form a complete bundle (e.g., a specific combination of SKUs) and return a `MergeOperation` (called `linesMerge` in 2025-07+) for each group","Provide the `parentVariantId` of the bundle parent product that should represent the merged group in cart, along with a `price` override if needed","Return all non-merged cart lines unchanged in your output to avoid inadvertently removing unrelated items","Validate the merge output in a development store: the grouped lines should collapse into a single parent cart line with the correct quantity and price"],"gotchas":["In API version 2025-01 the operation is called `merge`, but in 2025-07 it was renamed `linesMerge` — use the version-appropriate name or you will get a schema validation error","Merge operations cannot set a fixed price directly; as of mid-2025 this requires chaining a separate update operation, and the Shopify roadmap for direct merge pricing is tracked in a public GitHub discussion","Selling plans on any of the source lines will cause the merge operation to be rejected; ensure source lines have no selling plan before attempting a merge"],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:30.178Z"},"url":"https://mcp.waymark.network/r/c81398b3-b4c9-433e-b0ff-6af8ac332092"}