Error handling during the order creation process

Errors can occur at various points within the order creation process. These are the errors that can occur during the order process, how the system attempts to resolve them, and (if applicable) what is required to configure error reporting.

Note: No error notification is sent to WebSphere Commerce for errors that occur during order creation. Also, createOrder_OnSuccess event notification is pushed to WebSphere Commerce only for orders that are not in Draft status and are created from the WebSphere channel; that is, their EntryType="WCS."
Table 1. Order creation errors, system response, and action required

Symptom Where and why error occurs What system does or attempts to do User action required?
Create order fails and alert is received in WebSphere Commerce (that is, error occurs in WebSphere Commerce or in Sterling Order Management )

The error occurs before the order message is dropped into createOrder message queue.

Why error occurs: JMS queue to which WebSphere Commerce publishes is down or Sterling Order Management is unable to drop the message into the message queue.

WebSphere Commerce identifies exception and resends the createOrder message. None; WebSphere Commerce resends createOrder message.
Note: A store-level scheduler job named OrderRetransfer picks up orders that are in F status ("pending on transfer," where WebSphere Commerce has sent out a asynchronous OrderTransfer message but not received createOrder_OnSuccess event notification) for a configurable length of time. That time is configured as a value of the "orderPendingOnTransferExpirationTime" property in xml/config/com.ibm.commerce.order-fep/wc-admin-component.xml.
Alert and exception are raised in Sterling Order Management (that is, error occurs in Sterling Order Management)

Occurred after message is dropped into queue by the Sterling Order Management

Why error occurs: One of the following has occurred:
  • Incorrect data sent in the input order XML
  • The createOrder API was not successful in executing. As a result, ON_SUCCESS does not put the message in the JMS queue.
  • System issues, such as a query timeout, occurred during the execution of the createOrder API in Sterling Order Management

The create order JMS queue (JMS receiver) is configured such that the error is can be processable (IsReprocessible=”Y”).

If an error occurs during createOrder API, an exception is logged in the exception console and an error is captured as an alert in the YFS_INBOX table.

  1. Monitor the alert queue to which the service is configured, or search directly by order number on the Sterling Order Management order management alert console.
  2. Correct the XML message. The alert console notifies which part of the XML message is incorrect. The administrator can fix the issue according to this information from the alert console. Also correct the XML on WebSphere Commerce , if required, so that error does not reoccur.
  3. Click on the reprocess action in the Sterling Order Management Exception console to trigger the createOrder service again. This resolves the error in the exception console and the Alert console. After reprocessing the error, the Sterling createOrder service is triggered again.
  4. Once the order is successfully created in Sterling Order Management, an acknowledgment message is published via the ON_SUCCESS event in the message queue, which will be picked up by the Sterling Order Management .
Order is created successfully in Sterling Order Management but acknowledgment is not received by WebSphere Commerce.

Occurs after createOrder API call in Sterling Order Management executes successfully.

Why error occurred: May be due to Sterling Order Management, failing to retrieve the creation acknowledgment from Sterling Order Management.

Order is created successfully, but WebSphere Commerce does not get notification to handle the temporary copy.

No action required. maintains status of temporary order copy to accommodate rollback or message reprocessing.

The order has been successfully created in Sterling Order Management, which can process the order. In WebSphere Commerce, when the shopper tries to view the list the history orders in the My Account section of the storefront, WebSphere Commerce merges the local order copy with orders which have been successfully confirmed as being created by Sterling Order Management. In this case, since the same order would be in WebSphere Commerce local order copy status and returned by Sterling Order Management at the same time, WebSphere Commerce detects the situation and updates the local order copy status to "G"; that is, it marks the order in WebSphere Commerce as successfully created in Sterling Order Management.