Legacy platform

Add a new product

When the customer wants to purchase a new product as part of an existing order, the store associate should be able to add the new product to the existing order and capture payment details appropriately.

If the customer wants to carry products from the store, the store associate can scan the products. Alternatively, the store associate can search for a product by using keywords or Product ID in the product search field.
  • If the store associate scans a product, the translateBarCode API is called to translate the barcode to product ID and the product is automatically added to order with default quantity as 1.
  • If the store associate searches for a product, the Find Products screen is displayed where the store associate can select the product, choose the fulfillment method, increase or decrease the quantity of the product, and so on.
    The store associate can click the Share button to share the product details with the customer. On the Share pop-up window, the store associate can share the product details through email by default. The customer's registered email address is automatically populated and if the email address does not exist, the store associate can manually enter an email address. When the store associate clicks the Email button, the product details are sent to the customer. Similarly, the store associate can send product details to multiple email addresses by entering the email addresses manually.
    Note: You can also add multiple sharing options through customization. Similarly, you can customize the default email service as required.
    If the store associate does not have the "Email Product details" resource permission and the Share button has only the Email option, then the Share button is not seen on the screen.

    Once the store associate clicks Update Cart, the Edit Order screen is displayed with the refreshed data.

The getCompleteItemList API is called to retrieve the product details and the modifyFulfillmentOptions API is called in the pending changes mode to add the product to the order. The getCompleteOrderDetails API is called to refresh the screen with a message indicating the updated order total and the due payment or refund for the order.

Changes made to the order are committed to the database only when the store associate clicks Save. The changeOrder API is called to save the changes made to the order. If the changes are successfully saved to the order, an appropriate success message is displayed and the store associate can proceed to update payment details. Before moving to Capture Payment screen, the following rules are validated:
  • WSC_STORE_RESERVATION_REQUIRED: This rule is used to determine whether inventory reservation is required or not.
  • WSC_STORE_LARGE_ORDER : This rule is used to determine whether the current order is a large order or not. The availability checks and inventory reservation are delayed until after order confirmation for large orders. An appropriate message is displayed to the store associate in such cases.
Based on the rules, if the application determines that inventory reservation is required, the reserveOrder API is called, which includes the logic to check inventory availability. If inventory reservation is not required and the order is not a large order, then inventory availability is checked for Shipping order lines. However, for Pickup and Carry order lines, the application can determine the availability in real-time.

If the products are not available, then the store associate is not allowed to proceed to the Capture Payment screen.

Note: In the order modification flow, a store associates cannot add carry order lines to the order. Therefore, when a store associate scans products in the order modification flow, they are added as pickup order lines by default.