A multi-screen flow with a clickable progress indicator that lets users jump between steps.

Add a clickable progress indicator to a multi-screen flow, so users move between steps in any order. For Salesforce admins who build long screen flows.
Hello everyone. Are you working with flows that have a lot of steps? Do you want to make them easier to use? And if that's the case, this video is for you. I will show you in this video how to use the Avonni Progress Indicator, and we will use the Avonni Progress Indicator using a router element, and this will make your Progress Indicator, your progress bar for example, clickable. So users will be able to easily go back or move forward to the next step, or even jump ahead into the process. So what I'm going to build today: by the end of this video you will see the Avonni progress bar that has buttons, or that would be clickable with steps. And clicking on the step will take the user to the right part of the flow. And this is great for forms, onboarding, or anytime users need to move around a specific flow more freely. Okay, let's create a new screen flow from scratch. The first step I need to do here is to create a variable called name... The first step I need to do here is to
create a variable called current step, and this variable will track where the user is on our flow. So New Resource, Variable, current step, type Text, step one for the default value. None. Next, we need to create another variable, and we are going to
create a variable named progress type, and this variable will control the look and feel of our Progress Indicator component. And setting up this variable will make it super easy for you to change the type of the Progress Indicator if you want to change that later. And let's say you have multiple Progress Indicator components in different screens in that screen flow: by changing the default value, it will automatically change the type for all the Progress Indicators that are mapped to this variable. So New Resource, Variable. Let's name it progress type, Text, default value, let's say horizontal. Okay, perfect. We have created the variable. Now on our flow, the first thing
I need to do, and I want to do, is to create an action. As you might not know, the Avonni Components come with Avonni actions, and those actions are pretty handy if you'd like to really specify or simplify your flow building process. Here I'm looking to use a Progress Indicator Step Collection. Basically, by using this action, I'm able to define my step collection, and I will be able to reuse it everywhere on that flow where I'd like to link that collection to the step value on the Progress Indicator. So let's name it step name collection. Let's create the steps. So let's name it step one. You can add icon, substat, action. So that's pretty handy, because if you'd like to change the label, if you'd like to add new steps, you just need to add the steps once into the action, and this will automatically replicate everywhere you're mapping this action on the step value for the Progress Indicator. Step three. Okay, just create three steps. Next, you need to click on Advanced and create or manually assign variables. You need to create a new resource, and for that you need to select Variable. Let's say steps collection values. Data type, you need to select Apex-Defined, and you need to select the Apex class from the Avonni Components. The name is the Progress Indicator Step. Important to allow multiple values as a collection. Done, and done. Perfect. Next step now, and that's really the key for this flow to work, it's really to set up the router decision, and
you can think about the router decision as a traffic controller in our flow. It will decide where to send the user based on which step they click. So let me show you how it works. Decision. Let's say Router Screen. Navigate to screen one: resource, we select the current step, equal to step one. Create a new outcome: navigate to screen two, current step, value step two. It's really important to keep the same value, the same syntax for the value as the one you define in the action at the top as your step collection. And then navigate to screen three, current step equals step three. Okay, so now I set up the router screen decision, and as you can see I have like three branches where I can add a different screen for each. So next step is to build our screen
one. So I will take this screen. Let's name it screen one, step one. Let's remove the Header and Footer. Now let's drag the Avonni Progress Indicator component. Progress indicator step one, and let's open the Component Builder. Now, for the type, as you can see, you have different types available for the Progress Indicator. You can decide to select one of those manually, but remember we created a variable first for the type, named progress type. So basically I'd like to map the type to this variable, progress type. So if I want to change the type, I only need to change the type once, directly on the variable, and this will automatically replicate anywhere I map this value on the component. So now for the current step attribute, I will select Map and map the current step to the variable we created first. Okay, next, data source. If I want, I can create my data source manually by adding steps manually for this screen, but it's not the best way. Why? Because if you have multiple Progress Indicator components on all the screens you have in this flow, you need to maintain and create all the steps manually every time. Remember, we created first an action, an Avonni action, to create or to define like a collection of steps. So this action will be available from Variable, and from there you can select the step collection value we created as an action. So that's the link to the step collection you can define for the entire flow. Okay, sounds good. I just set up the Progress Indicator on the first screen. Now, if we want, we can add other components into our first screen. Remember, this is really the first screen of the form that is dynamic, so users will be able to click on the Progress Indicator to go to screen two, three, and any other they want. So let's drag maybe a Text element for this demo. Text. Okay, this is step one. Okay, we're just fine-tuning its name. Okay, perfect, done. Okay, we just set up the first screen on the first router decision right there. Next, we need to set up an assignment, and we will use an assignment to update our current step variable. So whenever someone is clicking on the step, we will assign that variable. So let's select an Assignment, and let's name it, the label, assignment step screen one. And then for the variable, we select current step equal to the progress indicator step one click step value. So this assignment will assign the current step to the value of the progress indicator step one element, and we can repeat exactly the same process for screen two and screen
three. So it would be like repeating the process, but let me show you. Okay, I'm repeating the process now for screen two. We move this and this. Okay, perfect. And now let's drag the Progress Indicator, Avonni Progress Indicator component. Progress indicator, not step one but step two. Open Component Builder. Type, select Map, progress type. Current step, map, current step. Let's make sure it's saving. Okay, perfect. Data source, Variable, step collection value. Okay, let's do the same test by dragging a Text element: this is my screen two. Okay, and let's do the same by creating an assignment: assignment step screen two, and then current step is equal to the progress indicator step two, this time, click step value.
Okay, same process for the last screen of my example. The Progress Indicator right there. Open Component Builder. Let's map the type to the progress type, and current step map to the current step value variable. Let's select the variable from the current step, the step collection value. That's pretty much done. Let's add, for the test, some display text. So you can imagine not adding a display text, because it's really for my tutorial, but it's really to drag any other component you'd like to display on that screen. Okay, let's do the assignment now: assignment step screen three, and for the current step variable, equal to the progress indicator step three click step value. Perfect. Okay, now we need to connect the three screens to the router, and remember
the router decision, this is where everything comes together. So we need to connect each screen to the next screen interaction right there. Connect element right there, connect element to the router, and connect element to the router. So every time users are clicking on a step, it will go directly to the router screen. However, I missed one step on each
Progress Indicator: I forgot to set up the interaction. So I need to define, when they are clicking on the step, what you'd like to do. I'd like to go Flow Navigation, go to the next screen. So it will go to the assignment and then go back to the router. So that's really important to do that for every Progress Indicator, going on the interaction Step Click and then Flow Navigation, go to the next screen on the flow. And the same for step three, creating an interaction when they are pressing the step: Flow Navigation, going to the next screen. Okay, perfect, pretty much done. Let's do a test. Let's save the flow, and let's do a debug to see if everything is running
properly. Okay, so I should be able to click on step two. Oh, it's working fine. I can go from step one to step two. I mean, that's working. Let's get back to the flow. Let's
do another thing. What I'm going to do: progress type, instead of setting up variable, let's say path. Let's see what happened. Debug. So instead of having the horizontal progress bar, just by changing the default value on the variable, let's see what happened. Now you have a path. That's cool, that's really cool. Okay, let's do one more test, changing to vertical instead, again just changing the variable default value, and now we have the vertical variation. We can go from step one to step three, to go back to step one. And as you can see, the type is changing automatically everywhere I added, or I mapped, the variable to the Progress Indicator type. So that's pretty much what I'd like to show you today for this video tutorial about how to use the Avonni Progress Indicator with a router, to be able for users to navigate from one screen to another one without having to use the standard buttons from Salesforce. I hope you enjoyed this video. Let me know if you have any question or comment in the comment section below. Thank you so much, which
Add a Step Click interaction (Flow Navigation, go to the next screen) on the Avonni Progress Indicator, assign its click step value to a current step variable, and send the flow back to a Decision that routes on current step.
Define them once with the Avonni Progress Indicator Step Collection action, store the output in an Apex-Defined variable (Progress Indicator Step, Allow multiple values), and set each Progress Indicator data source to Variable with that collection.
Map the Type attribute of each Progress Indicator to a text variable (progress type) and change its default value: horizontal, path or vertical.
Browse the whole library, filtered by where it runs and what you want to build.
All video tutorials