I love flows. Really I do. In case there was any question, I’m declaring it officially. Some times its a love-hate relationship, but at the end of the day, I like to figure out what are the limits to what I can do with it. But its all well and good to build a flow. You have to do something with all your hard work. With Lightning there are so many options in what to do.
Set it up for Internal Users
- Embed it in a Lightning Page
With Lightning Pages, you can totally embed your flow in the page. If its sitting on a record page, you can even set some of your variables by the record page. This is a good use of a screen flow but not necessary for other type so flows. Its really pretty simple to do this.
Once you have decided where to place the flow, the right side of the screen will give you all of the items you can set for your flow. Remember, on a Lightning page, the resource is called a Flow, not its name. We’ll see later when this changes. The first step is to pick which flow you want to launch here. I like to separate my flows into either a separate tab/accordion or a separate container on the page, but that’s just me. Then you pick a layout and finally get to the exciting part. If you launch your flow from a record page, chances are you want the flow to know this. Any variable you can populate will appear in a list. You can prepopulate a variable by typing in the value or you can use the checkbox under the variable to indicate that the record id for this record should populate this variable.
Now you might ask, why would you want to type something into one of these boxes. I’ve been working on a flow that can be started from different places and, depending on where the user starts it from, it has slightly different behavior. Rather than creating 3 flows, I used a decision at the beginning to route the user to the correct portion of the flow. When I settled this flow in on the Lightning Page for scenario 1, I populated my variable, varInitiation, with Internal to tell the flow which path to take. - Use a Quick Action
Sometimes I really like this function. Sometimes I hate it. You can launch a screen flow from a Quick Action but not a Global Action. It works a bit like embedding it on a Lightning Page but it has a few limitations (and a few pluses). Instead of being able to populate a variable with the use of a check, if you want to pass the record ID into the flow, you must create a variable callled “recordId” and yes, case matters. This variable will pick up the value of the record from which the user clicked the button. The button click option is great. It gives the flow a very definitive feeling, but you can’t adjust the size of the modal and the only variable you can pass to the flow is the record ID, using only that specific variable. So it makes a great option… some times.
Set it up for Community Users
- Launch it from a tab
In the community, one of my favorite ways to launch a flow is to embed it in a community page. In many ways this is similar to embedding it in a Lightning Page for internal users but it let’s you start the flow just by clicking on a tab from the tab bar. Once again you get to populate the variables, such as the running user, from a modal that pops up in the builder when youare setting up your page. This gives your users a wizard like experience to complete a task. If you have access to a developer or want to delve into some of the components freely available on the appexchange, you can put together a really slick user experience.
- Use a Custom Component
There are times when having access to a developer is really helpful although the number of free components you can use in your community is growing. If you can work with a developer, a great way tolaunch a flow is from a custom component on the home page or from the record line. We have create “buttons” for the home screen that launch flows and also created accordions that display a list view like list of records and from each record, one can click a link to launch a flow. Once again, we used the varInitiation to tell the flows where they started from and therefore how they should behave for the user.
In the end there are lots of ways to display your screen flow to the user. And with a simple variable you can leverage the same flow in multiple locations instead of managing multiples variations on the same process. What is your favorite way to display a flow to your users?
Good – addressing a common problem.
Easy tasks to get things moving
Like it very much
Good work.
A few more to remember:
– In a lightning community!
– As a login flow…either in LEX or a community!
– From Next Best Action components, either in a console or in a community!