Last Updated on February 10, 2022 by Rakesh Gupta
The series of articles on the Salesforce Flow is to discuss the basic concepts and to show the power of Flow. Salesforce Flow allows you to automate business processes by building applications, known as Flows, that collect, update, edit, and create Salesforce information, and then make those flows available to the right users or systems. Flows can execute logic, interact with the Salesforce database, call Apex classes, and guide users through screens for collecting and updating data. There are various ways through which you can launch your Flows, one of them is Lightning App Builder.
Let’s start with a business use case
Business Use Case
Rachel Gillett is working as a System administrator at Universal Containers. She has developed a flow to get the Sales reps’ feedback. She wants to use the Lightning App to launch a Flow.
Solution for the above business requirement
We’ll use Flow and Lightning App Builder to solve the above business requirement. Steps to create a Lightning App to launch the Flow are mentioned below
- Create a Flow
- Create a Lightning Page in Lightning App Builder
- Add Flow Component to the Page
- Activate the Lightning page.
- Add your app the Salesforce navigation
Let us use Salesforce Flow to solve the above business requirement. Perform the following steps to create the solution using the new Salesforce Flow Designer:
- Navigate to Setup (Gear Icon) | Setup | Process Automation | Flows.
- Now click on the New Flow button, it will open a pop-up. Perform the following actions on the pop-up screen:
- Screen Flow as Flow Types
- Now create a sample Flow (Save it with the name Survey) as shown in the following screenshots. If you want a step-by-step guide to creating the flow, then check out this article Survey Powered by Visual Workflow
- Now we will create a Lightning Page in Lightning App Builder or you can either use the existing page.
- Click on Setup | User Interface | Lightning App Builder, then click on the New button under Lightning Pages to start the Lightning App Builder.
- Choose one Column template (A template defines the basic behavior and layout of the page you plan to create) and click on the Next button.
- In the next screen, i.e. Create a New Lightning Page pop-up enter a unique name (TestApp) for your new page and click on the Finish button, as shown in the following screenshot
- Drag-and-drop Flow Standard Lightning component onto the canvas. You can use the control panel to select a Flow (In our case select Survey Flow) that you want to include, as shown in the following screenshot:
- Once you’re done, click on the Save button. It will save the current definition of your app.
- The final step is to activate the Lightning page. Activate adds your app to the Salesforce navigation.
It also allows you to set the Tab visibility.
After Salesforce recent releases, you can now add Flow into Lightning Experience using one of the following methods:
- Using Flow component on Lighting App Page, Lightning Record Page, etc.
- Using Quick Action.
- Using lightning Component or Web Component.
- Using a Custom Button or Link