How to Launch a Flow

After you finish building your flow, the next task is to decide how to run it, so that your business users can use it. There are various ways through which you can call/launch your flows.

1- Process Builder

Only active autolaunched flows can be launched by a process. If the flow contains a screen element (which means it is not an autolaunched flow), then you cannot launch it by a process.

To launch a flow, add an action and select flow as the action type. Give it a name and then select an existing active autolaunched flow. If it doesn't exist, you can create a flow by clicking on "create one".

Set values for flow variables by entering literal values or referencing field values from a related record. The values must match the variable's data type.

You can pass a single value, or pass the whole record. In the below screenshot, whole Service Appointment record is passed to a flow variable called SA.

In the Flow Variable part, all the input variables from the selected flow will be shown. If you don't see the variable that you want to use, make sure that the variable is marked as input.

2- Action

Only active screen flows can be launched by an action. However, it is not a must to have a screen element in the flow.

Create an action for the object that you want, select Flow as the action type, select the screen flow from the picklist and give a label to the action.

Even though there is no option to pass parameters when launching a flow by an action, it knows to pass the Id of the record to a text variable in the flow. To do so, you have to create a text variable called recordId and mark it as input. Id of the record will be passed automatically, without a need to map the values manually.

3- Custom Button or Link

Autolaunched and Screen Flows can be launched by a custom button or link.

Find the flow that you want to call, click the down arrow in the row, then click View Details and Versions. In the Flow Detail page you can find the URL of that specific flow. When creating the custom button or link, select the Content Source as URL and paste the flow's URL.

To pass a value to a flow variable, you have to add this to the end of the flow's URL.


VariableName is the name of the flow variable and {!Field} is the field from the object. If you need to pass more parameters, put & and apply the same format.

In this example, custom button calls a flow and passes the Id of the Work Order record to a flow variable called "WorkOrder" and at the end of the flow, it returns back to the Work Order record using the retURL parameter.

When you launch a flow with a custom button or link, it doesn't open in a modal.

4- Hyperlink Formula Field

It is possible to call an autloaunched or screen flow by a hyperlink formula field. Idea is the same as calling by a custom button. Hyperlink formula field should open the URL of the flow and parameters can be passed in the same format.

In this example, hyperlink formula field calls the flow called Customer_Interaction_Contact and passes the record Id to a variable called Interaction_ID and then returns to a Lightning App called Telesale.

Since it is a formula field, instead of displaying a text, it is possible to display an image as well.

For instance, in the screenshot below, when a user clicks on the blue icon, it launches the screen flow.

5- Lightning Page

Active screen flows can be added to Lightning Pages and can be launched just by viewing the page. Optionally, it is possible to enter values for the input variables of the flow. Id of the record (if it is a Lightning Record Page) can be passed to any input variable. However, unlike calling a flow by a custom button, other field values cannot be passed.

In the Lightning App Builder, drag the flow component from the left panel to anywhere on the screen. Select the existing active screen flow and optionally, pass the record Id to a variable.

In the screenshot below, a screen flow is displayed on the Home page.

6- Lightning Component or Visualforce Page

Autolaunched and screen flows can be embedded in a Lightning Component or a Visualforce Page and any data can be passed to the input variables of the flow. By embedding a flow, it is possible to change the CSS of the screen elements and also override the standard buttons of objects.

7- Utility Item

An active screen flow can be added as a Utility Item to a console app.

It is possible to pass the record Id or any static value to the flow, but other field values cannot be passed (same as Lightning Pages).

In the below screenshot, "New Case" opens a screen flow that allows user to create a new case record.

7 Trackbacks / Pingbacks

  1. Using Custom Settings For Flow Permissions - Salesforce Time
  2. Using an Action to Pass the Entire Record to a Flow - Salesforce Time
  3. How Do You Call A Screen Flow From LWC? – Fallsgardencafe
  4. What Is Auto Launched Flow In Salesforce? – Pietroortolani
  5. How to Pass Parameters to Flows in Experience Sites - Salesforce Time
  6. Launch Screen Flow in Modal for a Record in a Related List - Salesforce Time
  7. A Flow Action to Refresh the Page - Salesforce Time

Leave a Reply

Your email address will not be published.