Skip to main content
mutation

Requires write_cart_transforms access scope. Also: The shop must have upgraded to Checkout Extensibility and the user must have products and preferences permission to create a cart transform function.

Creates a cart transform function that lets merchants customize how products are bundled and presented during checkout. This gives merchants powerful control over their merchandising strategy by allowing apps to modify cart line items programmatically, supporting advanced approaches like dynamic bundles or personalized product recommendations.

For example, a bundle app might create a cart transform that automatically groups related products (like a camera, lens, and case) into a single bundle line item when customers add them to their cart, complete with bundle pricing and unified presentation.

Use CartTransformCreate to:

  • Deploy custom bundling logic to merchant stores
  • Enable dynamic product grouping during checkout
  • Implement personalized product recommendations
  • Create conditional offers based on cart contents
  • Support complex pricing strategies for product combinations

The mutation processes synchronously and returns the created cart transform along with any validation errors. Once created, the cart transform function becomes active for the shop and will process cart modifications according to your defined logic. Cart transforms integrate with Shopify Functions to provide powerful customization capabilities while maintaining checkout performance.

Cart Transform functions can be configured to block checkout on failure or allow graceful degradation, giving you control over how errors are handled in the customer experience.

Learn more about customized bundles.

Boolean
Default:false

Whether a run failure should block cart and checkout operations.

String!
required

The identifier of the Function providing the cart transform.

[MetafieldInput!]
Default:[]

Additional metafields to associate to the cart transform.


Was this section helpful?

Anchor to CartTransformCreatePayload returnsCartTransformCreatePayload returns

CartTransform

The newly created cart transform function.

[CartTransformCreateUserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?