WebSphere Commerce Enterprise

Get Order

The GetOrder outbound service interface is used to retrieve order statuses from an external system. GetOrder sends out request business object document (BOD) to the external system. The expected response BOD includes order level information and information for all the order items.

Request

Request to this outbound service interface is in the form of a GetOrder BOD. The definition of a GetOrder BOD can be found in the XML schema file WC_eardir/WebServicesRouter.war/component-services/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/GetOrder.xsd. The service data object (SDO) interface of the GetOrder BOD is com.ibm.commerce.order.datatypes.GetOrderType..

Response

Response to a successful request is a ShowOrder BOD. The XML schema of the ShowOrder BOD can be found in the XML schema file WC_eardir/WebServicesRouter.war/component-services/xsd/OAGIS/9.0/Overlays/IBM/Commerce/BODs/ShowOrder.xsd. The service data object (SDO) interface of the ShowOrder BOD is com.ibm.commerce.order.datatypes.ShowOrderType

Message type

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

Usage scenarios

List order statuses

There are two usage scenarios for the GetOrder outbound service interface: list order statuses and display order details.
  1. To list the status of orders submitted by a shopper, the storefront calls the inbound service GetOrder by com.ibm.commerce.order.facade.client.OrderFacadeClient. findByOrderStatus(String[] orderStatusTypes, boolean isSummary).
  2. The implementation of inbound GetOrder service is com.ibm.commerce.order.facade.server.commands.FetchExternalOrderByStoreMemberAndStatusCmdImpl. The outbound GetOrder service is called by com.ibm.commerce.order.facade.server.external.ExternalOrderFacadeClient.getOrder(GetOrderType aGetOrder). The XPath used to request the outbound GetOrder service is /Order[BuyerIdentifier[(DistinguishedName=)] and OrderStatus[(Status=)] and StoreIdentifier[ExternalIdentifier[(NameIdentifier=)]]], com.ibm.commerce.order.facade.server.commands.ComposeExternalOrderCmdImpl composes the orders which are retrieved from an external system
  3. The storefront reads the response data from the external system and displays the order information.
Note: FetchExternalOrderByStoreMemberAndStatusCmdImpl.fetchOrders(GetType getVerb) is a recommended extension point to customize the request to the outbound GetOrder service.

Display order details

  1. To display details of a submitted order with specific external order id, the storefront calls the inbound service GetOrder by com.ibm.commerce.order.facade.client.CommonOrderFacadeClient. findOrderByExternalOrderID(String[] astrOrderId).
  2. The implementation of inbound GetOrder service is com.ibm.commerce.order.facade.server.commands.FetchOrderByExternalOrderIdCmdImpl, it calls the outbound GetOrder service by com.ibm.commerce.order.facade.server.external.ExternalOrderFacadeClient.getOrder(GetOrderType aGetOrder). The XPath used to request the outbound GetOrder service is /Order[OrderIdentifier[(ExternalOrderID=)]and StoreIdentifier[ExternalIdentifier[(NameIdentifier=)]]]. com.ibm.commerce.order.facade.server.commands.ComposeExternalOrderCmdImpl composes the order which is retrieved from an external system.
  3. The storefront gets the order detail info from the response and displays it to the shopper.
Note: FetchOrderByExternalOrderIdCmdImpl.fetchOrders(GetType getType) is a recommended extension point to customize the request to the outbound GetOrder service