All Release Notes
Introduced Business Units in beta
6 October 2022
Composable Commerce
HTTP API
New feature
B2BCustomersProject configurationProduct catalogCartsOrdersQuotesGraphQL
We have released Business Units in public beta. This new feature allows you to model companies and their divisions in Composable Commerce. You can assign Customers to Business Units to manage Carts, Orders, and Quotes on behalf of companies. With the help of Stores, Business Units can support company-specific products and pricing. When linked to a Business Unit, Carts, Orders, and Quotes will validate a Customer's role within the Business Unit. This feature is part of Composable Commerce for B2B and will be subject to additional terms and pricing.
Changes:
- [API] Added Business Units and My Business Units APIs.
- [API] Added field
businessUnit
to Carts. - [API] Added field
businessUnit
to Orders. - [API] Added field
businessUnit
to Quote Requests, Staged Quotes, and Quotes. - [API] Added field
businessUnits
to Projects. - [API] Added update action Change My Business Unit Status on Creation to Project.
- [API] Added Messages for Business Units.
- [GraphQL API] Added the following types to the GraphQL schema:
AddBusinessUnitAddress
,AddBusinessUnitAssociate
,AddBusinessUnitBillingAddressId
,AddBusinessUnitShippingAddressId
,AddBusinessUnitStore
,AddMyBusinessUnitAddress
,AddMyBusinessUnitBillingAddressId
,AddMyBusinessUnitShippingAddressId
,Associate
,AssociateDraft
,AssociateRole
,BusinessUnit
,BusinessUnitAddressAdded
,BusinessUnitAddressChanged
,BusinessUnitAddressRemoved
,BusinessUnitAssociateAdded
,BusinessUnitAssociateChanged
,BusinessUnitAssociateRemoved
,BusinessUnitAssociatesSet
,BusinessUnitBillingAddressAdded
,BusinessUnitBillingAddressRemoved
,BusinessUnitConfiguration
,BusinessUnitContactEmailSet
,BusinessUnitCreated
,BusinessUnitDefaultBillingAddressSet
,BusinessUnitDefaultShippingAddressSet
,BusinessUnitDeleted
,BusinessUnitDraft
,BusinessUnitNameChanged
,BusinessUnitParentChanged
,BusinessUnitQueryResult
,BusinessUnitShippingAddressAdded
,BusinessUnitShippingAddressRemoved
,BusinessUnitStatus
,BusinessUnitStatusChanged
,BusinessUnitStoreAdded
,BusinessUnitStoreModeChanged
,BusinessUnitStoreRemoved
,BusinessUnitStoresSet
,BusinessUnitType
,BusinessUnitUpdateAction
,ChangeBusinessUnitAddress
,ChangeBusinessUnitAssociate
,ChangeBusinessUnitName
,ChangeBusinessUnitParentUnit
,ChangeBusinessUnitStatus
,ChangeMyBusinessUnitAddress
,ChangeMyBusinessUnitAssociate
,ChangeMyBusinessUnitName
,ChangeMyBusinessUnitParentUnit
,ChangeProjectSettingsMyBusinessUnitStatusOnCreation
,MyBusinessUnitDraft
,MyBusinessUnitUpdateAction
,RemoveBusinessUnitAddress
,RemoveBusinessUnitAssociate
,RemoveBusinessUnitBillingAddressId
,RemoveBusinessUnitShippingAddressId
,RemoveBusinessUnitStore
,RemoveMyBusinessUnitAddress
,RemoveMyBusinessUnitAssociate
,RemoveMyBusinessUnitBillingAddressId
,RemoveMyBusinessUnitShippingAddressId
,SetBusinessUnitAddressCustomField
,SetBusinessUnitAddressCustomType
,SetBusinessUnitAssociates
,SetBusinessUnitContactEmail
,SetBusinessUnitCustomField
,SetBusinessUnitCustomType
,SetBusinessUnitDefaultBillingAddress
,SetBusinessUnitDefaultShippingAddress
,SetBusinessUnitStoreMode
,SetBusinessUnitStores
,SetCartBusinessUnit
,SetMyBusinessUnitAddressCustomField
,SetMyBusinessUnitAddressCustomType
,SetMyBusinessUnitContactEmail
,SetMyBusinessUnitCustomField
,SetMyBusinessUnitCustomType
,SetMyBusinessUnitDefaultBillingAddress
,SetMyBusinessUnitDefaultShippingAddress
. - [GraphQL API] Changed the
Me
type:- Added the
businessUnits
field to theMe
type. - Added the
businessUnit
field to theMe
type.
- Added the
- [GraphQL API] Changed the
Query
type:- Added the
businessUnits
field to theQuery
type. - Added the
businessUnit
field to theQuery
type.
- Added the
- [GraphQL API] Changed the
MyCartUpdateAction
type:- Input field
setBusinessUnit
was added toMyCartUpdateAction
type
- Input field
- [GraphQL API] Changed the
StagedQuote
type:- Added the
businessUnit
field to theStagedQuote
type.
- Added the
- [GraphQL API] Changed the
Quote
type:- Added the
businessUnit
field to theQuote
type.
- Added the
- [GraphQL API] Changed the
CartUpdateAction
type:- Input field
setBusinessUnit
was added toCartUpdateAction
type
- Input field
- [GraphQL API] Changed the
Cart
type:- Added the
businessUnit
field to theCart
type.
- Added the
- [GraphQL API] Changed the
Mutation
type:- Added the
updateBusinessUnit
field to theMutation
type. - Added the
createBusinessUnit
field to theMutation
type. - Added the
updateMyBusinessUnit
field to theMutation
type. - Added the
createMyBusinessUnit
field to theMutation
type. - Added the
deleteBusinessUnit
field to theMutation
type.
- Added the
- [GraphQL API] Changed the
ProjectSettingsUpdateAction
type:- Input field
changeMyBusinessUnitStatusOnCreation
was added toProjectSettingsUpdateAction
type
- Input field
- [GraphQL API] Changed the
Order
type:- Added the
businessUnit
field to theOrder
type.
- Added the
- [GraphQL API] Changed the
QuoteRequest
type:- Added the
businessUnit
field to theQuoteRequest
type.
- Added the
The following changes were introduced in terms of GraphQL SDL:
extend type Me {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"businessUnit("Queries with specified ID"id: String,"Queries with specified key"key: String): BusinessUnit"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"businessUnits(where: String, sort: [String!], limit: Int, offset: Int): BusinessUnitQueryResult!}extend type Query {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"businessUnit("Queries with specified ID"id: String,"Queries with specified key"key: String): BusinessUnit"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"businessUnits(where: String, sort: [String!], limit: Int, offset: Int): BusinessUnitQueryResult!}extend type Cart {businessUnit: KeyReference}extend type StagedQuote {businessUnit: KeyReference}extend type Quote {businessUnit: KeyReference}extend type Mutation {createBusinessUnit(draft: BusinessUnitDraft!): BusinessUnitcreateMyBusinessUnit(draft: MyBusinessUnitDraft!): BusinessUnitdeleteBusinessUnit(version: Long!, personalDataErasure: Boolean = false,"Queries with specified ID"id: String,"Queries with specified key"key: String): BusinessUnitupdateBusinessUnit(version: Long!, actions: [BusinessUnitUpdateAction!]!,"Queries with specified ID"id: String,"Queries with specified key"key: String): BusinessUnitupdateMyBusinessUnit(version: Long!, actions: [MyBusinessUnitUpdateAction!]!,"Queries with specified ID"id: String,"Queries with specified key"key: String): BusinessUnit}extend type Order {businessUnit: KeyReference}extend type QuoteRequest {businessUnit: KeyReference}extend input CartUpdateAction {setBusinessUnit: SetCartBusinessUnit}extend input MyCartUpdateAction {setBusinessUnit: SetCartBusinessUnit}extend input ProjectSettingsUpdateAction {changeMyBusinessUnitStatusOnCreation: ChangeProjectSettingsMyBusinessUnitStatusOnCreation}input AddBusinessUnitAddress {address: AddressInput!}input AddBusinessUnitAssociate {associate: AssociateDraft!}input AddBusinessUnitBillingAddressId {addressId: StringaddressKey: String}input AddBusinessUnitShippingAddressId {addressId: StringaddressKey: String}input AddBusinessUnitStore {store: ResourceIdentifierInput!}input AddMyBusinessUnitAddress {address: AddressInput!}input AddMyBusinessUnitBillingAddressId {addressId: StringaddressKey: String}input AddMyBusinessUnitShippingAddressId {addressId: StringaddressKey: 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 Associate {roles: [AssociateRole!]!customerRef: Referencecustomer: Customer}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"input AssociateDraft {roles: [AssociateRole!]!customer: ResourceIdentifierInput!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"enum AssociateRole {AdminBuyer}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"type BusinessUnit implements Versioned {key: String!name: String!contactEmail: Stringaddresses: [Address!]!defaultShippingAddress: AddressdefaultBillingAddress: AddressdefaultShippingAddressId: StringdefaultBillingAddressId: StringshippingAddresses: [Address!]!billingAddresses: [Address!]!shippingAddressIds: [String!]!billingAddressIds: [String!]!status: BusinessUnitStatus!storesRef: [KeyReference!]stores: [Store!]storeMode: StringunitType: BusinessUnitType!associates: [Associate!]!custom: CustomFieldsTypeparentUnitRef: KeyReferenceparentUnit: BusinessUnit"This field contains the BusinessUnits KeyReferences from the Company to the parent Division of this BusinessUnit in that order."ancestors: [BusinessUnit!]!topLevelUnitRef: KeyReferencetopLevelUnit: BusinessUnit!id: String!version: Long!createdAt: DateTime!lastModifiedAt: DateTime!createdBy: InitiatorlastModifiedBy: Initiator}type BusinessUnitAddressAdded implements MessagePayload {address: Address!type: String!}type BusinessUnitAddressChanged implements MessagePayload {address: Address!type: String!}type BusinessUnitAddressRemoved implements MessagePayload {address: Address!type: String!}type BusinessUnitAssociateAdded implements MessagePayload {associate: Associate!type: String!}type BusinessUnitAssociateChanged implements MessagePayload {associate: Associate!type: String!}type BusinessUnitAssociateRemoved implements MessagePayload {associate: Associate!type: String!}type BusinessUnitAssociatesSet implements MessagePayload {associates: [Associate!]!type: String!}type BusinessUnitBillingAddressAdded implements MessagePayload {address: Address!type: String!}type BusinessUnitBillingAddressRemoved implements MessagePayload {address: Address!type: String!}type BusinessUnitConfiguration {myBusinessUnitStatusOnCreation: BusinessUnitStatus!}type BusinessUnitContactEmailSet implements MessagePayload {contactEmail: Stringtype: String!}type BusinessUnitCreated implements MessagePayload {businessUnit: BusinessUnit!type: String!}type BusinessUnitDefaultBillingAddressSet implements MessagePayload {address: Addresstype: String!}type BusinessUnitDefaultShippingAddressSet implements MessagePayload {address: Addresstype: String!}type BusinessUnitDeleted implements MessagePayload {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"input BusinessUnitDraft {key: String!name: String!contactEmail: Stringaddresses: [AddressInput!]"The index of the address in the `addresses` list. The `defaultBillingAddressId` of the customer will be set to the ID of that address."defaultBillingAddress: Int"The index of the address in the `addresses` list. The `defaultShippingAddressId` of the customer will be set to the ID of that address."defaultShippingAddress: Int"The indices of the shipping addresses in the `addresses` list. The `shippingAddressIds` of the `Customer` will be set to the IDs of that addresses."shippingAddresses: [Int!] = []"The indices of the billing addresses in the `addresses` list. The `billingAddressIds` of the customer will be set to the IDs of that addresses."billingAddresses: [Int!] = []custom: CustomFieldsDraftunitType: BusinessUnitType!storeMode: StringparentUnit: ResourceIdentifierInputstores: [ResourceIdentifierInput!]associates: [AssociateDraft!]}type BusinessUnitNameChanged implements MessagePayload {name: String!type: String!}type BusinessUnitParentChanged implements MessagePayload {oldParentUnit: KeyReferencenewParentUnit: KeyReferencetype: String!}type BusinessUnitQueryResult {offset: Int!count: Int!total: Long!"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"exists: Boolean!results: [BusinessUnit!]!}type BusinessUnitShippingAddressAdded implements MessagePayload {address: Address!type: String!}type BusinessUnitShippingAddressRemoved implements MessagePayload {address: Address!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"enum BusinessUnitStatus {ActiveInactive}type BusinessUnitStatusChanged implements MessagePayload {status: BusinessUnitStatus!type: String!}type BusinessUnitStoreAdded implements MessagePayload {store: KeyReference!type: String!}type BusinessUnitStoreModeChanged implements MessagePayload {storeMode: String!oldStoreMode: String!stores: [KeyReference!]oldStores: [KeyReference!]type: String!}type BusinessUnitStoreRemoved implements MessagePayload {store: KeyReference!type: String!}type BusinessUnitStoresSet implements MessagePayload {stores: [KeyReference!]!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"enum BusinessUnitType {CompanyDivision}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"input BusinessUnitUpdateAction {addAddress: AddBusinessUnitAddressaddAssociate: AddBusinessUnitAssociateaddBillingAddressId: AddBusinessUnitBillingAddressIdaddShippingAddressId: AddBusinessUnitShippingAddressIdaddStore: AddBusinessUnitStorechangeAddress: ChangeBusinessUnitAddresschangeAssociate: ChangeBusinessUnitAssociatechangeName: ChangeBusinessUnitNamechangeParentUnit: ChangeBusinessUnitParentUnitchangeStatus: ChangeBusinessUnitStatusremoveAddress: RemoveBusinessUnitAddressremoveAssociate: RemoveBusinessUnitAssociateremoveBillingAddressId: RemoveBusinessUnitBillingAddressIdremoveShippingAddressId: RemoveBusinessUnitShippingAddressIdremoveStore: RemoveBusinessUnitStoresetAddressCustomField: SetBusinessUnitAddressCustomFieldsetAddressCustomType: SetBusinessUnitAddressCustomTypesetAssociates: SetBusinessUnitAssociatessetContactEmail: SetBusinessUnitContactEmailsetCustomField: SetBusinessUnitCustomFieldsetCustomType: SetBusinessUnitCustomTypesetDefaultBillingAddress: SetBusinessUnitDefaultBillingAddresssetDefaultShippingAddress: SetBusinessUnitDefaultShippingAddresssetStores: SetBusinessUnitStoressetStoreMode: SetBusinessUnitStoreMode}input ChangeBusinessUnitAddress {addressId: StringaddressKey: Stringaddress: AddressInput!}input ChangeBusinessUnitAssociate {associate: AssociateDraft!}input ChangeBusinessUnitName {name: String!}input ChangeBusinessUnitParentUnit {parentUnit: ResourceIdentifierInput!}input ChangeBusinessUnitStatus {status: BusinessUnitStatus!}input ChangeMyBusinessUnitAddress {addressId: StringaddressKey: Stringaddress: AddressInput!}input ChangeMyBusinessUnitAssociate {associate: AssociateDraft!}input ChangeMyBusinessUnitName {name: String!}input ChangeMyBusinessUnitParentUnit {parentUnit: ResourceIdentifierInput!}input ChangeProjectSettingsMyBusinessUnitStatusOnCreation {status: BusinessUnitStatus!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"input MyBusinessUnitDraft {key: String!name: String!contactEmail: Stringaddresses: [AddressInput!]"The index of the address in the `addresses` list. The `defaultBillingAddressId` of the customer will be set to the ID of that address."defaultBillingAddress: Int"The index of the address in the `addresses` list. The `defaultShippingAddressId` of the customer will be set to the ID of that address."defaultShippingAddress: Int"The indices of the shipping addresses in the `addresses` list. The `shippingAddressIds` of the `Customer` will be set to the IDs of that addresses."shippingAddresses: [Int!] = []"The indices of the billing addresses in the `addresses` list. The `billingAddressIds` of the customer will be set to the IDs of that addresses."billingAddresses: [Int!] = []custom: CustomFieldsDraftunitType: BusinessUnitType!storeMode: StringparentUnit: ResourceIdentifierInput}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"input MyBusinessUnitUpdateAction {addAddress: AddMyBusinessUnitAddressaddBillingAddressId: AddMyBusinessUnitBillingAddressIdaddShippingAddressId: AddMyBusinessUnitShippingAddressIdchangeAddress: ChangeMyBusinessUnitAddresschangeAssociate: ChangeMyBusinessUnitAssociatechangeName: ChangeMyBusinessUnitNamechangeParentUnit: ChangeMyBusinessUnitParentUnitremoveAddress: RemoveMyBusinessUnitAddressremoveAssociate: RemoveMyBusinessUnitAssociateremoveBillingAddressId: RemoveMyBusinessUnitBillingAddressIdremoveShippingAddressId: RemoveMyBusinessUnitShippingAddressIdsetAddressCustomField: SetMyBusinessUnitAddressCustomFieldsetAddressCustomType: SetMyBusinessUnitAddressCustomTypesetContactEmail: SetMyBusinessUnitContactEmailsetCustomField: SetMyBusinessUnitCustomFieldsetCustomType: SetMyBusinessUnitCustomTypesetDefaultBillingAddress: SetMyBusinessUnitDefaultBillingAddresssetDefaultShippingAddress: SetMyBusinessUnitDefaultShippingAddress}input RemoveBusinessUnitAddress {addressId: StringaddressKey: String}input RemoveBusinessUnitAssociate {customer: ResourceIdentifierInput!}input RemoveBusinessUnitBillingAddressId {addressId: StringaddressKey: String}input RemoveBusinessUnitShippingAddressId {addressId: StringaddressKey: String}input RemoveBusinessUnitStore {store: ResourceIdentifierInput!}input RemoveMyBusinessUnitAddress {addressId: StringaddressKey: String}input RemoveMyBusinessUnitAssociate {customer: ResourceIdentifierInput!}input RemoveMyBusinessUnitBillingAddressId {addressId: StringaddressKey: String}input RemoveMyBusinessUnitShippingAddressId {addressId: StringaddressKey: String}input SetBusinessUnitAddressCustomField {addressId: StringaddressKey: Stringname: String!value: String}input SetBusinessUnitAddressCustomType {addressId: StringaddressKey: Stringfields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetBusinessUnitAssociates {associates: [AssociateDraft!] = []}input SetBusinessUnitContactEmail {contactEmail: String}input SetBusinessUnitCustomField {name: String!value: String}input SetBusinessUnitCustomType {fields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetBusinessUnitDefaultBillingAddress {addressId: StringaddressKey: String}input SetBusinessUnitDefaultShippingAddress {addressId: StringaddressKey: String}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"input SetBusinessUnitStoreMode {stores: [ResourceIdentifierInput!]storeMode: String}input SetBusinessUnitStores {stores: [ResourceIdentifierInput!]!}input SetCartBusinessUnit {businessUnit: ResourceIdentifierInput!}input SetMyBusinessUnitAddressCustomField {addressId: StringaddressKey: Stringname: String!value: String}input SetMyBusinessUnitAddressCustomType {addressId: StringaddressKey: Stringfields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetMyBusinessUnitContactEmail {contactEmail: String}input SetMyBusinessUnitCustomField {name: String!value: String}input SetMyBusinessUnitCustomType {fields: [CustomFieldInput!]type: ResourceIdentifierInputtypeKey: StringtypeId: String}input SetMyBusinessUnitDefaultBillingAddress {addressId: StringaddressKey: String}input SetMyBusinessUnitDefaultShippingAddress {addressId: StringaddressKey: String}