Order preprocessing

The order preprocessing service is an inbound service for orders that have been submitted and transferred to an external order management system (OMS) but are modified post-transfer and require preprocessing by WebSphere Commerce before they can be processed by the external OMS.


When to use this interface

You should use the order preprocessing interface when working with existing projects or development tasks.

If we are working on a new project or development task, use the Order preprocessing service interface instead.

This service will perform the following tasks on an order:

Note that the order may or may not have originated from WebSphere Commerce. If the order does exist, it will be updated based on the information provided in the request. If the order does not exist, a temporary order will be created based on the information provided in the request. Then the tasks described above will be performed. Finally, the order, with updated prices, adjustments and charges, will be returned as the response.

Requests to this service are in the form of PreprocessSalesOrder business object documents (BODs). Responses of this service are in the form of ShowSalesOrder BODs, or SOAPFaults in case of exceptions.


Mapping

This service is mapped to the SalesOrderPreprocess command. The following table describes how the PreprocessSalesOrder BOD will be mapped to the input parameters of this command

XPath Input Parameter Mandatory Description
DataArea/SalesOrder/SalesOrderHeader this element contains the order level information
DataArea/SalesOrder/SalesOrderHeader/DocumentID/ID orderId n the WebSphere Commerce order ID, if the order originates from WebSphere Commerce
DataArea/SalesOrder/SalesOrderHeader/CustomerParty/PartyIDs/ID customerId y the customer's WebSphere Commerce user ID
DataArea/SalesOrder/SalesOrderHeader/SalesOrganizationIDs/ID storeId y the WebSphere Commerce store ID
DataArea/SalesOrder/SalesOrderHeader/TransportationTerm[i] each of these elements represent a shipping charge override
DataArea/SalesOrder/SalesOrderHeader/TransportationTerm[i]/FreightTermCode shipModeId_i n the WebSphere Commerce shipping mode ID of the shipping charge override
DataArea/SalesOrder/SalesOrderHeader/TransportationTerm[i]/PolicyID shipChargTypeId_i n the WebSphere Commerce shipping charge type ID of the shipping charge override
DataArea/SalesOrder/SalesOrderHeader/TransportationTerm[i]/AccountNumber shipCarrAccntNum_i n the shipping carrier account number of the shipping charge override
DataArea/SalesOrder/SalesOrderHeader/TransportationTerm[i]/Discount/PaymentBasisCode overrideReasonCode_i n the override reason code of the shipping charge override
DataArea/SalesOrder/SalesOrderHeader/TransportationTerm/Discount/DiscountPercent adjustmentPercentageValue_i n the adjustment percentage value of the shipping charge override
DataArea/SalesOrder/SalesOrderLine[j] each of these elements represent an orderitem
DataArea/SalesOrder/SalesOrderLine[j]/LineNumber orderItemId_j n the WebSphere Commerce orderitem ID of the j-th orderitem
DataArea/SalesOrder/SalesOrderLine[j]/Item/ItemID/ID catEntryId_j n the WebSphere Commerce catalog entry ID of the j-th orderitem
DataArea/SalesOrder/SalesOrderLine[j]/Item/SupplierItemID/ID partNumber_j n the part number (SKU) of the j-th orderitem
DataArea/SalesOrder/SalesOrderLine[j]/Item/Specification/Property/NameValue[@name="contractId"] contractId_i n the WebSphere Commerce contract ID of the j-th orderitem
DataArea/SalesOrder/SalesOrderLine[j]/Item/Specification/Property/NameValue[@name="offerId"] offerId_i n the WebSphere Commerce offer ID of the j-th orderitem
DataArea/SalesOrder/SalesOrderLine[j]/Quantity quantity_j y the quantity of the j-th orderitem
DataArea/SalesOrder/SalesOrderLine[j]/Quantity/@unitCode UOM_j n the unit of measure (UOM) of the quantity above
DataArea/SalesOrder/SalesOrderLine[j]/UnitPrice this element represents the price override of the j-th orderitem, if any
DataArea/SalesOrder/SalesOrderLine[j]/UnitPrice/Amount price_j n the price of the price override
DataArea/SalesOrder/SalesOrderLine[j]/UnitPrice/Amount/@currencyID currency_j n the currency of the price override
DataArea/SalesOrder/SalesOrderLine[j]/SpecialPriceAuthorizationCode overrideReasonCode_j n the override reason code of the price override
DataArea/SalesOrder/SalesOrderLine[j]/TransportationTerm/FreightTermCode shipModeId_j n the WebSphere Commerce shipping mode ID of the j-th orderitem
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address this element represents the shipping address of the j-th orderitem
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address/ID addressId_j n the WebSphere Commerce address ID of the shipping address
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address/LineOne address1_j n the line 1 field of the shipping address
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address/LineTwo address2_j n the line 2 field of the shipping address
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address/LineThree address3_j n the line 2 field of the shipping address
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address/CityName city_j n the city field of the shipping address
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address/ CountrySubDivisionCode[@name="state"] state_j n the state field of the shipping address
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address/CountryCode country_j n the country field of the shipping address
DataArea/SalesOrder/SalesOrderLine[j]/ShipToParty/Location/Address/PostalCode zipCode_j n the zip code field of the shipping address


Example

The following is a sample request and its corresponding response:

Response:


WSDL

The WSDL file of this service can be found in the following JAR file:

Under the following path:


Related tasks
Enable WebSphere Commerce as a service provider


Related reference
Inbound web services provided