Store interactions with a distributed order management system

When you integrate your store to use an external DOM system to handle orders, your store communicates with the external system in the following scenarios.

  • When a shopper submits an order in the checkout flow.
  • When a shopper accesses the Order History page from the My Account page.
  • When a shopper views the details of a specific order from the Order History page.

Checkout flow

The following image depicts the checkout flow in a store that is integrated with a DOM system for order management only, and is using a non-ATP inventory model where items are added to the shopping cart only when there is enough stock in the online store's fulfillment center.

DOM integration flow for checkout

  1. If there is enough stock of an item in the online store's fulfillment center, the item can be added to the cart. When the shopper adds an item to the shopping cart, your store uses the order component's ChangeOrder service, with the Create action code. The ChangeOrder service and Create action code adds the item to the shopping cart with the selected fulfillment options.

    When a DOM inventory system is used, a shopper can add out of stock items to their shopping cart by default. While the out of stock items can be added to the cart, the cart cannot be submitted until an inventory reservation from is sent to HCL Commerce to indicate that the required inventory is allocated. The service calls the Inventory component's ProcessInventoryRequirement service, with the CheckInventory action code. This service retrieves the information either from the cache or from DOM by creating an outbound GetInventoryAvailability service request by using the ExternalInventory component. This service then uses the information to get the inventory statuses of the order items, which are used by the DoInventoryAction command to update the order items.

    You can customize the checkout process to prevent out of stock items from being added to the cart. Within a DOM inventory integration, the add to cart process calls the DOMValidateInventoryStatusCmd command, which you can customize to check the inventory status from the ORDERITEMS database table. If the inventory status (INVENTORYSTATUS column) is not allocated (column value of NALC) for an item that a shopper is attempting to add to their cart, customize the process to throw an exception. This behavior prevents the item from being added to the cart.

  2. When the shopper initiates the checkout process, your store uses the order component's ProcessOrder service, with the Prepare action code, to prepare the shopping cart for submission. This includes reserving inventory and evaluating promotions, shipping, and taxes.

    When a DOM inventory system is used, the service calls the Inventory component's ProcessInventoryRequirement service, with the ReserveInventory action code. The service creates an outbound ProcessInventoryRequirement service request, with the ReserveInventory action code to DOM that uses the ExternalInventory component. It then uses the information to update the fulfillment options and inventory statuses of the order items.

  3. After the shopper reviews the order, enters payment information, and submits the order, your store uses the order component's ProcessOrder service. With the Submit action code, the order is submitted for processing.
  4. The service or command calls the PrimePayment command to authorize the payment. It then updates the order status, sends an order confirmation email to the shopper, and raises the OrderSubmit event. This triggers OrderSubmitEventListenerImpl, which calls the ProcessOrderSubmitEvent command.

    When a DOM inventory system is used, the command transfers the order to DOM for further processing by creating an outbound ProcessOrder service request, with the Transfer action code, by using the ExternalOrder component. This command then calls the Inventory component's ProcessInventoryRequirement service, with the DecrementCache action code, to decrement the cache.

  5. As the order management system processes the order, the order fulfillment status updates, for example, order items that are shipped, to HCL Commerce. The order fulfillment status updates are sent by using the order component's SyncOrder service, with the Change action code. The service updates the order and shipment records in HCL Commerce, and depending on the order fulfillment status, sends a notification email to the shopper, detailing the update.

Order History flow

The following image depicts the Order History flow in a store that is integrated with a DOM system for order management only.

DOM integration flow for checkout

  1. A shopper views the My Account > Order History page.
  2. The GetOrderHistory service calls out to the DOM system to get a list of the shopper's previous orders.
  3. The DOM system processes the request and sends a response that is captured by the Order History page.

Order Details flow

The following image depicts the Order Details flow in a store that is integrated with a DOM system for order management only.

DOM integration flow for checkout

  1. A shopper selects an order from the Order History page.
  2. The GetOrderDetails service calls out to the DOM system to get the order details such as the purchased items, price, and shipping information.
  3. The DOM system processes the request and sends a response that is captured by the Order Details page.