15 December 2025
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.
This feature is currently in public beta. It is only available as part of Composable Commerce for B2B and is subject to additional terms and pricing. To get access, contact the Composable Commerce support team.
Changes:
- [API] Added the
customerGroupAssignmentsfield to BusinessUnit and BusinessUnitDraft type. - [API] Added the following update actions to the Business Units API: Add CustomerGroupAssignment, Remove CustomerGroupAssignment, and Set CustomerGroupAssignments.
- [API] Added the following Business Units Messages: Business Unit CustomerGroupAssignment Added, Business Unit CustomerGroupAssignment Removed, Business Unit CustomerGroupAssignments Set.
- [GraphQL API] Added the
customerGroupAssignmentsfield to theBusinessUnittype. - [GraphQL API] Added the
customerGroupAssignmentsinput field to theBusinessUnitDrafttype. - [GraphQL API] Added the following input fields to the
BusinessUnitUpdateActiontype:addCustomerGroupAssignment,removeCustomerGroupAssignment,setCustomerGroupAssignments. - [GraphQL API] Added the following types to the GraphQL schema:
BusinessUnitCustomerGroupAssignmentAdded,BusinessUnitCustomerGroupAssignmentRemoved,BusinessUnitCustomerGroupAssignmentsSet.
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!
}