Multiple Customer Group assignments
Historically, a commercetools Customer object could only be assigned to a single Customer Group. This often forced integrators into complex workarounds to manage customers who qualified for multiple tiers or segmentation rules.
customerGroupAssignments and allows for powerful segmentation where a single customer can benefit from multiple group affiliations simultaneously. For example, a customer could simultaneously belong to:- Tier:
VIP Customers(eligible for standard group discounts). - Segment:
Regional Promo Users(eligible for special regional pricing).
Let’s select a Product from our Product list and create two prices for our customer’s country, same currency and both Customer Groups:
customerGroupAssignments, priceCurrency and priceCountry:curl --get \
"https://api.{region}.commercetools.com/{projectKey}/product-projections/key=pink-abstract-painting?priceCurrency=EUR&priceCountry=DE&priceCustomerGroupAssignments=c241adfc-3fb8-4915-b3c1-be7eacdb786b&priceCustomerGroupAssignments=7ef1508d-5462-47c2-98a4-9deaafc5b341" \
--header "Authorization: Bearer {bearerToken}" \
| jq
We will see that the better of the two prices will be selected:
{
"id": "0bc05ed4-b0bf-410a-8b0f-7849ff1393b1",
"version": 7,
"productType": {
"typeId": "product-type",
"id": "415bec3b-e1de-4bbd-8c62-e537937ec817"
},
"name": {
"en-GB": "Pink Abstract Painting",
"de-DE": "Abstrakte Rosa Malerei",
"en-US": "Pink Abstract Painting"
},
...
"price": {
"id": "e33a1f69-2c97-499e-b345-99cb4c55c074",
"value": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 4500,
"fractionDigits": 2
},
"country": "DE",
"customerGroup": {
"typeId": "customer-group",
"id": "7ef1508d-5462-47c2-98a4-9deaafc5b341"
}
},
...
}
customerGroupAssignments field and intelligent Product Projections API price resolution, Functional Architects can simplify segmentation, eliminate client-side workarounds, and guarantee customers receive the best qualified price. This enhancement is crucial for scalable, personalized commerce and efficient price management.Customer Cart preservation
Previously, when a Customer account was deleted, any associated B2C Carts were automatically deleted as well, while B2B Carts (owned by a Business Unit) were preserved.