Skip to main content
object

Requires read_cart_transforms access scope.

A deployed cart transformation function that actively modifies how products appear and behave in customer carts. Cart transforms enable sophisticated merchandising strategies by programmatically merging, expanding, or updating cart line items based on custom business logic.

Use the CartTransform object to:

  • Monitor active bundling and cart modification logic
  • Track transform function deployment status and configuration
  • Manage error handling behavior for cart processing failures
  • Coordinate multiple transforms when running complex merchandising strategies
  • Analyze transform performance and customer interaction patterns

Each cart transform links to a specific Shopify Function that contains the actual cart modification logic. The blockOnFailure setting determines whether cart processing should halt when the transform encounters errors, or whether it should allow customers to proceed with unmodified carts. This flexibility ensures merchants can balance feature richness with checkout reliability.

Transform functions operate during cart updates, product additions, and checkout initiation, providing multiple touchpoints to enhance the shopping experience. They integrate seamlessly with existing cart APIs while extending functionality beyond standard product catalog capabilities.

The function ID connects to your deployed function code, while the configuration settings control how the transform behaves in different scenarios. Multiple transforms can work together, processing cart modifications in sequence to support complex merchandising workflows.

Learn more about customized bundles, and about the Cart Transform Function API.

Boolean!
non-null

Whether a run failure will block cart and checkout operations.

String!
non-null

The ID for the Cart Transform function.

ID!
non-null

A globally-unique ID.

Metafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

MetafieldConnection!
non-null

A list of custom fields that a merchant associates with a Shopify resource.


Was this section helpful?

query

Retrieves all cart transform functions currently deployed by your app within the merchant's store. This query provides comprehensive access to your active cart modification logic, enabling management and monitoring of bundling and merchandising features.

The query returns paginated results with full cart transform details, including function IDs, configuration settings, and operational status.

Cart Transform ownership is scoped to your API client, ensuring you only see and manage functions deployed by your specific app. This isolation prevents conflicts between different apps while maintaining security boundaries for sensitive merchandising logic.

Learn more about managing cart transforms.


Was this section helpful?

mutation

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.


Was this section helpful?


Was this section helpful?