Salesforce Flow Orchestrator - Implementation Details & Use Case Demonstration
Flow Orchestrator is considered as the future of Salesforce Automation. In this blog let us see the basics of flow orchestrator and a detailed Implementation example.
1. What is Flow Orchestrator
It helps to automate/orchestrate complex business operations, which involves multiple steps, multiple users from multiple departments. You can also sequence these operations. The core building block of flow orchestrator is flow itself. Assigned users access their part of the orchestration through a single Lightning page component.
2. When this can be used
Below are some use cases where you will be able to use Flow Orchestrator:
- Advanced Approval Process
- New employee onboarding process where you need interaction/approval from multiple departments
- Interactive update to a record where we need input from multiple people
3. How to Create Flow Orchestrator
From set up, Flow->New Flow->Select All+Templates->Flow Orchestrator
4. Types of Flow Orchestrator
Like you can see in the above diagram, there are 2 types of flow orchestrators:
1. Autolaunched Orchestration
An auto launched orchestration is triggered manually using our REST API or an Apex class
and must be linked to a specific record ID in order to be displayed on a record page in Salesforce.
2. Record-Triggered Orchestration
A record-triggered orchestration is triggered when a new record is created, updated, or deleted in
Salesforce. You can trigger before or after the record is saved.
5. Building Blocks of Flow Orchestrator
6. Flow Orchestrator Anatomy
Each element represents an action that can be executed. Orchestrations use Stage and Decision elements.
2. Connector
Defines an available path that the orchestration can take at run time
3. Stage
Consists of one or more steps
4. Resource
Represents a value that we can refer through Stage, step or decision
7. Steps Cycle
8. Advantages
- The feature is still in Beta
- Currently, each step can be assigned to a specific user mentioning a username. A lookup field or role cannot be mentioned as the assignee.
- See other limits below:
Let us see how we can automate a complex approval process scenario using Flow Orchestrator.
Step 1: Opportunity Approval Process
Create a simple approval process in Opportunity with just 2 steps and no approval action. Because we are going to perform all actions as part of flow orchestrator.
As you can see step 1 will be assigned to Sales manager user and second step to my own user.
Steps 2 : Create Flow Orchestrator
As mentioned before create a new flow orchestrator of type record-Triggered Orchestrator.
Do the initial Object selection and criteria set up:
As per our criteria this Flow Orchestrator should be executed when Opportunity stage is Value Proposition.
Step 3: Automatically Submit for Approval
For this follow below steps:
1. Create a new stage "Submit for Approval" as shown below:
Inside the stage click on + symbol and add a background step as shown below:
In this you can see I have selected an existing flow which actually does Submit for approval, and passing current opportunity id as a parameter to the flow.
The flow looks like below:
which call the submit for approval action.
3. Add Decision - Amount<10K
The decision box looks like below and add 2 stages based on the decision outcome:
Stage
Step 1 - Reject Opportunity
Here you can see we are calling a flow - Opportunity Rejection Action - autolaunched flow- passing record id as a paramter. Flow looks like below:
This calls an Apex Action, which actually does rejection operation:
Screen flow to display message
Step 5 - Approval Action 1 - Check for Duplicates
As a default outcome, if opportunity is not rejected, we have a new Stage for Approval Actions, which is a 2 step stage as shown below:
Stage:
As per the Opportunity approval process, now Opportunty will be assigned to Sales Manager for approval. So he will be getting a screen where duplicate opportunity records will be listed.
Logic to find out Duplicate records - Open Opportunities under same Account which has same products added.
This one again calling a screen flow which lists duplicates opportunities if any, and user can either approve or reject the opportunity based on duplicate deals.
Step 2 - Verify Discount and Approve/Reject Opportunity
If the opportunity is getting approved, based on the approval process, this will be assigned to second user.
And he will be seeing doscount amount on screen and will be getting 3 options:
1. Confirm value and approve
2. Update value and approve
3. Reject
Step looks like below:
This step call a screen flow - Update Discount. The flow details are shown below:
If user is approving the approval process is also marked as Complete.
Steps 6 - Add Flow Orchestrator to Opportunity PageLayout
Edit Opportunity Page in App Builder and from components section drag and drop work guide. This is the section where all flow orchestrator actions for a particular user will be displayed.
Demo
Watch this demo to see Flow Orchestrator in Action.
Reference
https://help.salesforce.com/s/articleView?id=sf.orchestrator_flow_orchestrator.htm&type=5
Nice Information.
ReplyDeleteAlso Try : https://ayansoftwares.com/guestblogs/what-is-record-triggered-orchestration-and-how-to-create-it/
Site Reliability Engineering Training
ReplyDeleteSRE Training in Hyderabad
Site Reliability Engineering Training in Hyderabad
Site Reliability Engineering Online Training
Site Reliability Engineering Training Institute in Hyderabad
SRE Training Course in Hyderabad
SRE Online Training in Hyderabad