Configure Integration Flows for Orders

As an administrator, you configure the integration system based on how the consumer goods application manages order requests and how it updates the values in staging tables.

Types of Order Requests

The consumer goods application updates the staging tables based on the type of order request.

Here are the values you can use to identify the type of the order requests in the Order Request table:

New Order

The new order request has Revision Number of 1.

Update Order

The update order request has Revision Number greater than 1 and the Update Requested set to True. Additionally, corresponding order request lines should have new revision number.

Cancellation Order

The cancellation order request has Revision Number greater than 1 and the Cancellation Requested set to True. Additionally, the corresponding order request lines should have new revision number.

Note:

Remember you can only cancel the entire order and not the individual line items.

Return Order

The new order request has Revision Number of 1 and Order Type of Return. Additionally, the products to be returned are captured as its order line requests. These products may or may not be from the same order.

Direct Order (Auto-Sales)

The new order request has Revision Number of 1. Use the Use Quantity Delivered at Creation in the Order Line Request table to identify whether the sales representative has fulfilled the entire order request from the route inventory.

Sales representatives create and deliver direct orders or auto-sales orders immediately during route execution. The products delivered are captured as its order line requests using the field Quantity Delivered at Creation in the Order Line Request table.

The integrating system generates shipments and marks them as delivered using the field Quantity Delivered at Creation. In this case, the integration must handle transactions for inventory delivery such that it doesn't trigger a double decrement.

Process Order Requests

You can configure the integrating system to identify and process the order requests.

Here's how the integration system can retrieve order requests:

  1. Read the value of the Process Status field to distinguish between unprocessed and processed orders. For unprocessed orders, the value of the Process Status field is Ready to process.

  2. Set the value of Process Status to Processed after processing the orders.

Update Order Status Based on Requests

You configure the integrating system to update the status of an order along with other fields in the staging tables.

You must configure the integrating system to update the order status each time an action is taken on a request. Ensure Order Status and Order Line Status staging tables are populated from the corresponding Order Request and Order Line Request staging tables. Additionally, link the Order Line Status records to the parent Order Status records using the internal ID of the Order Status record.

Here's how the integration system must set the order status based on the action taken on an order:

On This Action

Order Status is Set To

Here's How

Order is read by integrating system and it can be fulfilled

Booked

  • In the Order Status table, creates a record with the value of Status and Last Request Status as Booked.

  • In the Order Line Status table, creates a record for each order line with the value of Status and Last Request Status as Booked.

Order is read by the integrating system and it can't be fulfilled

Booking Rejected

  • In the Order Status table, creates a record with the value of Status and Last Request Status as Booking Rejected.

  • In the Order Line Status table, creates a record for each order line with the value of Status and Last Request Status as Booking Rejected.

Some of the order lines are delivered

Partially Delivered

  • In the Order Status table, creates a record with the value of Status and Last Request Status as Partially Delivered.

  • In the Order Line Status table, creates a record for each order line with the value of Status and Last Request Status as Partially Delivered.

    Note:

    For each order line not delivered, creates an Order Line Status record with the previous status value.

All order lines are delivered

Delivered

  • In the Order Status table, creates a record with the value of Status and Last Request Status as Delivered.

  • In the Order Line Status table, creates a record for each order line with the value of Status and Last Request Status as Delivered.

An update to order is requested through order revision

Booked or Partially Delivered

Note:

In an order revision, multiple order lines may have updates. The integration doesn't support partial updates or updates to some of the order lines in the order. Either accepts all the updates in an order revision or rejects all the updates.

If the updated order can be fulfilled:

  • In the Order Status table, creates a record with the value of Status as either Booked or Partially Delivered, as applicable, and Last Request Status as Updated.

  • In the Order Line Status table, creates a record for each order line with the value of Status as either Booked or Partially Delivered, as applicable, and Last Request Status as Updated.

If the updated order isn't fulfilled:

  • In the Order Status table, creates a record with the value of Status as either Booked or Partially Delivered, as applicable, and Last Request Status as Update Rejected.

  • In the Order Line Status table, creates a record for each order line with the value of Status as either Booked or Partially Delivered, as applicable, and Last Request Status as Update Rejected.

Order cancellation request

Canceled or Canceled Rejected

If the order can be canceled:

  • In the Order Status table, creates a record with the value of Status and Last Request Status as Canceled.

  • In the Order Line Status table, creates a record for each order line with the value of Status and Last Request Status as Canceled.

If the order isn't canceled:

  • In the Order Status table, creates a record with the value of Status as either Booked or Delivered, as applicable, and Last Request Status as Canceled Rejected.

  • In the Order Line Status table, creates a record for each order line with the value of Status as either Booked or Delivered, as applicable, and Last Request Status as Canceled Rejected.