Skip to main content

cartSetCustomer

Associate a customer with an existing cart.

Links a customer account to the cart for personalized pricing, customer-specific terms, and individual customer order processing. This enables B2C functionality and customer-based cart features.

Possible errors:

  • CART_NOT_FOUND_ERROR: Cart with the specified ID does not exist
  • CART_SET_CUSTOMER_ERROR: Failed to associate customer with cart
  • CUSTOMER_NOT_FOUND_ERROR: Specified customer does not exist
  • FORBIDDEN: Insufficient permissions to modify cart

AUTH: Role=[order.OWNER,order.EDITOR,order.VIEWER] OR (('user is authenticated') AND ('customerId if present in input matches JWT'))

cartSetCustomer(
id: String!
input: CartSetCustomerInput!
): Cart!

Arguments

cartSetCustomer.id ● String! non-null scalar

Unique identifier of the cart to associate with customer.

Must be a valid UUID format representing an existing cart.

cartSetCustomer.input ● CartSetCustomerInput! non-null input

Customer association data.

Contains the customer identifier and any additional configuration for the customer-cart relationship.

Type

Cart object

Shopping cart entity for managing customer purchases.

Represents a shopping session containing products, customer information, addresses, payment preferences, and all data needed for order processing. Carts can be associated with different customer types and support various business models.