Auto-login flow between Salesforce and Elements

Make your users automatically logged-in to Elements when they log in to Salesforce

Ksawery Lisinski avatar
Written by Ksawery Lisinski
Updated over a week ago

You can set-up auto-login flows in Salesforce that ensure users are automatically logged in to Elements when they log in to Salesforce. This is required to have a seamless and frictionless transition between both apps.

Article outline:

  • Prerequisites

  • Create a VisualForce Page

  • Create Login Flows for required Profile referencing the VF page

  • You might also be interested in

Prerequisites

Create a VisualForce Page

In Salesforce, go to the Elements app, selects the Elements Settings tab and the Elements Login Flow sub tab.

  1. Create a new VF Page.

  2. Give it a name and check the "Available for Lightning Experience... " check box

  3. Delete the code that is in the empty VF Page and paste in this code below :

    <apex:page controller="Q9.ElementsGenericExtensionController" action="{!setElementsLoginTokenToCookie}"></apex:page>
  4. Save the VF Page.

  5. From the list of VF Pages, set up Security for each Profile.

Create a Login Flow for each Profile, referencing the VF Page

For each Profile:

  • Create a new Login Flow

  • Select the VisualForce Page you have just created.

  • Select the user license and Profile to apply this Login Flow to


It's crucial that you grant access to the VF page for each user profile you want, otherwise your users will receive an error message.

You might be also interested in

Did this answer your question?