You are currently viewing Login Flow In Salesforce – Cloud Analogy

Login Flow In Salesforce – Cloud Analogy

Sharing is caring!

Login Flow in Salesforce is known as the most powerful process used to collect information from different users during the login process. The Login Flow guides the users through the login process before they have access to your Salesforce org. With Login Flow, you can modify the login experience and seamlessly integrate business processes with Salesforce authentication. Moreover, you can control the business processes that your users follow after they’ve logged into Salesforce.

When the users are done with the login flow process, they’re redirected to their Salesforce org/site. And if the login fails, the users will be logged out immediately. That’s where you can use the login flow to show the Terms & Conditions page or Privacy Policy page and make users accept during login. The login flow in Salesforce plays a vital role during deployment & release phases to stop users from logging into the system.

Use Cases Of Login Flow In Salesforce

  • Connect individual profiles or connect one flow to many profiles, & they fire when a user logs in.
  • Collect data, verify information, show a message, or prevent login.
  • Customize or enhance the Login experience by adding a logo or login experience.
  • Collect or update user data such as email addresses, phone numbers, or email addresses.
  • Create more detailed guidelines, including setting a policy that sends a notification when a user logs in during custom list.
  • Using a multifactor authentication (MFA) method using hardware, biometrics, or other authentication techniques.
  • Interact with users and ask them to take actions such as filling out a survey accepting the terms of use.
  • Provide a secret question and confirm the answer when logging in during the verification process, 

Execution Of Login Flow In Salesforce

Here’s how the execution of Login Flow works:

  • A user must be authenticated to create a Login Flow. Login flow doesn’t replace the existing Salesforce authentication process. Instead, they ask the user for detailed information.
  • During the execution of the Login flow process, users have restricted access. Users can only access the flow; they can’t go through it to get the application.
  • Once the user is authenticated and flow is completed, then the user can log in to the org.
  • If login flow is functioning correctly, link a login flow with your administrator profile. Otherwise, you will not be able to log in to your org.

Steps To Create The Login Flow

To create Login Flow, you need to follow the steps:

Step 1: Go to Flow Builder.

Step 2: From the Manager Tab in the toolbox, click a new resource and create a variable to store the user’s ID.

After you’ve added each variable, they appear on the manager tab.

The following input variables are supported.

  • LoginFlow_LoginType
  • LoginFlow_IpAddress
  • LoginFlow_UserAgent
  • LoginFlow_Platform
  • LoginFlow_Application
  • LoginFlow_Community

You can also store these attributes as output variables in the Flow.

  • LoginFlow_FinishLocation (type Text): This variable defines where to send the user when the flow is completed.
  • LoginFlow_ForceLogout (type Boolean): When this variable is set to true, the user is immediately logged out.

Step 3: On the manager tab, click on New Resource to create a record variable and store values from the user.

Step 4: Add a Get Records element to Lookup the user who is trying to log in.

Step 5: Now specify the user fields that you want to store in the variable.

Step 6: You can create a welcome screen to ask the user to confirm the phone number.

Step 7: Now, you can add an update record element that uses the value in the {!user} record variable to update the user’s phone number.

Step 8: Connect all the elements together.

Step 9: Give the flow name and then save it.

Step 10:  Connect the Login Flow to a User profile and then Log out and log in as a Test user to test the flow.


Login flow in Salesforce supports various Salesforce authentication methods such as delegated authentication, username & password, SAML single sign-on(SSO). With Login Flow, you can customize & boost up the login experience and integrate business processes with Salesforce authentication. Login Flow includes collection & updation of user data at login, configuring multi-factor authentication, or integrating the third-party strong authentication processes.

Are you new to the Salesforce technology and looking to implement Salesforce CRM to your business processes? Cloud Analogy is known as one of the leading Salesforce Implementation companies, with deep domain knowledge and rich expertise in Salesforce development, Salesforce Integration, Salesforce data migration, Salesforce Consulting, and more that help your business reach greater heights of success.


Suraj Tripathi

Salesforce Consultant | Solutions Engineering Head
"Suraj Tripathi, a certified Salesforce Principal Consultant of repute, is a wonderful mentor and leader. A certified Salesforce Architect and a 7x Salesforce Certified Platform Application Developer by passion and profession, Suraj has rich experience in languages such as Aura, HTML, Angular, Bootstrap, APEX, and JavaScript. With more than five years of expertise in Salesforce Development, Suraj has worked on more than 50+ projects out of which 20+ projects were related to Salesforce Integration, Writing Triggers, Batch classes, VisualForce pages, and Aura Components.

Hire the best Salesforce Development Company. Choose certified Salesforce Developers from Cloud Analogy now.

Leave a Reply

× How can I help you?