User Login Interface Flows
These are looking like the best thing since flows themselves…so many use cases i can think of, primarily for onboarding new users, but also for announcements, tips / tricks, and complex authentication protocols.
User login flows came out in Spring 15, and they let you present the user with a flow, between them entering their password, and getting full access to Salesforce. And, you can send the user down different paths based on really anything - profile, role, last login date, some value in a custom setting, the time of day, the value of salesforce stock, whatever you can think of, is really powerful.
So after this screen, you can do, or have the user do…whatever you want.
Clicking next / finish takes the user to Salesforce - and you can customize the flow finish location if you desire!
In this article, I will present an overview of a login flow, which present users in a training profile an announcement every time they login, while presenting other users an announcement the first time they logs in, and then not on subsequent logins.
The flow has the following elements
- Fast lookup -> pulls the user into a sobject variable (w/ key fields like name, profile id, etc)
- Decision element -> routes the flow based on user profile ID and whether they have viewed the announcement previously
- Screen - for training users - displays message that they need to complete their training exercises
- Screen - for all other users - displays an announcement message
- Assignment - sets the value of a field on the user sov
- Fast update - updates a custom field on the user to indicate they have viewed the announcement
I will write a follow up article with details on the elements. Its mostly standard flow stuff, except ofr the fast lookup which uses a bit of custom functionality unique to user login flows. See this link for a list of variables you can create, which will be populated with specific values, such as the user ID, or can set the finish location. The fast lookup references the User ID variable to pull info on the authenticating user. The rest is standard flows.
Once the flow is created, you only have 2 more steps
- activate the flow
- associate the flow with a profile (via setup - security controls - login flows), as illustrated below
Note that you have create an association record for EVERY profile that you want to trigger the flow for.
Also note that In my example I am sending multiple profiles to the same flow and doing the routing logic within the flow itself based on profile ID. You could create separate flows for different profiles but I prefer to keep it all in one flow.
More to come…