Many times we want to display Notices, Messages, or Information to our users after they successfully logged In to Salesforce. For example, similar to Salesforce downtime or maintenance notifications. Displaying information after login will help the organization to keep its users informed about upcoming events or changes.
Objectives:
After reading this blog, you’ll be able to:
- Understand what is a Login Flow
- Setup a simple Flow
- Understand how to set up a Login Flow
Business Use Case
Edward Backhouse is a System Administrator at GurukulOnCloud. Edward received a requirement to company upcoming webinar registration link (with banner) to users when they successfully logged into Salesforce.
What is Login Flow?
Login Flows give you the flexibility to build a custom process that can be used to display a message, take users’ input, and process the data, build a post-authentication process that meets your business requirements. For example, you want two-factor authentication only when a user is trying to log-in from a particular City, Subdivision, Zip code, County, or Browser. Let us start with a business use case.
Automation Champion Approach (I-do):
Usually, with Salesforce, multiple approaches are available to solve a business requirement. Choose the ones that are simple, straightforward, and consume fewer resources.
Similarly in this scenario, we will use a combination of Flow and Login Flow. Before trying to understand the technical aspect of the solution, let us spend some time to understand the general flow of our solution at a very high level. Please spend a few minutes to go through the following flow diagram and understand it.
Let’s begin building this automation process.
Guided Practice (We-do):
There are 3 steps to solve Edwards’s business requirement using Salesforce Flow. We must:
- Add a Screen Element
- Add a display Text to Screen Element
- Set up a Login Flow
Step 1: Add a Screen Element
- Click Setup.
- In the Quick Find box, type Flows.
- Select Flows then click on the New Flows.
- Select the Screen Flow option and click on Create.
- Drag-and-drop Screen element onto the Flow designer.
- Enter Label the API Name will auto-populate.
- Click Done.
Step 2: Add a Display Text to Screen Element
- On the Screen element, navigate to the Display section and double-click on the Display Text field, to add it on to the Screen element
- Enter API Name.
- You can now use a Rich-text editor to add content like Text, Image, URL, etc.
- Click Done.
Once you’re done, Save the flow and name it Display Flow on Login. Do not forget to activate the Flow by clicking on the Activate button.
Step 3: Set up a Login Flow
- Click Setup.
- In the Quick Find box, type Login Flows.
- Select Login Flows then click on the New.
- Select the Type from the drop-down Flow.
- Enter Display Message on Login as a Name.
- The next step is to select Flow, User license, and Profile. Follow the steps as shown in the following screenshot:
- Click Done.
It’s time to test the Login Flow
Now, if a User with profile Salesforce successfully logged In, they will see the flow which displays the message.
Great! You are done! Feel free to modify it based on your business requirement.
Formative Assessment:
I want to hear from you!
What is one thing you learned from this post? How do you envision applying this new knowledge in the real world?
Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.