Run a sample order orchestration flow

Completed

This unit describes the steps that are required for running a sample order orchestration flow in Intelligent Order Management.

Set up a customer

To set up a customer, follow these steps:

  1. Go to Customers > Accounts.
  2. Select New.
  3. For Account Name, enter DefaultAccount-LabOrderIntakeProvider.
  4. Select Save & close.

Set up account mapping

To set up account mapping, follow these steps:

  1. In the lower-right corner of your Intelligent Order Management application page, change the area from IOM to Configurations. If you use a left-to-right (LTR) language, this setting is located in the lower-left corner of your application screen.
  2. Go to Mappings > Accounts.
  3. Select New.
  4. On the New Account Mapping page, enter the following information:
    • For IOM Provider, enter LabOrderIntakeProvider.
    • For Customer, enter DefaultAccount-LabOrderIntakeProvider.
    • For External Field Name, enter ProviderName.
    • For External Field Value, enter LabOrderIntakeProvider.
  5. Select Save & close.

Set up pricelist mapping

To set up pricelist mapping, follow these steps:

  1. Go to Mappings > Price Lists.
  2. Select New.
  3. On the New IOM Price List Mapping page, enter the following information:
    • For IOM Provider, enter LabOrderIntakeProvider.
    • For Price list, enter MasterPriceList.
    • For External Field Name, enter ProviderName.
    • For External Field Value, enter LabOrderIntakeProvider.
  4. Select Save & close.

Set up unit mapping

To set up unit mapping, follow these steps:

  1. Go to Mappings > Units.
  2. Select New.
  3. On the New IOM Unit Mapping page, enter the following information:
    • For IOM Provider, enter LabOrderIntakeProvider.
    • For Unit, enter ea.
    • For External Field Name, enter unit.
    • For External Field Value, enter each.
  4. Select Save & close.

Set up product mapping

To set up product mapping, follow these steps:

  1. Go to Mappings > Products.
  2. Select New.
  3. On the New IOM Product Mapping page, enter the following information:
    • For IOM Provider, enter LabOrderIntakeProvider.
    • For Product, enter Barista Home.
    • For External Field Name, enter sku.
    • For External Field Value, enter 883988211855.
  4. Select Save & close.

Sample sales order payload

The following example shows a sample sales order payload.

{
  "ordernumber": "LabOrder001",
  "shiptocity": "BELLEVUE",
  "shiptostateorprovince": "WA",
  "shiptocountry": "US",
  "shiptozip": "98007",
  "billtocity": "BELLEVUE",
  "billtostateorprovince": "WA",
  "billtocountry": "US",
  "billtozip": "98007",
  "orderdetails": [
    {
      "sku": "883988211855",
      "unit": "each",
      "quantity": 110
    }
  ]
}

Lab scenario

The lab scenario is as follows:

  1. The order enters Intelligent Order Management as an email attachment.
  2. Validate the order header to make sure that the Ship to Country/Region setting is US.
  3. Validate the order line to make sure that the Quantity is set as greater than 1.
  4. Route the order based on quantity.
    • If Quantity >= 100, send to the Seattle store.
    • If Quantity < 100, send to the Chicago store.
  5. If the order is routed to the Seattle store, emails that have the fulfillment order attached will be sent.
  6. If the order is routed to the Chicago store, a request that has the fulfillment order as payload will be sent to the RequestBin.

Test runs

In this lab, you'll try four test runs.

Test run 1

To complete test run one, follow these steps:

  1. Save the sample sales order payload as a JSON file and then attach it to an email with the subject LabOrderIntakeOrder.
  2. Send the email to the Outlook account that you used previously to set up the LabOrderIntake provider.

You'll receive two emails with the fulfillment details attached. The order status reason will be set to Sent To Fulfillment.

Test run 2

To complete test run two, follow these steps:

  1. Change the ordernumber value to LabOrder002 and the Quantity to 10.
  2. Save the sample sales order payload as a JSON file and then attach it to an email with the subject LabOrderIntakeOrder.
  3. Send the email to the Outlook account that you used previously to set up the LabOrderIntake provider.

You'll receive two requests with fulfillment details in your RequestBin. The order status reason will be set to Sent To Fulfillment.

Test run 3

To complete test run three, follow these steps:

  1. Change the ordernumber value to LabOrder003 and the Quantity to 1.
  2. Save the sample sales order payload as a JSON file and then attach it to an email with the subject LabOrderIntakeOrder.
  3. Send the email to the Outlook account that you used previously to set up the LabOrderIntake provider.

The order will fail the line minimum quantity validation, with the header status reason of Order Validation Failed. The line status reason will be Order Line Validation Failed.

Test run 4

To complete test run four, follow these steps:

  1. Change the ordernumber value to LabOrder004 and the shiptocountry value to CA.
  2. Save the sample sales order payload as a JSON file and then attach it to an email with the subject LabOrderIntakeOrder.
  3. Send the email to the Outlook account that you used previously to set up the LabOrderIntake provider.

The order will fail the header Ship to Country/Region validation, with status reason of Order Validation Failed.