This controller command is to be exposed to the external
OMS through inbound service infrastructure. This inbound service will be used to update the local inventory cache in the following scenario:
- OrderItemAddCmd calls DoInventoryActionCmd with action "CheckInventory" to check the availability of a product before adding it to an order.
- The external OMS integration kit customizes DoInventoryActionCmd to do the following:
- It first retrieves the inventory counts of the product as indicated by the local inventory cache, in fulfillment centers associated with the current store.
- It then checks whether any of the inventory counts is above a predefined threshold (for example 100). If so, it will return the inventory status as indicated by the local inventory cache.
- Otherwise, it will make an outbound service call to the external OMS to check the availability of the product.
- Meanwhile, in the background, the external OMS is triggered by certain events (for example, significant changes in inventory counts). It is to make inbound service calls to the inventory update service to update the local inventory cache maintained by WebSphere Commerce.
- OrderProcessCmdImpl calls DoInventoryActionCmd with action "AllocateInventory" to decrement inventory counts in the local inventory cache when the order is submitted for processing.
- The default implementation of this command is InventoryBalanceUpdateCmdImpl.