Scenario: shopper submits an order and views details
This scenario describes the sequence of steps that occurs when a shopper submits an order in WebSphere Commerce and the order is transferred to Sterling Order Management.
For a shopper to submit an order on the storefront, the store must have the inventory system configured as Distributed Order Management (DOM), and integration must be enabled for Sterling Order Management.
The following is the sequence of steps that occur in WebSphere Commerce and Sterling Order Management:
- The shopper is on the storefront and adds catalog entries to the shopping cart. This involves requests to the WebSphere Commerce local inventory cache for inventory availability. If inventory is not available, WebSphere Commerce issues a getInventoryAvailability synchronous call to Sterling Order Management for inventory availability. If the catalog entries are available, they are added to the shopper’s cart. If they are not available, they can be put on backorder.
- The shopper completes shipping and billing information. The shopper clicks the order button on the order confirmation page.
- When the shopper submits the order:
- If payment is in non-pending status, the OrderSubmitEvent is raised.
- If payment is in pending status, PaymentAuthorizationCompleteEvent is raised until payment is approved manually.
- During the processing of the payment, the processOrder outbound service is invoked, and the
order is transferred to Sterling Order Management
through the Service Definition Framework. Note: WebSphere Commerce can be configured to transfer the order when the order is in either OrderSubmitEvent or PaymentAuthorizationCompleteEvent.
The data sent during the order transfer is the order number, the order item list, payment information, and the shipping address. The order status in WebSphere Commerce is updated to "Hold on Transfer" status.
- The createOrder API is called in Sterling Order Management. If the order creates successfully, the ON_SUCCESS event is raised. The SCWC_SDF_createOrderOnSuccess service is invoked to send an acknowledgment to the JMS queue to notify WebSphere Commerce that the order is created. The service transfers the order number and order header key information to WebSphere Commerce.
- The processOrder inbound service in WebSphere Commerce is called to update the order status to G, "Successfully Transferred." In this status, the order has been transferred to an external system (in this case, Sterling Order Management,) which has confirmed successful order creation.
- If there is a failure in Order transfer or Order creation, this
failure is handled as follows:
If the order fails in the Transfer Order outbound service call with a "Failed To Transfer" (H) status, the RetryTransferFailedOrder scheduler picks up the failed transfer orders and retries the transfer to Sterling Order Management.
If the order fails in Sterling Order Management, no notification is sent to WebSphere Commerce. The order status remains in "Hold On Transfer" (F) status, and is not processed further. The Customer Service Representative (CSR) logs on to the Sterling Order Management console to view the alert. The customer service representative reissues the order through Sterling Order Management for the shopper.
- After successful order creation, the shopper can view the order details by clicking Order Details on the My Order page.
- In the WebSphere Commerce storefront page, the
getDataFromSSFS tag gets the order details from Sterling Order Management by calling its
SCWC_SDF_getCompleteOrderDetails API through the Service Definition Framework.
Similarly, order line details are obtained by calling the
SCWC_SDF_getOrderLineDetails API.
Users can also choose to cancel the order from the Order Details page by calling the SCWC_SDF_changeOrderRealTime API.
- The following information is returned from Sterling Order Management to
the storefront shopper:
- Order number
- Order Item List
- Payment information
- Shipping address
- Order total
- Order discount
- Tax
- Shipping cost