Guiding Users Dynamically with Lightning Path
In a previous post, I wrote about how you can use Flow and Dynamic Lightning Components. In that post, I mentioned Path as an alternative solution.
Salesforce Path, is Lightning Experience only feature. So if you’re still in classic, you may want to turn away, it’ll only make you jealous.
When you use Path, you choose a pick-list value. Each value then becomes a stepping stone along the path. With each stepping stone you can display fields or static text to help let your users know what they need to do at that step and how to progress to the next one. I consider using a path a requirement of using Lightning Experience. I even included it in my Salesforce World Tour presentation: top 5 tips for Launching Lightning Experience
This is amazing feature in Lightning, but it’s static. Let’s face it, users often need more guidance on their records.
Wnat to learn more about Path? Check out the Trailhead module.
Setup & Enable Path
First, we need to enable Path. You can find this option under User Interface and then Path, if you’re in Lightning Experience (And you’re using Lightning Experience aren’t you?). The easiest method is just using the Quick Find feature in Setup.
Next, we need to actually create a path for our chosen record. For our example today, I’m using Opportunities. When you create a path you need to provide the following:
- Path Name: What is it called? Be descriptive. This is the equivalent to the field label.
- API Reference Name: No spaces or special characters. It’s the equivalent to the field name
- Object: Object you’re creating the Path for. You can select, Lead, Campaign, Contract, Order, Opportunity, and Custom Objects
- Record Type: Very important if your object has record types
- Picklist: The Picklist field on the object that will be the basis of your path
Your picklist choice is important. The values of the picklist become the values within the Path. If you have lots of values in your Path it going to be… well fugly. Let’s face it, processes with more than 6-8 steps are better off being broken up into stages.
Next on the list to completing Path is to add fields and notes for each step along the path (each picklist value) we wish to provide some guidance on. Adding fields is very easy. You simply click “+Add/Update Fields” and move the fields available on the left, to the list of fields that will be displayed on the right.
The text area is static text that supports rich text. This is a great place for bullets and short instructions on what should be occuring
Which fields you choose is important. Fields that the user can edit will also be modifiable within the Path itself. This means important fields for this step that may be be buried in the details page can rise to the top, but only for this step. This provides a great short cut for users who are simply trying to work through a process.
Making Path Dynamic
Now that we have our Path, how do we make it Dynamic?
We only have 2 places where we can modify the data displayed for each path step.
- Rich Text Area
- Fields Displayed
The Rich Text area can provide some pretty options. We can add bullets, underlines, pretty much all your basic Rich-Text options. Unfortunately, it’s static. We can’t insert anything into this area that we can have change depending upon the record itself.
That leaves us the Fields we display. There’s one field type that we can have the value change depending upon the details of the record. That’s a formula field.
Let’s say we have our company: Wizard Productions. In addition to providing a blog, podcast, and videos, they also sell Wizard merchandise (man this would be a good plug if I had anything ready to sell). There are four items a sales person must complete during the “Proposal/Price Quote” stage before progressing:
- Products must be added
- A quote must be added and Sync
- Decision Maker must be involved
- Client’s budget must be confirmed
To achieve this, I created a formula field as well as fields for the Sales person to indicate Budget and Decision Maker details. I also created a roll-up summary field on Quotes which count the number of sync quotes attached to the Opportunity. My “Proposal Requirements” field is very simple: It looks like:
if(HasOpportunityLineItem,"","Add Products" + br()) + if(Active_Quote__c>0,"","Add & Sync Quote" + BR()) + if(Text(Decision_Maker_Involved__c)="Yes","","Involve Decision Maker" + BR()) + if(Text(Has_Budget__c)="Yes","","Confirm Budget")
I add this field to my path. Now when a user views this step of the path, they see a list of things to complete which automatically updates.
There we go! As a user completes items in the records and save, the formula updates, and therefore the data in the path updates.
Which would I rather use? The Flow method with Dynamic Components? Or the Formula method within Path?
As of February 2018, Lightning doesn’t consistently reload all the components as if the page was totally refreshed. This was one of the issues I mentioned in the Flow & Dynamic Component post. So this method has certain benefits over the Flow.
- Pretty much every admin can create a formula
- Doesn’t require updating the Lightning Page (Unless Path isn’t already on it)
- No need to mess around with dynamic components (Easier support)
- Formulas always seem to update in Lightning. No page refresh required.
- A very simple solution
- No rich text option for formula fields. We used to be able to do bold and colors, but that doesn’t work anymore
- Character Limits. A formula can only be so big. Path steps with lots of requirements of complicated requirements may have challenges
- Creating multiple formula fields. Because of the character limit, in most scenarios, you’ll want to create a formula for each Path step
- It’s not as cool. Ok, I’m biased on this one. But let’s face it. Flow is just so much cooler
Don’t miss a post! Sign up to receive email notications.
I run this site, the podcast, and my training videos for the community. I do incur some costs. I greatly appreciate if you can help me out by checking out my affiliates and – if you shop amazon – start your search on my site.