WebSphere Commerce Enterprise

Transfer order

The TransferOrder outbound service interface is used to transfer an order to an external system. The request business object document (BOD) contains detailed information of both the order level and the order item level. The expected response BOD contains external order ID.

Request

A request to the outbound service interface is a ProcessOrder BOD with the action code TransferOrder. The definition of the ProcessOrder BOD can be found in the XML schema file WC_eardir/WebServicesRouter.war/component-services/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ProcessOrder.xsd. The service data object (SDO) interface of the ProcessOrder BOD is com.ibm.commerce.order.datatypes.ProcessOrderType.

Response

The response to a successful request is an AcknowledgeOrder BOD with no response criteria. The XML schema of the AcknowledgeOrder BOD can be found in the XML schema file WC_eardir/WebServicesRouter.war/component-services/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/AcknowledgeOrder.xsd. The SDO interface of the AcknowledgeOrder BOD is com.ibm.commerce.order.datatypes.AcknowledgeOrderType.

Message type

This outbound service interface is mapped to the message type com.ibm.commerce.order.external.

Usage scenario

  1. When a shopper submits an order, the command com.ibm.commerce.order.commands.ProcessOrderCmd is called.
  2. Towards the end of the execution, the default implementation com.ibm.commerce.order.commands.ProcessOrderCmdImpl raises the event OrderSubmit.
  3. An event listener responds to the OrderSubmit event and calls the command com.ibm.commerce.order.event.ProcessOrderSubmitEventCmd.
  4. The default implementation of this command is com.ibm.commerce.order.event.ProcessOrderSubmitEventCmdImpl. The implementation calls an outbound service with the action code TransferOrder to transfer the order to the external system. The façade client method used to call the outbound service is com.ibm.commerce.order.facade.server.external.ExternalOrderFacadeClient.processOrder(ProcessOrderType aProcessOrder).
  5. ProcessOrderSubmitEventCmdImpl gets the external orderID from the response and stores the relationship between external orderID and internal orderID in the table ORDSTAT.
Note: ProcessOrderSubmitEventCmdImpl.transferOrder() is a recommended extension point to customize the request to the outbound TransferOrder service.