EduBrite Salesforce Integration

Salesforce instance can be connected to your lms microsite and SF users can access courses from salesforce portal, Users will be created in lms microsite when a user access training page first time in SF. 

For integration following actions needs to be done in SF and lms site. 

  • SF site -> Create a connected app.
  • SF site -> Create Visualforce page to launch connected app.
  • SF site -> Create Visualforce tab to show Visualforce page.
  • SF site -> Granting app and page access to users through permission set or user's associated profile.
  • EduBrite microsite -> Specify SF instance URL, customer Key and Secret. And Enable self signup setting.

Create Connected App

Saleforce instance can be connected to your EduBrite microsite, for that integration you need to setup a connected app at salesforce site.

1. Access Setup -> Create Apps menu

Click New in Connected Apps section to create a app -

URLs those needs to be added in app settings -

Callback URL -  https://<lms-microsite-url>/oltpublish/site/sf.do?dispatch=oauthcodecb
Canvas App URL - https://<lms-microsite-url>/oltpublish/site/sf.do?dispatch=canvas

 

 

 

2. Note down the oAuth settings (consumer  key and consumer secret). You would need to specify them in microsite

 

Set the Connected App oAuth Policy as admin approved users are pre-authorized.

 

Create Visualforce page

Go to Setup -> develop -> pages

4. Create new page

5. Enter the code in the Visualforce markup and save

 

Code : You can copy and paste below code for the page -

<apex:page sidebar="false" >
  <apex:canvasApp width="100%" applicationName="EduBrite_LMS" height="600">
  </apex:canvasApp>
</apex:page>

 

Create Visualforce Tab

Go to Setup -> Create -> Tabs and create a new Visualforce Tab

Select the Visualforce page that you had created -

8. Specify the profiles on which this tab would be visible, click next

9 Specify the apps where this tab would be visible, and save

10. Now you would see the new EduBrite LMS tab on the global navigation bar

 

Salesforce - User Permission Setup

To Access connected app, user should be provided oAuth Connected App access and VF page access. That permission can be provided in following two ways -

A. Provide access through user profile -

   Update Standard User Profile or create a custom profile by cloning standard user profile.

       a. Enable Connected App Access for EduBrite LMS app.

       b. Enable Visualforce page access

 

B.  Permission Set - Create a permission set and assign EduBrite connected app access and VF page access to that permission set. This permission set can be assigned to individual users using 'Manage Assignments option.

 

Micro-site Settings

  • In microsite, open Site Details->Customization and add following properties

SALESFORCE_LOGIN_URL=https://login.salesforce.com
SALESFORCE_INSTANCE_URL=https://edubrite-dev-ed.my.salesforce.com
SALESFORCE_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxx [Consumer secret]
SALESFORCE_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx [Consumer Key

  • In Site Details->Security enable self signup and in Site Details->Integration, enable auto create users via api

User Experience

  • Open a new browser and access your salesforce account, open the EduBrite LMS tab
  • A user account would get created in microsite with username same as your salesforce username (if not already present). Make sure you are not already logged in to microsite with a different username otherwise you will receive a error message.
  • You would see your training dashboard tabs - enrolled courses, resources, completed courses and calendar and you can launch the courses

 

 

Trouble-shooting Tips

1. If a user gets 'Insufficient privilege message' on accessing EduBrite LMS Tab.

   Issue - user doesn't have access to VF page. Please check the user have access to VF page either through associated profile or thru permission set.

2. On accessing EduBrite LMS Tab - A blank page appears

  Issue - A error is happening but message is not appearing in the iframe, In most of the cases it's a message to self grant access to connected app. Verify connected app oAuth Policy should be set as 'Admin approved users are pre-authorized', if it's set as self approve then a popup appears to grant access and that popup gets blocked in iframe.

3. A message 'error' appears on the screen after loading Edubrite app -

   a. A user might be existing with the same email-id in microsite and API not able to create a new user using same email-id.

   b. There could be another user already logged-in in the same browser session, Please logout then access the app.

 

 


Rating: