As a Salesforce admin, Salesforce flows are one of the most effective tools in your toolbelt. When set up correctly, Salesforce flows help you simplify complicated business processes. Otherwise, it can make a mess.
Salesforce recently announced the deprecation of Workflows and Process Builder in 2023, which means they would no longer receive product updates. This announcement means that Salesforce Flow builder will be the single source of business process automation without code. After 2023, we would be unable to create new process builders and workflows, but editing on the existing ones would be allowed.
Let’s get a basic understanding of Salesforce flow and how it works.
World Class Learning Experience from Anywhere
What are flows in Salesforce?
The flows in Salesforce are an automated application that captures all data and performs the necessary actions in the system. Flows are the strongest weapon of an admin in Salesforce. The Salesforce flow simplifies complex business processes using click, not code.
The flow builder is used to perform tasks without knowing the programming language. For example, flow builders can automate processes that need creating/updating unrelated records, querying multiple objects, or running loops on the data. Flow builders can also access external systems. Flows can be further extended by adding Apex actions.
If an admin possesses a foundational understanding of the flows, he can operate it by just clicking on the application’s automated tabs.
What are the Different Types of Flows?
There are 5 types of Salesforce Flows.
a. Screen flows
b. Schedule-triggered flows
c. Autolaunched flows
d. Record-triggered flows
e. Platform Event-triggered flow
1. Screen Flow
It can be called using a button or an action or displayed in a Lightning Page or the Utility Bar. It appears as a screen for the user to interact with. Screen flow cannot be automatically triggered.
2. Record Triggered Flow
It begins when a record is created or updated. Its functionality is similar to Process builder.
3. Autolaunched Flow
These can be called Apex, Process Builder, or another Flow. They can perform actions automatically behind the scenes.
4. Scheduled Triggered Flow
It runs automatically on a recurring schedule. It is helpful for jobs performed frequently or on a schedule (once, daily, weekly).
5. Platform Event-triggered Flows
These are called when a platform event is received.
Learn everything about Salesforce Flows for FREE – Sign Up for Free Salesforce Flow Course here
What are the Best Practices for Creating Flows?
Some of the best practices to be followed when creating flows are:
Use Coupon Code BLOG20 to avail flat 20% discount on saasguru Programs.
1. Plan the Flow
Understand the business process that needs to be automated using the flow. Draw the step-wise details required; this will help determine what elements and actions the flow needs. It would also help to understand how or when the flow is initiated.
2. Create and Test the Flow
Create and test the flow in the Sandbox or developer environment before production. Creating the flow directly into production creates a risk of creating/modifying, or deleting data in production.
3. Perform Data Manipulation
Flows run under Apex governor limits; it is wise to combine all the data manipulations (create, modify or delete) and perform them at the end of the flow.
4. Do Not Hardcode Ids
Ids are org-specific and will cause an error in the Flow execution when deployed to other environments.
5. Save the Flow Regularly When Creating
Flows are not saved automatically. In case of session time out or internet issues, one can lose the developed flow unless explicitly saved. So it is recommended to save progress regularly.
6. Always Build an Error Handler
Include a fault path in the flow design to gracefully handle an error in the flow and show custom error messages.
7. Test Possible Paths the Flow Can Take
In the case of complex flows, the flow can take multiple paths depending on the data and decisions configured. Make sure to test as many paths as possible.
8. Ability to Navigate to the Previous Screen
Avoid giving users the functionality to move backward in the flow. This can cause the flow to make duplicate data changes in the database if not handled carefully.
What are the Major Limits of Using Flows?
Apex transaction limits govern flows. In case a flow exceeds a governor limit, the complete transaction is rolled back. The changes made by the transaction will be rolled back, even if there is a fault path defined. The limits of the larger transactions would govern the auto-launch flows initiated as part of a larger transaction.
Flows have usage-based entitlements that determine how many flow interviews are allocated per month. The entitlement allocated for the org can be viewed in Setup -> Company Information.
What are Some of the Flow Considerations?
There are a few considerations to keep in mind when creating flows. A few are listed below:
- Flow can access data only if the running user has permission to access the fields.
- In case Flow tries to update a field that is not editable by the user, flow fails. This scenario can be avoided by using the setting ‘Filter inaccessible fields.’ The setting can be found in Setup->Process Automation Setting.
- In a transaction when Salesforce creates, updates, or deletes data in the org and then attempts to access external data in the same transaction, an error occurs. A separate transaction is recommended to access data in external systems. In the flow, end the prior transaction by adding a Pause element or a Screen element.
- When a user session expires, in-progress flow interviews are interrupted and can’t be resumed. If the flow executed actions, such as record manipulations or Chatter posts, those actions aren’t rolled back. But any other progress through the flow, such as user data entered on the screen, is lost.
To read more about flow limits and considerations – Click here
What are Some of the Basic Flow Features?
1. Manager Tab
The manager tab displays the existing resources. Each resource represents a value that is referenced throughout the flow. Some of the resources are Variables, Collections, Constants, Formulas, or Choices.
1. Variable: Variables are used to store data to use in the flow. The variables can be of type Text, Number, Record, Dates, Currency, Boolean, Picklist, or Object record, to name a few.
2. Collection: Collections are used to store a list of variables. They are used to process multiple records at a time.
3. Constants: Constants are values you set once and never change. Constants are recommended when the flow needs to reference the same value multiple times.
4. Formula: Formula is used to display a dynamic value depending on other values within the flow.
5. Choices: Choices are used in Screen flows to show options to the user.
2. Elements Tab
The elements tab displays Interaction, logic, and data elements available for the flow. Each element is an action the flow can execute. New elements can be created from the Elements Tab.
3. Interaction Elements
a. Screen: Screen element / User interface for the flow. The screen can be used to display information or can be used to collect data from the user. This element is available only in Screen Flows.
2. Actions: Actions are external actions that further extend the functionality of the flow. Some examples for actions – Apex, Send emails, etc.
3. Subflow: A flow can initiate another flow.
4. Logic Elements
1. Decisions: Decisions split the flow depending on the data that’s being sent through the decision element.
2. Assignments: Assignments give a value to a variable.
3. Loops: Loops handle multiple variables at once using collections.
5. Data elements
Data elements allow the flows to fetch, create, update or delete records in the database. The elements include Get Record, Create Record, Update Record, and Delete Record. Get Record is used to fetch record/s from the database. Create Record, Update Record, and Delete Record are used to activate the data in the database.
Connectors decide the available paths that a flow can take at run time. Various elements in the flow are connected using the connectors available. Some types of connectors are Unlabeled, Decision Outcome, Fault, Pause, For each, etc.
How to Troubleshoot the Flow?
Use Coupon Code BLOG20 to avail flat 20% discount on saasguru Programs.
Salesforce sends an error email every time a flow errors during the execution in the user’s default language who ran the flow. Flow error emails include the data that’s involved in the process or flow, including user-entered data. It gives step-wise information that was executed till the point of error.
A basic understanding of the Salesforce Flows provides the foundation for its further studies. We would love to help you to upgrade your knowledge about the recent developments in Salesforce. Sign Up Now!
Enroll in Salesforce cert prep training programs to get the best chance to ace your Salesforce exam in the first go.
Explore about saasguru’s Salesforce learning app which is focused on increasing the skillsets of individuals and companies in preparation for Salesforce certification exams.
1. How many types of flows are there in Salesforce?
The Salesforce Flow can be classified into five subtypes- Screen flows, Schedule-triggered flows, Autolaunched flows, Record-triggered flows, and Platform Event-triggered flows.
The Screen Flows are UI apps where the users need to operate and interact with them, whereas the Schedule-triggered flow runs in the background and functions when required or at a scheduled time.
In contrast to these two types, the Autolaunched flow, the record-triggered flow, and the Platform Event-triggered flow do not require any user input and run automatically when there is a need to record and save the update in the database.
2. What can we do with flows in Salesforce?
You can process your business smoothly in an automated manner without worrying about the nitty-gritty with the help of Salesforce Flows. It can collect all the data and function accordingly. Create posts for you, send emails, build records and delete them, update the necessary data and records and create events.
The Salesforce Flow is one of the most powerful tools for the smooth operation of a business and for solving complex issues. It is also the savior of an admin in the company to automate the business.
3. How does flow builder work?
The launch of a flow builder in the program or the Salesforce org is quite a complex procedure that might need you to seek professional help.
You can create flows in your system to carry out complex business issues easily without having the need to use code or any other programming language. You must auto-launch the flow by creating and then activating it.