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
6 thoughts on “Launch a Flow Using Lightning App”
OK – good tutorial on building the flow and the app page – but how do you handle the survey responses. Do you create a custom object to match and create a record. Can I just get a confirmation the flow was completed by a user and the responses?
Yes, you’ve to create a custom object. Check out this article to learn https://automationchampion.com/2020/12/02/survey-powered-by-salesforce-flow/
Thanks for all the great sharings! I got one question: what’s the difference between adding directly the “survey” flow to the lightning page and adding VF to the page? I tried both at my developer org but both work.
I’ve always wondered flows and VF pages. This tutorial answered allot of questions and showed me a thing or two. I love how you can easily add this flow as a tab in SF1. What are your thoughts around adding style to these VF pages used for flows?
Use CSS to add custom styling
Every time you come up with something innovative. This is a very useful and informative post. So once again something new to learn from this part 1 to the end of it.
The best thing observed in your post is you always maintain the serial of post like part 1(1,2,3) then part 2 (1,2,3) which is a simple but best thing. I feel the benefit of this because any time I can just search in my mail and i get all in one place. 🙂
One question Rakesh: The process builder part 2,10,26. I don’t have these part,don’t know how i have not got these in my mail. Rest all part till 38 i have. Can you please send me these 3 parts please ? And part 38 is the last part or more to come ?
Thanks for sharing useful info.