15 December 2025
Composable Commerce
HTTP API
Enhancement
B2BCustomersGraphQL
You can now assign a Business Unit to Customer Groups; previously, you could only assign a Customer to Customer Groups. With this enhancement, you can drive more revenue growth by hyper-targeting and personalizing prices and discounts. In addition, you can now filter Business Units by the assigned Customer Groups using the Business Unit Search API.

Changes:

The following changes were introduced in terms of GraphQL SDL:

extend type BusinessUnit {
  "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
  customerGroupAssignments: [CustomerGroupAssignment!]
}

extend input BusinessUnitDraft {
  "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
  customerGroupAssignments: [CustomerGroupAssignmentDraft!]
}

extend input BusinessUnitUpdateAction {
  "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
  addCustomerGroupAssignment: AddCustomerGroupAssignment

  "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
  removeCustomerGroupAssignment: RemoveCustomerGroupAssignment

  "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
  setCustomerGroupAssignments: SetCustomerGroupAssignments
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type BusinessUnitCustomerGroupAssignmentAdded implements MessagePayload {
  customerGroupAssignment: CustomerGroupAssignment!
  type: String!
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type BusinessUnitCustomerGroupAssignmentRemoved implements MessagePayload {
  customerGroupAssignment: CustomerGroupAssignment!
  type: String!
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
type BusinessUnitCustomerGroupAssignmentsSet implements MessagePayload {
  customerGroupAssignments: [CustomerGroupAssignment!]
  oldCustomerGroupAssignments: [CustomerGroupAssignment!]
  type: String!
}