This update action can only be used if a Customer is not assigned to a Cart. If a Customer is already assigned, the Cart uses the Customer Group of the assigned Customer.

To reflect the new Customer Group, this update action can result in [updates to the Cart](/../carts-orders-overview#cart-updates). When this occurs, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
interface StagedOrderSetCustomerGroupAction {
    action: "setCustomerGroup";
    customerGroup?: CustomerGroupResourceIdentifier;
}

Properties

action: "setCustomerGroup"

Value to set. If empty, any existing value is removed.