WebSphere Commerce Version 7.0.0.1 or later

Inventory cache update service

The inventory cache update service is an inbound web service responsible for updating the inventory cache and INVENTORY database table for Non-ATP inventory models in WebSphere Commerce. This service updates the inventory cache and database table when a store is configured to use an external system for inventory management.

This inbound web service is typically called by the external system to perform fine-grain adjustments to inventory levels cached in WebSphere Commerce. The external inventory management system can use the massload utility or Data Load utility for coarse-grain adjustments such as regularly scheduled refreshes of the entire inventory cache.

Feature Pack 6 or laterThe massload utility is deprecated for WebSphere Commerce Version 7 Feature Pack 6. The Data Load utility is the recommended command-line loading utility. If you are currently using the mass load utility, you are recommended to switch to the Data Load utility to load your CSV and XML input files into your target database. If your system contains scheduled and automated processes that use massload, it is recommended that you update these processes to use the Data Load utility. Other WebSphere Commerce utilities that use the massload utility, such as the acpload utility, continue to use the massload utility in WebSphere Commerce Version 7 Feature Pack 6. If you have business reasons to continue using the massload utility, you can continue to use this utility. For more information about the Data Load utility, see Overview of the Data Load utility. You can switch to the Data Load utility by using the TableObjectMediator to load your data when no business object mediator exists for the data that you are loading. For more about the TableObjectMediator formation, see Data Load utility table-based mediator and builder.

Typical use cases

  • The inventory levels of certain products are changed and the inventory cache in WebSphere Commerce must be updated.
  • The inventory levels of certain products are changing rapidly and should no longer be cached by WebSphere Commerce.

Endpoint URL and operation

The default endpoint URL of this inbound web service is https:// hostname:8000/webapp/wcs/services/InventoryServices. The operation of this inbound web service is SyncProductAvailability, with the SyncProductAvailability BOD as request and the ConfirmBOD BOD as response.

Request

Requests to this inbound web service are in the form of ProcessOrder BODs. They are mapped to the InventoryBalanceUpdate command and should contain the following information:

XPath* Type Maps to the following command parameter Description Required
DataArea/Sync/ActionCriteria/ActionExpression

/@actionCode

string ActionCode The action code. It must be " Update" (to cache) or " Delete" (to uncache). Y
DataArea/ProductAvailability[i]

/ProductIdentifier/SKU

string SKU_i SKU of the product. Y
DataArea/ProductAvailability[i]/QuantityOnHand double GlobalQuantityOnHand_i Quantity value on hand at the global level. N
DataArea/ProductAvailability[i]/QuantityOnHand/@uom string GlobalUOMOnHand_i Unit of measure of the quantity value, for example, "C62" for unitless. See Quantity units. N
DataArea/ProductAvailability[i]/ExpectedInventory[j]/Quantity double GlobalQuantityExpected_i_j Quantity value that is expected at the global level. N
DataArea/ProductAvailability[i]/ExpectedInventory[j]/Quantity/@uom string GlobalUOMExpected_i_j Unit of measure of the quantity value. N
DataArea/ProductAvailability[i]/ExpectedInventory[j]/AvailableDateTime dateTime GlobalEstimatedAvailableDateTime_i_j Estimated available date of the expected inventory. N
DataArea/ProductAvailability[i]/FulfillmentCenterInventory[m]/@fulfillmentCenterID int FulfillmentCenterId_i_m ID of the WebSphere Commerce fulfillment center. N
DataArea/ProductAvailability[i]/FulfillmentCenterInventory[m]/QuantityOnHand double QuantityOnHand_i_m Quantity value on hand at the fulfillment center level. N
DataArea/ProductAvailability[i]/FulfillmentCenterInventory[m]/QuantityOnHand/@uom string UOMOnHand_i_m Unit of measure of the quantity value. N
DataArea/ProductAvailability[i]/FulfillmentCenterInventory[m]/ExpectedInventory[n]/Quantity double QuantityExpected_i_m_n Quantity that is expected at the fulfillment center level. N
DataArea/ProductAvailability[i]/FulfillmentCenterInventory[m]/ExpectedInventory[n]/Quantity/@uom string UOMExpected_i_m_n Unit of measure of the quantity value. N
DataArea/ProductAvailability[i]/FulfillmentCenterInventory[m]/ExpectedInventory[n]/AvailableDateTime dateTime GlobalEstimatedAvailableDateTime

_i_m_n

Estimated available date of the expected inventory. N

* Namespace prefixes ignored for simplicity.

Examples

Response

Responses of this inbound web service are in the form of AcknowledgeOrder BODs. They contain the following information:

XPath* Type Description
DataArea/BOD/BODSuccessMessage - This element is present if the request was successful.

* Namespace prefixes ignored for simplicity.

Examples

Exceptions

All exceptions are returned in the form of ConfirmBOD BODs with a ResponseCriteria element under the Confirm verb. They contain the following information:

XPath* Type Description
DataArea/Confirm/ResponseCriteria/ChangeStatus/Code string The correlation identifier. Can be used to uniquely identify an exception in the server logs.
DataArea/Confirm/ResponseCriteria/ChangeStatus/ReasonCode string The reason code, which is either a WebSphere Commerce system error code WebSphere Commerce system error code plus an optional secondary error code if the WebSphere Commerce system error code is unavailable (usually in the case of application exceptions).
DataArea/Confirm/ResponseCriteria/ChangeStatus/Reason string The exception message.

* Namespace prefixes ignored for simplicity.

Examples

Note: The releaseID and versionID attributes should be blank when the inventory cache update service is called and ignore the attributes that are returned in response BOD.