Skip to main content

cartSetContact

Associate a contact with an existing cart.

Links a contact to the cart for personalized pricing, company-specific terms, and contact-based order processing. This enables B2B functionality and contact-specific cart features.

Possible errors:

  • CART_NOT_FOUND_ERROR: Cart with the specified ID does not exist
  • CART_SET_CONTACT_ERROR: Failed to associate contact with cart
  • CONTACT_NOT_FOUND_ERROR: Specified contact does not exist
  • FORBIDDEN: Insufficient permissions to modify cart

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

cartSetContact(
id: String!
input: CartSetContactInput!
): Cart!

Arguments

cartSetContact.id ● String! non-null scalar

Unique identifier of the cart to associate with contact.

Must be a valid UUID format representing an existing cart.

cartSetContact.input ● CartSetContactInput! non-null input

Contact association data.

Contains the contact identifier and company information for establishing the cart-contact 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.