25 July 2022
Enhancement
CartsOrdersGraphQL

The inventory mode can now be configured for individual LineItems. The Cart/Order-level inventory mode remains, but can be overridden on a per-line-item basis. For example, in a Cart with two Line Items, you can now give Line Item 1 an inventory mode that is different from the inventory mode for Line Item 2. Before this release, it was only possible to specify one inventory mode valid for all Line Items in the Cart or Order.

Changes:

  • [API] Added optional inventoryMode field to LineItem, LineItemDraft, and LineItemImportDraft.
  • [GraphQL API] Changed the LineItemDraftOutput type:
    • Added the inventoryMode field to the LineItemDraftOutput type.
  • [GraphQL API] Changed the AddStagedOrderLineItem type:
    • Input field inventoryMode was added to AddStagedOrderLineItem type
  • [GraphQL API] Changed the AddCartLineItem type:
    • Input field inventoryMode was added to AddCartLineItem type
  • [GraphQL API] Changed the LineItemDraft type:
    • Input field inventoryMode was added to LineItemDraft type

The following changes were introduced in terms of GraphQL SDL:

extend type LineItemDraftOutput {
inventoryMode: InventoryMode
}
extend input AddStagedOrderLineItem {
inventoryMode: InventoryMode
}
extend input LineItemDraft {
inventoryMode: InventoryMode
}
extend input AddCartLineItem {
inventoryMode: InventoryMode
}