Salesforce Flow represents the future of automation in the Salesforce platform. Growing out of Salesforce’s Process Builder and Workflow features, Salesforce Flow allows you to automate complex business processes and manual data entry.
Flows are multi-step automated logical processes that allow you to create new records, edit, or delete existing records based on criteria that you define. Flows are a great choice for processes that are too complex for Salesforce’s Process Builder or Workflows, but not complex enough to require the use of Apex code.
According to research by McKinsey, one-third of all sales activities can be automated. And according to a recent HubSpot survey, 61% of businesses leveraging automation exceeded revenue targets from the previous year.
Sales automation is critical and flows the perfect tool for Let’s start by diving into exactly how Salesforce Flow works.
How Salesforce Flows Work
A flow is made up of several building blocks that dictate its operation: elements, connectors, and resources. The way those building blocks fit together depends on the task(s) that you would like to automate with your flow.
Let’s drive a bit deeper into these individual building blocks.
The Building Blocks of Salesforce Flow
- Flow elements are any actions that the flow can execute, including subflows. Examples include reading or writing Salesforce data, displaying information to and collecting data from flow users, executing logic, or manipulating data.
- Flow connectors are the defined paths that you specify that the flow will follow when it runs. For example, if a data update change corresponds with an email notification, you would use a connector to connect those two actions together.
- Flow resources are values that you can use in the flow. For example, these could be objects (leads, contacts, companies) or fields (first name, last name, industry).
These are the primary building blocks that you will use in Salesforce Flow's Flow Builder.
The flow type that you choose influences what elements, resources, and distribution methods are supported. The flow type also impacts what triggers are available to tell the flow to run.
There are two primary types of flows: screen flows and autolaunch flows.
- Screen flows appear as UX elements that internal or external users can interact with. They can be triggered by an action taken on a screen, such as opening a web page or clicking a button.
- Autolaunch flows can be started automatically in response to conditions or events, such as updating, deleting, or adding a record.
Further, the flow type that you choose impacts how the flow can be distributed. For example, screen flows can be distributed on Lightning pages, Experience Builder pages, and custom web components. Triggered autolaunch flows can be distributed through processes, custom APEX classes, REST API, and web tabs.
In short, the flow type that you choose ultimately determines how, where, and when the flow will run. This is an important distinction. While screen flows and autolaunch flows are the most common Salesforce flow types, there are more than 15 flow types in total. You can see a comprehensive list in Salesforce’s documentation on flow types.
When you set up your flow, you also have to choose an optimization type. There are two options:
- Fast Field Updates: These allow you to update fields on the record that triggers the flow to run. This update runs before the record is saved to the database.
- Actions and Related Records: These allow you to update any record and perform other actions, such as sending an email. This flow optimization type is more flexible, because it runs after the record is saved to the database.
Most flows use the Actions and Related Records flow optimization.
Triggers for Autolaunched Flows
In order for a flow to run, something has to tell it to run—a trigger. That trigger could be an action, such as updating data in a specific field, or clicking a button on a web page. You can also schedule a flow to run automatically, for example, once per week on Friday at 3 p.m. EST.
Triggers in flows are preceding actions or states that cause a flow to run.
Salesforce Flow Examples
With a little creativity, there is almost no end to the number of ways that a company could use flows.
However, over-automation is also a concern. You don’t want to create a complicated web of automations that is difficult to understand or untangle should an issue arise. Instead, focus on core business processes that will make the most impact for your organization as a whole.
Some of the common issues and use cases that are often solved through flows include:
- standardizing and formatting fields like addresses, phone numbers, and states;
- populating one field from the contents of another, such as determining the state from data in a zip code field;
- advanced lead routing and lead assignment logic;
- defining customer journeys;
- identifying and merging duplicate Salesforce records;
- Following records based on criteria.
In cases where the variables and outcomes are relatively straightforward, flows are extremely useful, eliminating hours of manual work associated with managing records and the data within them.
Let’s take a look at a simple example, step by step.
Salesforce Flow Step By Step Example Setup
1. Click the Setup Icon
2.Enter “flows” into the search box and select “Flows” from the dropdown list.
3. Select the New Flow button. A new Flow Builder screen will open.
4.Select your flow type. In this example, we’ll be using a record-triggered flow. Then, click the Create button.
5. Set the flow object and select your trigger. In this example, we’ll be triggering the flow when a contact is updated.
6. Set entry conditions. This is a filter that ensures that your flow only applies to records that meet certain conditions. Not all flows use entry conditions, but in some cases it may be a good idea. For example, if we wanted our flow to only apply to records created after July 2, 2020, we would add an entry condition like this:
7. Now choose which optimization option you would like and click the Done button. For most flows, Actions and Related Records is a more practical choice.
8. Set up your data update and click Done. Here we are updating the description for any contacts that meet our criteria.
Your basic flow should look like this:
Remember to save your flow. Once saved, you can choose to activate your flow, or run it immediately.
Flow vs. Workflow Rules
Workflows Rules are designed to handle the most simplistic of automation tasks using a single if/then condition.
For instance, if an opportunity’s deal size is above $50,000, then send an email alert to the VP of Sales.
Workflow Rules can do four primary things:
- assign tasks
- send email alerts
- update fields
- send outbound messages
For basic cause-and-effect actions, Workflow Rules are the simplest way to automate in Salesforce.
Salesforce Flow can also be used to automate these types of tasks, but workflows provide simplicity.
Flow vs. Process Builder
Process Builder and Salesforce Flow are similar, but there are some key differences between the two.
Process Builder is the big brother to Workflow Rules. Instead of a single if/then condition, Process Builder allows you to use multiple if/then logical conditions to automate tasks and the flow of data throughout your Salesforce environment.
Process Builder is typically the better choice for simple automations that still require multiple conditions, which makes them too advanced for Workflow Rules. However, Salesforce's flows are even more flexible, making them a better choice for most complex automations.
Here are some comparisons about the type of automations that might be suitable for each.
If an opportunity is won, create multiple projects from templates based on the products purchased.
If an opportunity is won, create one project from templates based on the products purchased.
When a product is purchased, schedule weekly meetings for a month, then monthly meetings for the next year.
When a product is purchased, schedule a one-time kickoff meeting.
If a product is purchased, create a series of tasks for your teams based on the purchase
If a product is purchased, create a single task.
However, flows can also be inserted into Process Builder processes, providing flexibility.
A flow added to a process in Process Builder.
Note: Salesforce is sunsetting both Workflows and Process Builder. However, phasing these tools out will take place over years. For new deployments, building in Salesforce Flow may make the most sense.
Whether you should use Salesforce Flow or Process Builder often depends on the complexity of what you would like to automate. However, because Salesforce has committed to moving to and supporting Flows in the long-term, it is a better idea to build all new automation in that tool.
Here is a visualization to help understand the differences between Workflow Rules, Process Builder, and Flow Builder in Salesforce.
Salesforce Flow Tips and Best Practices
As with any automation tools, Salesforce's flows some nuances that you should know about prior to building your first flow. Additionally, there are some best practices that you should follow to save yourself headaches down the road.
- Plan your flow before you build it. Plan your flow before building, including sketching out how the logic will work. This way, you can avoid mistakes. Additionally, this can serve as your initial documentation for the flow.
- Consider whether adding to a current flow makes more sense. Having an internal policy about how to handle flows and Salesforce automation in general is crucial. Or else it can quickly become a “too many cooks in the kitchen” situation. For example, some companies have policies stating that any flow altering a specific object or field must be included in a single master flow for organizational purposes.
- Always test new flows. Make sure that your new flow is working as expected before you push it live. You can use the flow testing features, or set up your flow in a sandbox environment for testing.
- Create documentation for your flows. The more quality documentation that you have, the easier issues and troubleshooting will be down the line.
- Avoid hard coded IDs. Flows can fetch any Record ID and you should avoid hardcoding IDs into your flows. The reason for this is that IDs can change from one environment to another. So, if you wanted to test your flow out in a sandbox environment, the IDs there would differ from the IDs in your live environment.
- Use subflows. Create a subflow for actions and calculations that you would like to use in multiple flows. Then you only have to create the calculation once, but can use it in as many other flows as necessary.
- Solve advanced problems by calling Apex classes. For highly complex issues and automations, it is often easier and more efficient to enlist development help to create APEX classes instead.
- Keep DML statements out of loops. Get, Update, Create, or Delete statements should be kept out of loops. Repetitive DML statements could mean hitting your governor limit.
Why Data Quality is Critical for Salesforce Flow Automation
Automation is critical for freeing your teams up to focus on the big picture concepts that enable growth. But automation can only be as effective as the data that powers it. Without quality data, the flows that you create may run in unexpected ways.
For example, you may assign leads or contacts to sales reps based on area code. However, without proper phone number formatting, automatically identifying the area code can be difficult, as there are dozens of potential formats a phone number can take:
- 212 456 7890
- +1 212.456.7890
Without a standardized phone number format, it is likely that the company will have to change the way that they manage sales rep assignments, or will have to sort the unsortable records by hand, creating more manual work for their teams and pulling down efficiency.
This is just one example, but applies to any flow that you create. Every flow relies on your collected data in some form. And for each piece of data, there may be certain requirements regarding standardization or formatting for the flow to work properly. This creates data management tasks on the front end of many tasks that you are trying to automate, potentially killing the time and effort savings that you’d get from the automation in the first place.
Companies frequently perform data update tasks on an ad-hoc basis either manually or using Excel. More advanced cases may require the use of consultants or development resources to deal with issues. But often, the perfect balance in time savings and costs is in an investment in software.
Insycle Complements Salesforce Automation
If you are developing flows for automating processes in your operations, a data management solution is a smart investment. It ensures that you’ll get the most out of the automation that you implement, while avoiding the need to create additional data-related tasks to ensure the automations run smoothly.
Insycle is a complete data management solution, helping companies to identify and fix dozens of common CRM data issues, while also allowing you to build custom templates to fix issues that are unique to your organization.
Insycle can help you with:
- standardization and formatting
- associating and linking people, companies, and deals
- decluttering and purging data
- importing or comparing data using CSVs
- bulk-updating, deleting, and assigning
- exploring and analyzing your data
- streamlining data corrections
- collaborating with colleagues
Additionally, using Insycle can help to reduce the number of automated workflows, processes, and flows in your system, as many data management-related automated tasks can be moved to Insycle.
Data Fuels Salesforce Automation
Insycle makes a natural pairing with Salesforce, helping companies gain visibility of and fix the most important data issues impacting their Salesforce Flow automation templates.
But Insycle isn’t just for automation. It’s a complete data management tool helping companies analyze, understand, identify, fix, and collaborate on data issues across their organization.
Insycle enables operations teams to fix CRM data quality issues in bulk, and automate the data maintenance process. Without Insycle, the cost of bad data is a major blind spot for marketing and sales leaders and a roadblock for execution by their teams.
Want to improve your Salesforce Flow automation? Learn more about how Insycle fuels effective Salesforce data management. With Insycle, you can ensure that your teams have clean, consistent data so that they can build automation with confidence.