Use Component Visibility to Show Information At the Right Time in Screen Flow : jenwlee

Use Component Visibility to Show Information At the Right Time in Screen Flow
by: jenwlee
blow post content copied from  Jenwlee's Salesforce Blog
click here to view original post


ShowMe

Component visibility is an awesome admin super power where you can conditionally show information to the user that is relevant to them. Otherwise, hide that noise from them. Love being able to use component visibility in Lightning App Builder with components and also in Flow Builder when building screen flows.

Keep component visibility in mind as you are build forms that collect information from your internal or community users. If information is only applicable under certain circumstances, for example, based on how they answer another field, then only show the additional input fields to them when it is applicable. Otherwise, hide the fields from them. Please don’t build your users CVS length long forms in flow. Keep your flow forms short and sweet. Build smarter forms with component visibility. Your users will appreciate you for doing that. 

Business Use Case:  Addison Dogster is the system administrator at Sprinkles, a company that sells cupcakes on the go. Devohne Mays, Head of Sales Operations, is struggling to submit a cupcake order quickly so he can move onto the next customer. He needs to weed through so many fields on the cupcake record. New staff members struggle with knowing which fields should be completed when placing a new cupcake order.

Solution: Addison uses the feature called Component Visibility which allows her to show information that is relevant to the user at the right time. Remove the guess work and noise from the users. 

She uses component visibility in a two ways:

  • To give her users a warning of possible data issues to steer them down the right path
  • To show data that is relevant to the user at the right time

FlowComponentDemo View image full screen

Highlighted Steps: 

Note: This blog post is not meant to be a walkthrough of the entire solution but will highlights a few examples of configuring component visibility in a screen flow.

1. Create the screen flow shown above. In Lightning Experience, it is found under Process Automation | Flows. Click on “New Flow.” Select Screen Flow. For those using Salesforce Classic, flow can be found in Create | Workflows & Approvals | Flows. Select the Screen Flow and click the Create button.

You can use component visibility in a Screen flow element.

In the demo example, where a warning text was shown “If you selected ‘Phone’ as the Best Method of Contact, ensure the Phone field is not blank.”, the component visibility is set on the Display Text component.

In the Set Component Visibility section, Addison configured the component to show when All Conditions Are Met (AND) with two conditions: {!Best_Method_of_Contact} (Best Method of Contact picklist) is Equals Phone AND the {!Phone.value} (Phone text field value) Is Null {!$GlobalConstant.True}

The warning text only shows when the selected Best Method of Contact is Phone and the Phone field is blank. Otherwise, it is hidden, which makes sense. If the Best Method of Contact is email, there is no need to show this warning text.

ComponentVisibilityFlowView image full screen

In the demo example, where contact information fields are displayed when the New Customer toggle is set to ‘New’ but are otherwise hidden if the toggle is set to ‘Existing,’ Addison configured the Contact Information header and related fields to display using Component Visibility.

The component visibility is set on the Display Text component for the Contact Information header and the Section component for the Contact Information fields.

In the Set Component Visibility section, Addison configured it to show when All Conditions Are Met (AND) for the condition {!CustomerToggle.value} (the New Customer? toggle value) Equals {!$GlobalConstant.True}

So, anytime the New Customer? toggle is set to ‘New,’ the fields would display – showing relevant information at the right time to the user. Otherwise, the header and related fields are hidden from the user.

ComponentVisibilityFlow2View image full screen

These are just two examples of use cases for component visibility.

Addison and I are sure you can come up with many more for your screen flows!


June 11, 2021 at 05:30PM
Click here for more details...

=============================
The original post is available in Jenwlee's Salesforce Blog by jenwlee
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================