All Release Notes

Added Store based inventory filtering

17 August 2020
Enhancement
InventoryStoresProduct Catalog

You can now add Inventory Supply Channels to Stores. When querying ProductProjections, you can then use the query parameter storeProjection to remove all inventory entries from the response payload that don't correspond to the Inventory Supply Channels set in the Store.

Setting Inventory Supply Channels on Stores also affects cart line items. If a cart is bound to a store and the store has Inventory Supply Channels set, then only inventory entries from these channels (and inventory entries not linked to any channel) are included in the product variant information of the line item. Additionally, the supplyChannel field on a line item can only be set to one of the inventory supply channels set in the store.

To enable the configuration of inventory supply channels in Stores, the following changes have been made:

  • [API] Added supplyChannels field to StoreDraft
  • [API] Added supplyChannels field to Store
  • [API] Added setSupplyChannels update action to Store
  • [API] Added addSupplyChannel update action to Store
  • [API] Added removeSupplyChannel update action to Store
  • [GraphQL API] Added the following types to the GraphQL schema: SetStoreSupplyChannels, AddStoreSupplyChannel, RemoveStoreSupplyChannel.
  • [GraphQL API] Changed the StoreUpdateAction type:
    • Input field setSupplyChannels was added to StoreUpdateAction type
    • Input field addSupplyChannel was added to StoreUpdateAction type
    • Input field removeSupplyChannel was added to StoreUpdateAction type
  • [GraphQL API] Changed the CreateStore type:
    • Input field supplyChannels was added to CreateStore type
  • [GraphQL API] Changed the Store type:
    • Added the supplyChannels field to the Store type.
    • Added the supplyChannelsRef field to the Store type.

Introduced the following changes to the GraphQL schema (in SDL format):

extend type Store {
supplyChannels: [Channel!]!
supplyChannelsRef: [Reference!]!
}
extend input StoreUpdateAction {
setSupplyChannels: SetStoreSupplyChannels
addSupplyChannel: AddStoreSupplyChannel
removeSupplyChannel: RemoveStoreSupplyChannel
}
extend input CreateStore {
supplyChannels: [ResourceIdentifierInput!]
}
input SetStoreSupplyChannels {
supplyChannels: [ResourceIdentifierInput!]
}
input AddStoreSupplyChannel {
supplyChannel: ResourceIdentifierInput!
}
input RemoveStoreSupplyChannel {
supplyChannel: ResourceIdentifierInput!
}