Introduced Product Selections in Beta
Product Selections let you model the availability of your products in different sales channels. Depending on your use case and by leveraging the existing Stores functionality you can create individual catalogs or assortments for your brand sites, regional shops or brick-and-mortar stores.
Currently, the feature allows you to create Product Selections, populate them with Products, add them to any of your Stores and activate them independently for each Store. We also introduced a new endpoint that returns a Product Projection available in a given Store's active Product Selections.
Please note that the focus of this first release lies in scenarios where assortment management happens in a commercetools-external Product Information Management system and a commercetools-external search provider is used for product discovery in the shop frontend. As a consequence, you currently can’t filter your search results by Product Selections or Stores in both, Product Projections and the Merchant Center Product list. We plan to close these gaps progressively and add more functionality to Product Selections during the public beta phase.
Read more on Product Selections and how to use them in the API reference.
Read more on how to integrate with an external search service providing product discovery for your Store-specific shop frontends in this guide.
Furthermore, you can now subscribe to Messages triggered when Product Selections are created, deleted, or updated or when the Store's Product Selections have changed.
Changes:
- [API] Added the
view_product_selectionsandmanage_product_selectionsOAuth scopes. - [API] Added ProductSelections.
- [API] Added query on Product Selections for a Product.
- [API] Added Get ProductProjection in a Store by ID or by Key.
- [API] Added ProductSelectionCreated and ProductSelectionDeleted message.
- [API] Added ProductSelectionProductAdded and ProductSelectionProductRemoved message.
- [API] Added StoreProductSelectionsChanged message.
- [GraphQL API] Added the following types to the GraphQL schema:
AddProductSelectionProduct,AddStoreProductSelection,ChangeProductSelectionName,ChangeStoreProductSelectionActive,CreateProductSelectionDraft,IndividualProductSelectionCreatedPayload,ProductAssignment,ProductAssignmentQueryResult,ProductOfSelection,ProductOfSelectionQueryResult,ProductSelection,ProductSelectionCreated,ProductSelectionCreatedPayload,ProductSelectionDeleted,ProductSelectionProductAdded,ProductSelectionProductRemoved,ProductSelectionQueryInterface,ProductSelectionQueryResult,ProductSelectionSetting,ProductSelectionSettingDraft,ProductSelectionSettingInActionInput,ProductSelectionUpdateAction,RemoveProductSelectionProduct,RemoveStoreProductSelection,SelectionOfProduct,SelectionOfProductQueryResult,SetProductSelectionKey,SetStoreProductSelections,StoreProductSelectionsChanged. - [GraphQL API] Changed the
CreateStoretype:- Input field
productSelectionswas added toCreateStoretype
- Input field
- [GraphQL API] Changed the
Querytype:- Added the
productSelectionsfield to theQuerytype. Query.inStoresdescription is changedQueryobject type now implementsProductSelectionQueryInterfaceinterface- Added the
productSelectionAssignmentsfield to theQuerytype. - Added the
productSelectionfield to theQuerytype. Query.inStoredescription is changed
- Added the
- [GraphQL API] Changed the
Mutationtype:- Added the
updateProductSelectionfield to theMutationtype. - Added the
deleteProductSelectionfield to theMutationtype. - Added the
createProductSelectionfield to theMutationtype.
- Added the
- [GraphQL API] Changed the
Producttype:- Added the
productSelectionRefsfield to theProducttype.
- Added the
- [GraphQL API] Changed the
StoreCreatedtype:- Added the
productSelectionsfield to theStoreCreatedtype. - Added the
productSelectionsReffield to theStoreCreatedtype.
- Added the
- [GraphQL API] Changed the
Storetype:- Added the
productSelectionsfield to theStoretype.
- Added the
- [GraphQL API] Changed the
StoreUpdateActiontype:- Input field
changeProductSelectionActivewas added toStoreUpdateActiontype - Input field
setProductSelectionswas added toStoreUpdateActiontype - Input field
addProductSelectionwas added toStoreUpdateActiontype - Input field
removeProductSelectionwas added toStoreUpdateActiontype
- Input field
- [GraphQL API] Changed the
InStoretype:- Added the
productfield to theInStoretype. - Added the
productSelectionAssignmentsfield to theInStoretype.
- Added the
The following changes were introduced in terms of GraphQL SDL:
extend type InStore {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"product("Queries for a product with specified SKU"sku: String,"Queries for a product with specified [product variant key](https://docs.commercetools.com/api/projects/products#variant_key)"variantKey: String,"Queries with specified ID"id: String,"Queries with specified key"key: String): Product"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelectionAssignments(where: String, sort: [String!], limit: Int, offset: Int): ProductAssignmentQueryResult!}extend type Query {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelection("Queries with specified ID"id: String,"Queries with specified key"key: String): ProductSelection"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelectionAssignments(where: String, sort: [String!], limit: Int, offset: Int): ProductAssignmentQueryResult!"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelections(where: String, sort: [String!], limit: Int, offset: Int): ProductSelectionQueryResult!}extend type Mutation {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"createProductSelection("BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"draft: CreateProductSelectionDraft!): ProductSelection"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"deleteProductSelection(version: Long!,"Queries with specified ID"id: String,"Queries with specified key"key: String): ProductSelection"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"updateProductSelection(version: Long!,"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"actions: [ProductSelectionUpdateAction!]!,"Queries with specified ID"id: String,"Queries with specified key"key: String): ProductSelection}extend type Product {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelectionRefs(where: String, sort: [String!], limit: Int, offset: Int): SelectionOfProductQueryResult!}extend type StoreCreated {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelections: [ProductSelectionSetting!]!}extend type Store {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelections: [ProductSelectionSetting!]!}extend input StoreUpdateAction {addProductSelection: AddStoreProductSelectionchangeProductSelectionActive: ChangeStoreProductSelectionActiveremoveProductSelection: RemoveStoreProductSelectionsetProductSelections: SetStoreProductSelections}extend input CreateStore {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelections: [ProductSelectionSettingDraft!]}input AddProductSelectionProduct {product: ResourceIdentifierInput!}input AddStoreProductSelection {productSelection: ResourceIdentifierInput!active: Boolean}input ChangeProductSelectionName {name: [LocalizedStringItemInputType!]!}input ChangeStoreProductSelectionActive {productSelection: ResourceIdentifierInput!active: Boolean!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"input CreateProductSelectionDraft {key: Stringname: [LocalizedStringItemInputType!]!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type IndividualProductSelectionCreatedPayload implements ProductSelectionCreatedPayload {name("String is defined for different locales. This argument specifies the desired locale."locale: Locale,"List of languages the client is able to understand, and which locale variant is preferred."acceptLanguage: [Locale!]): StringnameAllLocales: [LocalizedString!]!type: String!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type ProductAssignment {productRef: Reference!product: ProductproductSelectionRef: Reference!productSelection: ProductSelection}type ProductAssignmentQueryResult {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#beta-features"exists: Boolean!results: [ProductAssignment!]!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type ProductOfSelection {productRef: Reference!product: Product}type ProductOfSelectionQueryResult {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#beta-features"exists: Boolean!results: [ProductOfSelection!]!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type ProductSelection implements Versioned {key: Stringname("String is defined for different locales. This argument specifies the desired locale."locale: Locale,"List of languages the client is able to understand, and which locale variant is preferred."acceptLanguage: [Locale!]): StringnameAllLocales: [LocalizedString!]!productRefs(where: String, sort: [String!], limit: Int, offset: Int): ProductOfSelectionQueryResult!productCount: Int!id: String!version: Long!createdAt: DateTime!lastModifiedAt: DateTime!createdBy: InitiatorlastModifiedBy: Initiator}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type ProductSelectionCreated implements MessagePayload {productSelection: ProductSelectionCreatedPayload!type: String!}interface ProductSelectionCreatedPayload {name("String is defined for different locales. This argument specifies the desired locale."locale: Locale,"List of languages the client is able to understand, and which locale variant is preferred."acceptLanguage: [Locale!]): StringnameAllLocales: [LocalizedString!]!type: String!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type ProductSelectionDeleted 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#beta-features"type ProductSelectionProductAdded implements MessagePayload {product: ProductproductRef: Reference!type: String!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type ProductSelectionProductRemoved implements MessagePayload {product: ProductproductRef: Reference!type: String!}"Fields to access product selection assignments. BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"interface ProductSelectionQueryInterface {"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"productSelectionAssignments(where: String, sort: [String!], limit: Int, offset: Int): ProductAssignmentQueryResult!}type ProductSelectionQueryResult {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#beta-features"exists: Boolean!results: [ProductSelection!]!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type ProductSelectionSetting {productSelectionRef: Reference!productSelection: ProductSelectionactive: Boolean!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"input ProductSelectionSettingDraft {productSelection: ResourceIdentifierInput!active: Boolean!}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"input ProductSelectionSettingInActionInput {productSelection: ResourceIdentifierInput!active: Boolean}input ProductSelectionUpdateAction {addProduct: AddProductSelectionProductchangeName: ChangeProductSelectionNameremoveProduct: RemoveProductSelectionProductsetKey: SetProductSelectionKey}input RemoveProductSelectionProduct {product: ResourceIdentifierInput!}input RemoveStoreProductSelection {productSelection: ResourceIdentifierInput!}type SelectionOfProduct {productSelectionRef: Reference!productSelection: ProductSelection}type SelectionOfProductQueryResult {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#beta-features"exists: Boolean!results: [SelectionOfProduct!]!}input SetProductSelectionKey {key: String}input SetStoreProductSelections {productSelections: [ProductSelectionSettingInActionInput!]}"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#beta-features"type StoreProductSelectionsChanged implements MessagePayload {addedProductSelections: [ProductSelectionSetting!]removedProductSelections: [ProductSelectionSetting!]updatedProductSelections: [ProductSelectionSetting!]type: String!}