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


Order status update service

The order status update service is an inbound Web service responsible for updating the status of an order in WebSphere Commerce when a store is configured to use an external system for order processing and fulfillment. This inbound Web service is typically called by the external system to update the status of a transferred order in WebSphere Commerce for display purposes when the status of the order has changed in the external system.


Typical use cases


Endpoint URL and operation

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


Request

Requests to this inbound Web service are in the form of SyncOrder BODs. They are mapped to the OrderStatus command and should contain the following information:

XPath* Type Maps to Description Required
ApplicationArea/BusinessContext/ContextData User Data - The business context area of the request. Typically used to provide business context data such as store ID and language ID. -
ApplicationArea/UserArea/SequenceNumber string sequenceNumber The sequence number of the order status update request. Mainly used for determining the sequence of order status update requests for the same order in cases when they might be received by WebSphere Commerce out of sequence. N
ApplicationArea/CreationDateTime dateTime lastUpdateTime The creation date of the order status update request. Mainly used for determining the sequence of order status update requests for the same order in cases when they might be received by WebSphere Commerce out of sequence and that the sequence numbers of the requests are not provided. N
DataArea/Process/ActionCriteria/ActionExpression/@actionCode string actionCode The action code. Must be " Update". Y
DataArea/Order/OrderHeader/OrderIdentifier/OrderID long orderId WebSphere Commerce order ID of the order. Y
DataArea/Order/OrderHeader/OrderIdentifier/ExternalOrderID string merchantOrderNumber External order ID of the order. N
DataArea/Order/OrderHeader/OrderCharges/TotalProductPrice/@currency string currency Currency of the order charges. N
DataArea/Order/OrderHeader/OrderCharges/TotalProductPrice decimal priceTotal Total product price of the order. N
DataArea/Order/OrderHeader/OrderCharges/TotalShippingCharge decimal shippingTotal Total shipping charge of the order. N
DataArea/Order/OrderHeader/OrderCharges/TotalSalesTax decimal taxTotal Total sales tax of the order. N
DataArea/Order/OrderHeader/OrderCharges/TotalShippingTax decimal shippingTaxTotal Total shipping tax of the order. N
DataArea/Order/OrderHeader/OrderShippingInfo/RequestedShipDateTime dateTime requestShipDateTime Requested ship date of the order. N
DataArea/Order/OrderHeader/OrderShippingInfo/UserData/UserDataField[@name='shipCondition'] string shipCondition Code indicating if partial shipment of the order is accepted. Valid values:

  • SC = ship complete order

  • SP = ship partial order

N
DataArea/Order/OrderHeader/OrderShippingInfo/UserData/UserDataField[@name='shippingModeFlag'] string shippingModeFlag Code indicating the level for the shipping address and shipping mode. Valid values:

  • O = order level

  • I = item level

N
DataArea/Order/OrderHeader/OrderStatus/Status string orderStatus Status of the order. N
DataArea/Order/OrderHeader/CustomerComments string comment Customer comments regarding the order. N
DataArea/Order/OrderHeader/PlacedDateTime dateTime placeDateTime Date the order was placed. N
DataArea/Order/OrderItem[i]/OrderItemIdentifier/OrderItemID long orderItemId_i WebSphere Commerce order item ID of the i-th order item, if applicable. Y
DataArea/Order/OrderItem[i]/OrderItemIdentifier/ExternalOrderItemID string merchantItemNumber_i External order ID of the i-th order item. N
DataArea/Order/OrderItem[i]/ProductIdentifier/SKU string partNumber_i SKU of the product associated with the i-th order item. N
DataArea/Order/OrderItem[i]/Quantity double quantityRequested_i Quantity value of the i-th order item. N
DataArea/Order/OrderItem[i]/OrderItemCharges/UnitPrice/Price decimal unitPrice_i Unit price of the product associated with the i-th order item. N
DataArea/Order/OrderItem[i]/OrderItemCharges/UnitPrice/Price/@currency string currency_i Currency of the order item charges. N
DataArea/Order/OrderItem[i]/OrderItemCharges/OrderItemPrice decimal priceTotal_i Order item price of the i-th order item. N
DataArea/Order/OrderItem[i]/OrderItemCharges/ShippingCharge decimal shippingTotal_i Ship charge of the i-th order item. N
DataArea/Order/OrderItem[i]/OrderItemCharges/SalesTax decimal taxTotal_i Sales tax of the i-th order item. N
DataArea/Order/OrderItem[i]/OrderItemCharges/ShippingTax decimal shippingTaxTotal_i Ship tax of the i-th order item. N
DataArea/Order/OrderItem[i]/OrderItemShippingInfo/RequestedShipDateTime dateTime requestShipDateTime Requested ship date of the i-th order item. N
DataArea/Order/OrderItem[i]/OrderItemShippingInfo/UserData/UserDataField[@name='shipCondition'] string shipCondition_i Code indicating if partial shipment of the order is accepted. Valid values:

  • SC = ship complete order

  • SP = ship partial order

N
DataArea/Order/OrderItem[i]/OrderItemShippingInfo/UserData/UserDataField[@name='shippingModeFlag'] string shippingModeFlag_i Code indicating the level for the shipping address and shipping mode. Valid values:

  • O = order level

  • I = item level

N

* Namespace prefixes ignored for simplicity.


Response

Responses of this inbound web service are in the form of ConfirmBOD 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 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 identified an exception in the server logs.
DataArea/Confirm/ResponseCriteria/ChangeStatus/ReasonCode string The reason code, which is either a WebSphere Commerce system error code if available, or the EC message key 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

Related reference

Inbound Web services provided