Prepare the following MustGather information before you call HCL Support to help with
inventory (non-ATP) and fulfillment issues.
-
Configure the following trace string in the Transaction server Docker
container.
com.ibm.websphere.commerce.WC_SERVER=all:com.ibm.websphere.commerce.WC_ORDER=all:com.ibm.websphere.commerce.WC_INVENTORY=all:com.ibm.commerce.inventory.facade.server.commands.*=all
For information about how to set trace strings, see Configuring logging for the
Transaction server.
-
Reproduce the problem.
Record the specific steps that you used to reproduce the problem and any
details that might be relevant.
You can take the export of the browser network tab when reproducing the
problem. This way, it provides details about all the REST call requests or
responses and parameters used.
-
Collect the following files.
From the Transaction server Docker container:
- /opt/WebSphere/AppServer/profiles/default/logs/server1/SystemOut*.log
- /opt/WebSphere/AppServer/profiles/default/logs/server1/trace*.log
-
Run the following database queries to collect the necessary information from
your database (output results in CSV format).
SELECT * FROM SITE
SELECT INVENTORYSYSTEM FROM STORE WHERE STORE_ID={YOUR_STORE_ID}
SELECT * FROM INVENTORY WHERE STORE_ID={YOUR_STORE_ID} AND CATENTRY_ID={YOUR_CATENTRY_ID}
SELECT * FROM CATENTRY WHERE CATENTRY_ID = {YOUR_CATENTRY_ID}
SELECT * FROM CATENTDESC WHERE CATENTRY_ID = {YOUR_CATENTRY_ID}
SELECT * FROM SHPARRANGE WHERE STORE_ID= {YOUR_STORE_ID}
SELECT * FROM FFMCENTER WHERE FFMCENTER_ID IN (SELECT FFMCENTER_ID FROM INVENTORY WHERE CATENTRY_ID=YOUR_CATENTRY_ID)
SELECT * FROM ORDERITEMS WHERE ORDERS_ID = YOUR_ORDER_ID.
What to do next
- Review the data
- DoInventoryActionCmdImpl command is a base command for
inventory-related operations.
By running through the below trace examples
(that cover some essential methods to be checked), you shall be able to
troubleshoot problems
like:
_API_CANT_RESOLVE_FFMCENTER
exception(insufficient inventory): The command is unable to determine an
appropriate fulfillment center for an
OrderItem.
com.ibm.commerce.exception.ECApplicationException:
There is inadequate inventory to purchase 1.0 units of
AuroraWMDRS-014.
Various usages defined
inside the DoInventoryActionCmdImpl command
complete the overall inventory operations for orders.
- Fulfillment Center related actions
action=RESOLVE_FULFILLMENTCENTER
(resolveFulfillmentCenter()): Resolves the
FFMCENTER_ID from either the
OrderItemAccessBean or the
catentry_id and
quantity.action=UPDATE_FULFILLMENTCENTER
(updateFulfillmentCenter()): For non-ATP
inventory systems, it resolves the
fulfillmentCenter and sets this identifier into
the order item
<ORDERITEMS.FFMCENTER_ID>.
Example of
updateFulfillmentCenter() method called and
identify the
FFMCENTER:
[11/19/23 1:14:28:068 GMT] 0000013b WC_INVENTORY > com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl updateFulfillmentCenter ENTRY
[11/19/23 1:14:28:088 GMT] 0000013b WC_INVENTORY > com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl Resolve fulfillmentCenter for UniqueOrderItem :10004 ENTRY
…
[11/19/23 1:14:28:116 GMT] 0000013b WC_ORDER Z com.ibm.commerce.fulfillment.commands.ResolveFulfillmentCenterCmdImpl performExecute Try to use the fulfillmentCenterId: 13001 to check inventory.
[11/19/23 1:14:28:126 GMT] 0000013b WC_INVENTORY Z com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl updateFulfillmentCenter orderItem : 10003 fulfillmentCenter_id is resolved to:13001
[11/19/23 1:14:28:126 GMT] 0000013b WC_INVENTORY Z com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl updateFulfillmentCenter orderItem : 10003 inventoryStatus is changed to:AVL
[11/19/23 1:14:28:126 GMT] 0000013b WC_INVENTORY < com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl updateFulfillmentCenter RETURN
- Inventory related actions
- action=CHECK_INVENTORY (checkInventory()): Resolved the
FFMCENTER_ID and updates it into the order item and
sets the inventoryStatus of the checked
orderItem to new inventory status
AVL.
- Example of checkInventory() called and setting
orderItem inventory status to
AVL:
[11/19/23 1:20:31:858 GMT] 0000013d WC_INVENTORY > com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl checkInventory ENTRY
...
[11/19/23 1:20:31:885 GMT] 0000013d WC_ORDER Z com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl handleOrderItemInventory(OrderItemAccessBean) find inventory for order item: 10004 with catalogEntryId=14253, fulfillmentCenterId=13001, storeId=11
[11/19/23 1:20:31:885 GMT] 0000013d WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findInventory() ENTRY
[11/19/23 1:20:31:885 GMT] 0000013d WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findByCatalogEntryAndFulfillmentCenterAndStore() ENTRY find by catalog entry 14253 in fulfillment center 13001 and store 11
[11/19/23 1:20:31:885 GMT] 0000013d WC_ORDER Z com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findByCatalogEntryAndFulfillmentCenterAndStore Try to check inventory for catalogEntryId=14253, fulfillmentCenterId=13001, storeId=11
[11/19/23 1:20:31:886 GMT] 0000013d WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findByCatalogEntryAndFulfillmentCenterAndStore() RETURN
[11/19/23 1:20:31:886 GMT] 0000013d WC_ORDER Z com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findInventory() Find inventory for : catalogEntryId=14253 in fulfillmentCenterId=13001 and storeId=11
[11/19/23 1:20:31:886 GMT] 0000013d WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findInventory() RETURN Find inventory for catalog entry id:14253, fulfillment center id:13001, store id:11
...
[11/19/23 1:20:31:887 GMT] 0000013d WC_INVENTORY Z com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl checkInventoryOnOrderPrepare orderItem : 10004 inventoryStatus is changed to:AVL
- action=ALLOCATE_INVENTORY(allocateInventory()):
Inventory allocation can only happen on OrderProcess
for non-ATP inventory systems. Before non-ATP inventory is allocated, the
inventory status must first be checked. If this orderItem has ever been
allocated, it compares the allocated quantity with the required amount. It
only works if there is a change in the required quantity. Otherwise, it
reverses the amount allocated and then updates the inventory for this item
in the order. Finally, it sets the inventoryStatus as
inventory allocated.
- action=RESERVE_INVENTORY (reserveInventory()) &
action=ADJUST_RESERVE_INVENTORY
(adjustReserveInventory()) : Both the action calls the
updateInventoryCmd.
- action=REVERSE_INVENTORY (reverseInventory()): It
deallocates inventory by calling the method
reverseInventoryForNonATP().
- Example of allocateInventory() call and update
inventory for
orderitem:
[11/19/23 1:20:32:325 GMT] 0000014e WC_INVENTORY > com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl allocateInventory ENTRY
[11/19/23 1:20:32:325 GMT] 0000014e WC_INVENTORY > com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl allocateInventoryForNonATP ENTRY
...
[11/19/23 1:20:32:343 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.UpdateInventoryCmdImpl performExecute ENTRY
[11/19/23 1:20:32:343 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl performExecute() ENTRY
[11/19/23 1:20:32:343 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl handleOrderItemInventory(OrderItemAccessBean) ENTRY
...
[11/19/23 1:20:32:343 GMT] 0000014e WC_ORDER Z com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl handleOrderItemInventory(OrderItemAccessBean) find inventory for order item: 10004 with catalogEntryId=14253, fulfillmentCenterId=13001, storeId=11
[11/19/23 1:20:32:343 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findInventory() ENTRY
[11/19/23 1:20:32:343 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findByCatalogEntryAndFulfillmentCenterAndStore() ENTRY find by catalog entry 14253 in fulfillment center 13001 and store 11
[11/19/23 1:20:32:343 GMT] 0000014e WC_ORDER Z com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findByCatalogEntryAndFulfillmentCenterAndStore Try to update inventory for catalogEntryId=14253, fulfillmentCenterId=13001, storeId=11
[11/19/23 1:20:32:344 GMT] 0000014e WC_ORDER Z com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl myGetInventoryABs for update enabled and to update inventory, select catentryId: [14253] fulfillmentCenterId: [13001] storeId: [11] for update
[11/19/23 1:20:32:347 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findByCatalogEntryAndFulfillmentCenterAndStore() RETURN
[11/19/23 1:20:32:347 GMT] 0000014e WC_ORDER Z com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findInventory() Find inventory for : catalogEntryId=14253 in fulfillmentCenterId=13001 and storeId=11
[11/19/23 1:20:32:347 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl findInventory() RETURN Find inventory for catalog entry id:14253, fulfillment center id:13001, store id:11
[11/19/23 1:20:32:347 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl convertQuantity(OrderItemAccessBean, String) ENTRY newQuantityUnit is: C62original quantity is: 1.0
[11/19/23 1:20:32:347 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl convertQuantity(OrderItemAccessBean, String) RETURN Converted quantity to 1.0
[11/19/23 1:20:32:347 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl checkUpdateInventory(InventoryAccessBean, Double) ENTRY askQuantity is: 1.0original quantity is: 101.0
[11/19/23 1:20:32:365 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl checkUpdateInventory(InventoryAccessBean, Double) RETURN return true
[11/19/23 1:20:32:365 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl handleOrderItemInventory(OrderItemAccessBean) RETURN Check or update inventory successfully for order item:10004
[11/19/23 1:20:32:365 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl performExecute() RETURN
[11/19/23 1:20:32:365 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.UpdateInventoryCmdImpl setOrderItemAllocationInfo ENTRY
[11/19/23 1:20:32:365 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl convertquantity(OrderItemAccessBean) ENTRY
[11/19/23 1:20:32:365 GMT] 0000014e WC_ORDER Z com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl convertquantity(OrderItemAccessBean) Get quantity measure from current store: 11
[11/19/23 1:20:32:365 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl convertquantity(OrderItemAccessBean) RETURN
[11/19/23 1:20:32:366 GMT] 0000014e WC_ORDER > com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl convertQuantity(OrderItemAccessBean, String) ENTRY newQuantityUnit is: C62original quantity is: 1.0
[11/19/23 1:20:32:366 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.InventoryBaseCmdImpl convertQuantity(OrderItemAccessBean, String) RETURN Converted quantity to 1.0
[11/19/23 1:20:32:366 GMT] 0000014e WC_ORDER Z com.ibm.commerce.fulfillment.commands.UpdateInventoryCmdImpl setOrderItemAllocationInfo After update quantity is: 1.0 inventory allocated quantity is: 1
[11/19/23 1:20:32:366 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.UpdateInventoryCmdImpl setOrderItemAllocationInfo RETURN
[11/19/23 1:20:32:366 GMT] 0000014e WC_ORDER < com.ibm.commerce.fulfillment.commands.UpdateInventoryCmdImpl performExecute RETURN
[11/19/23 1:20:32:366 GMT] 0000014e WC_SERVER < com.ibm.commerce.command.ECCommandTarget executeCommand RETURN
[11/19/23 1:20:32:366 GMT] 0000014e WC_ORDER < com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl allocateInventoryForNonATP RETURN
[11/19/23 1:20:32:366 GMT] 0000014e WC_INVENTORY < com.ibm.commerce.inventory.commands.DoInventoryActionCmdImpl allocateInventory RETURN
- For more details on the command
DoInventoryActionCmdImpl, see DoInventoryActionCmd task command.
- For the data model information, refer to the following help center links: