commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Store Cart → Merge Cart in Store

AI-generated

Summary

Merge an anonymous cart into a customer's existing store cart in a specified commercetools store.

Inputs

  • Store Cart Key (required) — The key of the customer's cart in the store to merge into.
  • Customer ID (required) — The ID of the customer who owns the target store cart.
  • Store Key (required) — The key of the store where both carts exist.
  • Anonymous Cart › Type Id — The type ID of the anonymous cart to merge from.
  • Anonymous Cart › Id — The ID of the anonymous cart to merge from.
  • Merge Mode (required) — Defines how the carts are merged (e.g., combining line items).
  • Update Product Data (required) — Whether or not to update product data during the merge.

Output shape

a single JSON object representing the merged cart returned by the commercetools API

The operation returns the combined cart as a JSON object after merging. Errors in the merge process will raise node errors unless 'Continue On Fail' is enabled.

Links

Discussion