
Lab 2: Complete a pre-drafted Flow Orchestration to orchestrate the whole process
Overview
-
In this lab you will start from the following pre-built orchestration
-
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).
Step 1: Create a copy of the Record Triggered Orchestration
-
Login into the Salesforce Developer ORG and access the Setup menĂ¹.
-
Search for
Flows
in the Quick Find text field and clickFlows
under Process Automation. -
Select the
Orchestration Lab’s Flows
list view from the drop down menu in the top left section. -
Click the
LAB - ORCH - Order Update (Draft)
flow label link from the list. -
Once the flow is opened click the
Save As
button on the top right. -
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.
Step 2: Analize the pre-built orchestration
-
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. -
The
Update Order in Salesforce
stage orchestrates the activities in charge of the service agent and the warehouse manager. -
When the stage starts the service agent is notified and an interactive step
Submit Order Update
is assigned to theNTO Chat Agents
queue. Click the step to learn more about how it is configured. -
Only when the step
Submit Order Update
completes the Warehouse manager is assigned withOrder Update Approval
interactive step.
Step 3: Draft the 2nd part of the orchestration
-
Click the add element button after the
Update Order in Salesforce
stage and before the stageUpdate Order in External Systems
. -
Select the
Decision
element to add it. -
Enter
Is shipping option approved?
as Label andIs_shipping_option_approved
as API Name. We will complete the configuration later. -
Click the add element button in the decision element right path.
-
Select the
End
element to add it. -
At this point you should have something like this.
-
Click the add element button after the
Update Order in External Systems
stage. -
Select the
Stage
element to add it. -
Enter
Notify Customer
as Label andNotifyCustomer
as API Name. We will complete the configuration later. -
The fully drafted process should looks like as follow.
-
Click the
Save
button in the top-right corner.
Step 4: Configure the triggering condition
-
Select on the Record-Triggered Orchestration Start element and click
Edit
. -
Update the
Set Entry Conditions
by adding the following conditionField Operator Value Subject
Starts With
<your-initials>-
Step 5: Configure the "Is shipping option approved?" decision element
-
Select the
Is shipping option approved?
decision element and clickEdit
. -
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)
-
Configure the first outcome conditions as follow
Resource Operator Value {!$Record.warehouseApproval__c}
Equals
{!$GlobalConstant.True}
-
Label the Default Outcome as
No
Step 6: Configure the "Update External System" stage
Add Background Steps
-
Click the
Add Step
button within theUpdate Order in External Systems
stage. -
Select the background step option
-
Set
Update Order in OMS
as Label andUpdate_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}
Configure Stage Exit Conditions
-
Select the
Update Order in External Systems
stage and then click theEdit Element
button. -
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)
-
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}
Step 7: Configure the "Notify Customer" stage
Add Interactive Step
-
Click the
Add Step
button within theNotify Customer
stage. -
Select the interactive step option
-
Set
Review Updates & Notify Customer
as Label andService_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
Add Background Step
-
Click the
Add Step
button within theNotify Customer
stage after theReview Updates & Notify Customer
step. -
Select the background step option
-
Set
Notify Review Order Updates Assignment
as Label andNotify_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}
Step 8: Activate the Orchestration
-
Click the
Save
button in the top-right corner. -
Click the
Activate
button in the top-right corner.
Please proceed to Lab 3: Execute and monitor the e2e process