The article is prepared by our developer Dmitry Morozkin.
In this article we intend to discuss the flows and their changes in the summer’23. In particular, we will cover the following points:
- What is a Flow in Salesforce?
- Best Practices for Creating Flows
- Summer'23 updates
- Changes in Migrate to Flow tool
- Changes in the Flow Builder
- MuleSoft service
What is a flow in Salesforce?
The flow in Salesforce is an automation that captures all data or changes and performs logic in the org. The flow simplifies complex business processes and can be used to build code-like logic without using a programming language.
There are 5 types of the Salesforce Flows:
1. Screen Flow
These are the flows that have an UI element and require input from users. They are either launched as an action or embedded as an element on a Lightning page.
A Screen Flow can help reducing the requirement for multiple validation rules, providing a logical flow of targeting input from the user and much more. For example, create walkthrough of creating a contract by flow.
2. Record Triggered Flow
These autolaunched flows run in the background either before a record save or after the record is saved when a record is created, updated or deleted. For example, update an account when case is creating or deleting.
3. Scheduled-Triggered Flow
These autolaunched flows launch at a specified time and frequency for each record in a batch, and they run in the background. For example, delete periodically outdated data at the time set in flow.
4. Autolaunched Flow
This type makes it possible to set automated tasks to run. Autolaunched flows can be invoked from the other flows (subflow), process builder, from within an Apex class, from a set schedule, from record changes or from platform events.
5. Platform Event-Triggered Flow
When a platform event message is received, these autolaunched flows run in the background. For example, notify managers or admins when receiving a platform event.
Moreover, there is also Record-Triggered Orchestration, which is a relatively new technology in Salesforce.
Salesforce Flow Orchestrator is a new Flow functionality that allows Admins to string a number of Flows and business processes together across multiple people.
Examples include Service Delivery Orchestration (where multiple parties need to take various steps during a client delivery process in a specific order), public authorization, or escalation process where the record may need to be passed on to the different team members depending on the terms that apply to the Orchestra.
These are the flows that have an UI element and require input from users. They are either launched as an action or embedded as an element on a Lightning page.
A Screen Flow can help reducing the requirement for multiple validation rules, providing a logical flow of targeting input from the user and much more. For example, create walkthrough of creating a contract by flow.
2. Record Triggered Flow
These autolaunched flows run in the background either before a record save or after the record is saved when a record is created, updated or deleted. For example, update an account when case is creating or deleting.
3. Scheduled-Triggered Flow
These autolaunched flows launch at a specified time and frequency for each record in a batch, and they run in the background. For example, delete periodically outdated data at the time set in flow.
4. Autolaunched Flow
This type makes it possible to set automated tasks to run. Autolaunched flows can be invoked from the other flows (subflow), process builder, from within an Apex class, from a set schedule, from record changes or from platform events.
5. Platform Event-Triggered Flow
When a platform event message is received, these autolaunched flows run in the background. For example, notify managers or admins when receiving a platform event.
Moreover, there is also Record-Triggered Orchestration, which is a relatively new technology in Salesforce.
Salesforce Flow Orchestrator is a new Flow functionality that allows Admins to string a number of Flows and business processes together across multiple people.
Examples include Service Delivery Orchestration (where multiple parties need to take various steps during a client delivery process in a specific order), public authorization, or escalation process where the record may need to be passed on to the different team members depending on the terms that apply to the Orchestra.
Best Practices for Creating Flows
Plan out your flow before you start building
Understand and outline all the details of your business process. Identify the steps that relate to your processes to understand what elements and actions your flow needs.
Build your flows in a test environment
Build your flows in a separate environment. Creating a flow directly in the production creates the risk of losing your real data in the production.
Never hard-code Salesforce IDs
IDs are org-specific, so don’t hard-code new or existing IDs otherwise cause an error in the Flow execution when deployed to other environments.
Try to save your Flow as often as possible
Sometimes Flow Builder falls victim to unexpected problems, like losing Internet access. Salesforce doesn’t save your changes automatically, so it’s up to you to save your work.
Test as many possible ways your Flow can work as you can think of
If branching is used in your flow, it is important to test all possible options for the correct operation of your flow. Therefore, when testing, try to check the operation of all possible functions in your flow.
Restrict data access via profiles and permission sets
Sometimes it is necessary that the work of flow affects only certain users, so it is worth thinking about setting up limits so that only those particular users can have an access.
Create and use an error handler
Sometimes flow may not do the job it was configured for. Therefore, it is important to understand the error that causes this situation, for this you should configure the error handler.
Understand and outline all the details of your business process. Identify the steps that relate to your processes to understand what elements and actions your flow needs.
Build your flows in a test environment
Build your flows in a separate environment. Creating a flow directly in the production creates the risk of losing your real data in the production.
Never hard-code Salesforce IDs
IDs are org-specific, so don’t hard-code new or existing IDs otherwise cause an error in the Flow execution when deployed to other environments.
Try to save your Flow as often as possible
Sometimes Flow Builder falls victim to unexpected problems, like losing Internet access. Salesforce doesn’t save your changes automatically, so it’s up to you to save your work.
Test as many possible ways your Flow can work as you can think of
If branching is used in your flow, it is important to test all possible options for the correct operation of your flow. Therefore, when testing, try to check the operation of all possible functions in your flow.
Restrict data access via profiles and permission sets
Sometimes it is necessary that the work of flow affects only certain users, so it is worth thinking about setting up limits so that only those particular users can have an access.
Create and use an error handler
Sometimes flow may not do the job it was configured for. Therefore, it is important to understand the error that causes this situation, for this you should configure the error handler.
Summer'23 updates
The summer 2023 update came out and some changes appeared with it. The changes affected Einstein, the Security and Privacy part of Salesforce, as well as the Service part of it. You can find out more at the Summer 23 Release. Flow was also affected by the release, and now we’re going to talk about it.
- Changes in Migrate to Flow tool
With this release, the ability to create new process builder has gradually goes away. And now there is an opportunity to use Migrate to Flow.
If you have created a Process Builder and you want to move it to Flow, you need to select it in Migrate To Flow:
Next, you need to select the criteria that are used in your Process Builder, and which you would like to transfer.
Fine, your Process Builder has migrated and Flow has been created.
Now we can see our flow in the list.
And we have a criteria with our parameters:
This is a good way to change your Process Builder to Flow.
- Changes in the Flow Builder
Now we can automate processes with external data by creating an HTTP callout action that calls the API web service, and all this is in Flow Builder and without code.
After choosing a method and other parameters we get an Action with https.
Previously, when configuring the parsing of the API’s response, to change data types in an inferred data structure, you edited JSON. Now, you select the field’s data types with clicks, directly in the inferred data structure. Date, Date/Time, and Boolean data types are supported.
Now you can use the POST method to send Salesforce data to an external server in the Flow Builder.
And can provide body.
You can automatically log emails to a record’s Activity Timeline when using the Send Email action.
You can see more elements on the Flow Builder canvas with a new compact layout and a smaller Add Element button as you can see below:
- Standard flows that contain triggers now appear in Flow Trigger Explorer.
- According to the updates, the requirement for a user running a flow to have explicit access to Apex classes invoked by that flow is disabled.
- Flow user permissions are now all consolidated under a new Flow and Flow Orchestration section in App Permissions. Previously, they were dispersed throughout System Permissions.
- Standard flows that contain triggers now appear in Flow Trigger Explorer. A Standard flow is a flow shipped by Salesforce. Now you can see when a Standard flow executes in relation to your other record-triggered flows.
- Now users can search and filter their Data Table record results. The search returns the first 1,500 items. Initially, 200 records were displayed. As you scroll through the results, additional records load progressively in groups of 100. The search results also show the number of items displayed and the total number of items found.
- MuleSoft Composer for Salesforce, also called Flow Integration, is now a part of Salesforce Flow.
Integrating different systems and data has been a time-consuming and manual process that must be performed frequently to meet business needs.
For example: The marketing team collects information about all attendees to a marketing event using a Google Sheets spreadsheet. They need to use this information to periodically create or update contacts in Salesforce. This process requires manual access to various systems and data manipulation.
To solve these types of integration problems MuleSoft has developed a new tool, MuleSoft Composer. MuleSoft Composer is an integration tool designed for SaaS admins, business analysts, marketers, salespeople, and team leaders.
For example: The marketing team collects information about all attendees to a marketing event using a Google Sheets spreadsheet. They need to use this information to periodically create or update contacts in Salesforce. This process requires manual access to various systems and data manipulation.
To solve these types of integration problems MuleSoft has developed a new tool, MuleSoft Composer. MuleSoft Composer is an integration tool designed for SaaS admins, business analysts, marketers, salespeople, and team leaders.
Features of MuleSoft Composer:
MuleSoft Composer makes it easy for you to perform integration tasks. It offers the following features for building and running flows.
- Connect as an authenticated user automatically to different systems.
- Extract data from connected systems based on a specific event or schedule.
- Map extracted data from one system to another.
- View sample data in every step of a flow.
- Filter and route data through a flow based on conditions.
- Loop through a collection of records and perform specific actions on each record.
- Synchronize data across different systems.
- Test, run, monitor, and manage flows.
- Troubleshoot errors in flows.
MuleSoft Composer offers a range of ready-to-use connectors. They allow you to integrate with systems such as Salesforce, Tableau, Slack, NetSuite, Workday and Google Sheets.
Create low-code, process-based integrations by importing REST APIs from the MuleSoft Services page in Setup. View and manage your available REST APIs from Anypoint Exchange, and convert API operations into invocable actions in Salesforce.
Above we’ve covered the major changes occurred in the summer’23 release related to flows.
Thank you for your attention!