Develop > Persistence layer > WebSphere Commerce Web services with JSP pages > Understand the WebSphere Commerce Web service framework > WebSphere Commerce as a service provider > Inbound Web services provided


Inventory cache update service

The inventory cache update service is an inbound Web service responsible for updating the inventory cache in WebSphere Commerce 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 should consider using massload for coarse-grain adjustments such as regularly-scheduled refreshes of the entire inventory cache.


Typical use cases


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 un-cache). 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 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 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 will be returned in the form of ConfirmBOD BODs with a ResponseCriteria element under the Confirm verb. They will 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

The releaseID and versionID attributes should be blank when calling the inventory cache update service and ignore the attributes returned in response BOD.

Related reference

Service-oriented outbound integration points

Inbound Web services provided


+

Search Tips   |   Advanced Search