Salesforce Flow Examples
Quick intro:
Success in the modern, fast-paced business environment depends heavily on automation and efficiency. Salesforce, a top CRM platform, provides a strong option for business process automation with its flow function.
Knowing the potential of flow can completely change how you improve efficiency and streamline processes in your company, regardless of experience level with Salesforce administration.
In this blog, we’ll explore Salesforce Flow’s definition, types, applications, and best practices for designing and executing flows efficiently. Together, let’s go out on this adventure to utilize Salesforce Flow fully.
What Is a Flow in Salesforce?
A Salesforce flow is a series of actions that gather information, execute commands in Salesforce, or interact with other systems to automate business activities. Flows can update records, carry out intricate logic, and communicate with people via interfaces.
With Salesforce Flow, a potent automation tool, users can create workflows to automate repetitive tasks without knowing how to write code. It lets users interface with Salesforce data, navigate people across screens, and automate sophisticated business logic.
Types of Flows in Salesforce
Here are five types of flows in Salesforce:
1. Screen Flows
Interactive Flows, known as “Screen Flows,” lead users through a sequence of screens to gather information or carry out tasks. They are frequently employed in guided processes, approvals, and data entry. A screen element allows you to perform many awesome things.
Date/Time, Text, Long Text Area, Lookup, and many more input fields and component types are available right out of the box. Examples of these are File Upload, Slider, Toggle, Slack Workplace Selector, Display Image, Slider, and Display Text.

You have four options for user interface styles: (1) Checkbox group, (2) Picklist, (3) Multi-Select Picklist, or (4) Radio Buttons, as seen in the figure below. A statically kept list of options, a list of collection options, a list of record options, or a picklist option are available for selection.
2. Scheduled Flows
These flows are set to start and stop at predetermined times or intervals. They come in very handy for automating monotonous jobs like reminding people to take action or cleaning up data.
3. AutoLaunched Flows
These are flows that are started automatically by operations like updating or creating records. They can carry out tasks like sending emails and updating records without requiring user input.
Below is a filtered list of flows with the process type “Autolaunched Flows” in Salesforce Setup.

- “Schedule” is the trigger for the scheduled-triggered flow.
- “Record—Run Before Save” is the trigger for a record-triggered before-save flow.
- “Record—Run After Save” is the trigger for an after-save flow that is triggered by a record.
- The trigger “Platform Event” is listed for a platform-event triggered flow.
- There is no triggered object connected with an Autolaunched Flow (no trigger), and it has a blank trigger.
4. Record-Triggered Flows
These flows are started when something changes in a Salesforce record. They enable sophisticated automation, including updating related records or sending notifications based on changes in records.
5. Platform Event-Triggered Flows
A platform event in Salesforce is a kind of event that is produced by Salesforce, as when a custom object is made. These can be used to set off flows, which are sequences of operations carried out in reaction to a certain circumstance or occurrence.
In this type of flow, publishers send Event messages to the event bus. Some subscribers listen to event messages and take appropriate action when they receive them.
Flows can subscribe to messages about platform events. The platform event-triggered flow is started when messages related to the event are sent through various operations and processes such as APIs, Apex, etc.
- Publishers: Organizations in charge of notifying the event bus about events.
- Event Bus: A centralized system for disseminating and broadcasting event messages.
- Subscribers: Organizations that watch the event bus for particular event messages and respond appropriately.
- Platform Event-Triggered Flow: This kind of flow allows automation in response to particular events. It is started by receiving platform event messages.
How to Set Up a Salesforce Flow
By considering the pros and cons and evaluating your business operations’ particular needs, you can decide if Salesforce Flow is the best tool for the task or if other options need to be investigated.
Let’s now examine how to design and execute flows in Salesforce efficiently.
Step 1: Log in to Your Salesforce Account.
Step 2: Click on the Set up Icon on the Top Right Corner and Click on “Open Advanced Setup.”
Step 3: Type “Flows” into the Search Field, Then Choose “Flows” from the List That Appears.
Step 4: Click the Button Labeled “New Flow.”
It will launch a new screen in Flow Builder.
Step 5: Choose a Flow Type.

Creating Screen Flow: Example
Suppose you are developing a screen flow that will make it simple for clients and employees to place another cupcake order. We’ll demonstrate the process as a fictional company—a ‘Mochi Cupcakes’ employee uses it to take a phone order for simplicity.
Here, a staff person chooses a client, gives the specifics of the order, and chooses an earlier order from the list of the last five cupcake orders. The cupcake order is created for the customer by flow behind the scenes.

You will not be required to generate a new contact record in order to search the contact records. You can utilize the normal Lookup component rather than the Record Field Lookup component. In this instance, you can set up the Lookup component to use the Case object’s ContactId field API name.

You can also set up a Screen element to display a confirmation message containing the order number of the just-created cupcake order, information from the order, and a link to view the cupcake order (using the Display Text component).
Similar to how merge fields are used in other parts of Salesforce, you may utilize them in flows. The Display Text component allows you to format your text by changing the font type, size, color, and other formatting parameters.
You can add hyperlinks and connect different elements. Be sure to test the screen flow as the intended user would to ensure that the user has all the rights required to carry out every action.
Creating Schedule-Triggered Flow: Example
Think about a scenario where the Opportunity object receives a new picklist option. Pre-existing records do not have a predefined picklist value, as expected. It is preferred by the business that these current records default to ‘Not Provided’ rather than being left blank.
You choose a schedule-triggered flow for a one-time bulk change. Within this flow, you can change all opportunities with an empty Favorite Cupcake picklist field to ‘Not Provided.’
Usually, an Opportunity Record or Object is a Salesforce term that indicates a possible transaction or sale to a client. It includes details about the deal amount, the sales process’s stage, etc.

You can establish the schedule, including the Start Date and Start Time, before beginning the schedule-triggered flow.
It should be noted that a schedule-triggered flow cannot execute on a date or time that has already passed. Therefore, you must establish the schedule for a future date and time.

By defining the object and filter conditions to limit the records to only those you want to run through the schedule-triggered flow, you can maximize performance.

You can define the object as “Opportunity” and the filter condition as “Favorite Cupcake__c Equals Empty String (Not Null)” to indicate that the field is blank.
To limit the updated opportunity records, you can add more filter conditions.

In this example, however, the Favorite Cupcake field’s picklist value will be changed to “Not Provided” for all opportunity records that pass the entry requirement.
Debugging
- The schedule-triggered flow will automatically select the oldest matching record if you debug it.
- It is better to build a schedule-triggered flow that sends the record information into a subflow (also known as an autolaunched flow) if you’d like more control over debugging your flow.
- In this manner, you may verify the desired result by using the debug capability to test the subflow section of your schedule-triggered flow using particular records.
Creating Autolaunched Flow: Example
In this example, we’ll utilize Mochi Cupcakes, the same made-up company. Upon receipt, a same-day cupcake order is placed in a same-day priority queue and marked as “Submitted.”
With only one button click on their website or portal, a staff member at Mochi Cupcakes may take control of a cupcake order, update its status to “Assigned,” and let the consumer know that their order is being worked on.
Another way to handle this is to use an AutoLaunchedFflow (without a trigger) that responds to a custom button on the Cupcake Order page.

After choosing the AutoLaunched Flow from the list of Flows, you can add a variable called varCupcakeOrderId to hold the record ID of the Cupcake Order, which will be supplied to the Flow using the custom button.

You can designate this as a text data type because the ID is stored in this variable. Since the record ID value will be given into the flow, you can set this to be open for input.
You may then create a new action to use the email alert that is to be delivered to the consumer. Using the API name, one can search for the email alert. When designing the custom button that will allow the staff member to initiate the flow, it is also crucial to take care of the flow URL, as shown below.

Similarly, you may add custom buttons to the page layout or the cupcake order record page using dynamic actions.
Creating Record-Triggered Flow: Example
Record-triggered flows give Salesforce users flexibility in automating business processes. They enable pre- and post-save actions to be carried out in response to particular criteria or modifications to records.
Record-Triggered Flow Types
1. Before-Save Flow
This kind of flow starts working before the database is updated. Before the record or any of its linked records are committed to the database, you can edit them.
2. After-Save Flow
In contrast, an after-save flow functions after the database saves record modifications. It’s usually used to carry out operations that require the record to be stored, like sending email alerts, updating relevant records, or starting other procedures in response to modifications.
A Before-Save Flow Example
Let’s say Mochi Cupcakes, our made-up company, requests a uniform naming scheme for its account-related possibilities.

Before storing the opportunity record in Salesforce, the user-entered opportunity name can be replaced with the normal naming convention (<Account Name> Deal – <date>) using a before flow, where the date denotes the creation date of the record.

The Start element in the screenshot can be set to activate when an Opportunity record is created.
To enable selective execution of the flow instead of arbitrarily activating for every opportunity, you can set entry conditions to ensure the flow only starts when the accounting field is populated (i.e., AccountId is not empty).
You may choose Fast Field Updates (also known as before-save flow) to have this flow update only the opportunity record that caused it to start.

As shown above, you may use a formula flow resource to determine the opportunity name in the format <Account Name> Deal – <date>
The date is usually in the format: <mm/dd/yyyy>.
Use the current date that is accessible in the flow to define the date within the standard opportunity naming convention.
Use the Change Records element to add text from the formula resource to the opportunity name. Next, make sure that the flow is tested using the Debug tool that the flow provides before saving and triggering it.
An After-Save Flow Example
Our goal is to close all open cases and notify the account owner via email when an account is closed (i.e., its status is changed to “inactive”).
The records-triggered after-save flow, customized to fit the given circumstance, is shown below. It starts as soon as the status of an account is changed to “Inactive.”

- Using an Update Records element, the flow in Step 1 collects open cases pertaining to the account and changes its status to “Closed.”
- In Step 2 of the flow, the account owner receives an email notification about their account termination.
It is crucial to configure the record-triggered flow to start only when the Account object is modified to ensure that this automation only runs when required and doesn’t start with every account update.
However, this automation will only run in the event that the account status changes and the status field is marked as “Inactive.”
Use the Update Records element to change the status field to “Closed” for the account’s linked cases that are currently in open status. Indicate that records pertaining to the account that started the flow and cases should be updated together with the account-related information.

Make certain that the condition under the ‘Set Filter Condition’ section is set up to include cases in which the status is not “Closed.” If any related case records are found in such circumstances, the status will change and be marked “Closed.”
Finally, you can set the record ID to the one that started the flow and configure the Email Alert action to utilize the “Notify account owner the account is closed” email alert. Before saving and executing it, test it.
Creating Platform Event-Triggered Flow: Example
Take the case of an espresso machine manufacturer who automates preventative maintenance for their equipment. An espresso machine will alert the company to a problem, and the company will respond appropriately.

When an event is received, this platform’s event-triggered event starts to fire (1).
(2) To ascertain the maintenance cause, we employ the Decision factor.
(3) We will open a high-priority case if the maintenance cause is urgent, and so on.
You must construct your platform event before you can develop your platform event-triggered flow. In several aspects, creating a new platform event is comparable to creating a new custom object.

The Account, AssetId, and Reason can be recorded in the three custom fields displayed above for this platform event. The platform event-triggered flow may refer to these fields.
The best thing about these flows is that they start when platform event signals are received.
These flows help you set up automated workflows to react to certain events that occur on the Salesforce platform or third-party systems.
When to Utilize a Salesforce Flow
Salesforce Flow is a flexible solution that can solve a wide range of business problems. Knowing when to use Flow can greatly increase the production and efficiency of your company.
The following are some situations in which using Flow in Salesforce is quite helpful:
1. Automating Complex Business Processes or Repetitive Tasks
Salesforce Flow is excellent at automating processes, freeing up your team to work on more strategic projects while maintaining accuracy and consistency in operations.
2. Encouraging User Interaction
Throughout many business processes, users are consulted or permitted different points. Salesforce’s Flow feature facilitates user guidance during these interactions, guaranteeing precise and efficient completion of tasks.
3. Integrating with External Systems
Modern enterprises frequently rely on a wide range of systems and data sources to run efficiently. Salesforce Flow’s strong integration features let you interact with other systems and handle intricate data manipulations easily.
With Flow, you can automate tasks throughout your ecosystem, from syncing data between Salesforce and an ERP system to converting data to satisfy particular needs.
When Not to Use a Salesforce Flow
Despite the great flexibility and capability that Salesforce Flow provides, there are some situations in which it might not be the best option. Knowing these constraints will enable you to choose when to investigate other options with knowledge.
The following scenarios may make it unwise to use Flow in Salesforce:
1. Simple Automation Jobs
Using Salesforce’s built-in workflow rules or process builder may be sufficient for simple automation jobs involving basic triggers or actions. These solutions provide a more simplified and effective way to automate straightforward tasks without having to deal with the hassle of setting up and maintaining flows.
2. Requirements for Real-time Performance
Flows may not always meet the performance requirements in scenarios when real-time performance is essential, such as high-volume transaction processing or time-sensitive tasks.
Especially when executing complicated logic or communicating with external systems, flows can occasionally cause latency problems. To guarantee peak performance in such circumstances, investigating alternatives such as Apex code development would be more suited.
3. Complex Logic or High Data Volumes
Salesforce Flow offers a declarative and visual method of automating business processes. However, it might not be the ideal solution in all situations when dealing with complex logic or handling high data volumes.
Because of its flexibility and scalability, Apex code development can be necessary for tasks involving complex business logic or large-scale data manipulation.
Developers can design highly customized solutions that are suited to particular business requirements by utilizing Apex, which guarantees optimal performance and scalability.
Final Words
In summary, use Salesforce Flow to improve productivity and streamline processes. Examine its versatility, but consider other options as well when necessary. Processes should be optimized now for increased efficiency later on. Accept the potential of automation to create significant change and lead your company to higher success in the digital age.