+
+

Lab 2: Complete a pre-drafted Flow Orchestration to orchestrate the whole process

Overview

  1. In this lab you will start from the following pre-built orchestration

    module6 orch flow prebuilt
  2. At the end you will have fully implemented version of the orchestration completed as follow (highlighted the parts you’ll build as part of this module).

    module6 orch flow complete

Step 1: Create a copy of the Record Triggered Orchestration

  1. Login into the Salesforce Developer ORG and access the Setup menĂ¹.

    module6 setup menu
  2. Search for Flows in the Quick Find text field and click Flows under Process Automation.

    module6 quick find flows
  3. Select the Orchestration Lab’s Flows list view from the drop down menu in the top left section.

    module6 flow lab list view
  4. Click the LAB - ORCH - Order Update (Draft) flow label link from the list.

    module6 ord upd draft orch link
  5. Once the flow is opened click the Save As button on the top right.

    module6 save as flow
  6. Select Save as A New Orchestration and provide <your-initials> - ORCH - Order Update as Flow Label. Click outside the label field and the Orchestration API Name should appear automatically.

    Click the Save button.

    module6 save as rec tri orc

Step 2: Analize the pre-built orchestration

  1. The pre-built orchestration comes with two stages. We will focus on the first one (Update Order in Salesforce) since the second one has a more technical goal.

  2. The Update Order in Salesforce stage orchestrates the activities in charge of the service agent and the warehouse manager.

  3. When the stage starts the service agent is notified and an interactive step Submit Order Update is assigned to the NTO Chat Agents queue. Click the step to learn more about how it is configured.

    module6 sub ord up step
  4. Only when the step Submit Order Update completes the Warehouse manager is assigned with Order Update Approval interactive step.

    module6 ord upd app step

Step 3: Draft the 2nd part of the orchestration

  1. Click the add element button after the Update Order in Salesforce stage and before the stage Update Order in External Systems.

    module6 add element btn
  2. Select the Decision element to add it.

    module6 add decision ele
  3. Enter Is shipping option approved? as Label and Is_shipping_option_approved as API Name. We will complete the configuration later.

    module6 draft decision
  4. Click the add element button in the decision element right path.

    module6 add element btn
  5. Select the End element to add it.

    module6 add end ele
  6. At this point you should have something like this.

    module6 draft 1st part
  7. Click the add element button after the Update Order in External Systems stage.

    module6 add element btn
  8. Select the Stage element to add it.

    module6 add stage ele
  9. Enter Notify Customer as Label and NotifyCustomer as API Name. We will complete the configuration later.

  10. The fully drafted process should looks like as follow.

    module6 draft complete
  11. Click the Save button in the top-right corner.

    module6 save btn

Step 4: Configure the triggering condition

  1. Select on the Record-Triggered Orchestration Start element and click Edit.

    module6 start element
  2. Update the Set Entry Conditions by adding the following condition

    Field Operator Value

    Subject

    Starts With

    <your-initials>-

    module6 subject entry condition

Step 5: Configure the "Is shipping option approved?" decision element

  1. Select the Is shipping option approved? decision element and click Edit.

    module6 decision edit
  2. Configure the first outcome details as follow

    Field Value

    Label

    Yes

    Outcome API Name

    Yes

    Condition Requirements to Execute Outcome

    All Conditions Are Met (AND)

  3. Configure the first outcome conditions as follow

    Resource Operator Value

    {!$Record.warehouseApproval__c}

    Equals

    {!$GlobalConstant.True}

    module6 decision conf wiz
  4. Label the Default Outcome as No

    module6 decision complete

Step 6: Configure the "Update External System" stage

Add Background Steps

  1. Click the Add Step button within the Update Order in External Systems stage.

    module6 add step btn
  2. Select the background step option

    module6 add background step
  3. Set Update Order in OMS as Label and Update_Order_in_OMS as API name. Configure the step as follow.

    Field Value

    Condition

    When the stage starts, the step starts

    Action

    NTO - AUTO - Update Order in Legacy OMS

    Contains external callouts or pause elements

    true (Marks background step to be processed asynchronously to prevent orchestration errors.)

    businessJustification

    {!$Record.BusinessJustification__c}

    caseId

    {!$Record.Id}

    shippingDate

    {!$Record.ShippingDate__c}

    module6 oms step

Configure Stage Exit Conditions

  1. Select the Update Order in External Systems stage and then click the Edit Element button.

    module6 edit stage btn
  2. Configure the exit condition as follow.

    Field Value

    Condition

    When the specified requirements are met, the stage is marked Complete

    Requirements to Complete Stage

    All Requirements Are Met (AND)

  3. Add the following requirements.

    Resource Operator Value

    {!$Record.OMSId__c}

    Is Null

    {!$GlobalConstant.False}

    {!$Record.SAPId__c}

    Is Null

    {!$GlobalConstant.False}

    {!$Record.NetSuiteId__c}

    Is Null

    {!$GlobalConstant.False}

    module6 upd ext sys exit cond

Step 7: Configure the "Notify Customer" stage

Add Interactive Step

  1. Click the Add Step button within the Notify Customer stage.

    module6 add step btn
  2. Select the interactive step option

    module6 add interactive step
  3. Set Review Updates & Notify Customer as Label and Service_Agent_Review as API name. Configure the step as follow.

    Field Value

    Condition

    When the stage starts, the step starts

    Action

    NTO - SCRN - Agent Review & Customer Notification

    caseId

    {!$Record.Id}

    Assignee Type

    Queue

    Queue

    NTO Chat Agents

    Related Record ID

    {!$Record.Id}

    Condition

    When the assigned user has completed the screen flow, the step is marked Complete

    module6 rev upd not cus step

Add Background Step

  1. Click the Add Step button within the Notify Customer stage after the Review Updates & Notify Customer step.

    module6 add step btn
  2. Select the background step option

    module6 add background step
  3. Set Notify Review Order Updates Assignment as Label and Notify_Review_Order_Updates_Assignment as API name. Configure the step as follow.

    Field Value

    Condition

    When the stage starts, the step starts

    Action

    NTO - AUTO - Send Custom Notification

    Contains external callouts or pause elements

    false

    body

    You have been assigned to review external systems updates for an order change request.

    caseId

    {!$Record.Id}

    queueName

    NTO Chat Agents

    title

    Order Update Notification Request: {!$Record.Subject}

    module6 notify rev step

Step 8: Activate the Orchestration

  1. Click the Save button in the top-right corner.

    module6 save btn
  2. Click the Activate button in the top-right corner.

    module6 activate btn
Submit your feedback!
Share your thoughts to help us build the best workshop experience for you!
Take our latest survey!