Salesforce Integration with your LMS

Academy of Mine provides clients with a Salesforce Integration that allows you to track student activity and progress in the LMS, and trigger changes in Salesforce data accordingly. For example, this can be used to update Salesforce Contacts details with changing user information, or even to track and sync progress data for specific course enrollments of a student (Custom Object properties in Salesforce can be leveraged to track a particular student x course enrollment combination and update it with detailed progress information) also it can used to sync your courses in Salesforce using again custom objects. 

This integration will recognize LMS events such as New Account Created, Account Details Updated, Course Completed, and more, and pass data along to Salesforce, allowing you to keep your Contacts and Other Objects synced. Note: the data changes and storage is specifically in relation to Contacts and custom objects (Courses and Enrollments to be specific) in Salesforce.

In this guide, we will go through how to set up the Salesforce integration with AOM. Each major step is broken down so that you can easily get this connected!

In this article

Step 1: Create an App in Salesforce

  1. From the Admin Dashboard, navigate to the Integrations tab in the Admin Dashboard, which you can find in the sidebar on the left.
  2. Click on the Manage button for the Salesforce Integration
  3. On this page, you will see a field called "Redirect/Callback URL"--copy this URL as it will will be used later in Salesforce
  4. Open a new tab and navigate to your Salesforce Portal.
  5. Click on settings gear icon and and then click on Setup.
  6. Type in "App Manager" in Quick find box and then click on "App Manager".
  7. First, you need to create a new app to integrate Salesforce with your LMS. Click on the "New Connected App" button from the right side of the screen.
  8. Fill the form fields and click on save button. This is where you will also paste the "Redirect/Callback URL" that you copied earlier in AOM. See the screenshot below for more details: 
  9. After saving the form, you will see a prompt like below, click the Continue button. As mentioned in the pic below, salesforce might take up to 10 minutes to reflect the changes. 
  10. Now you have successfully created an application in Salesforce. Now it's time to get the connection credentials for this newly created app. After clicking on the continue button as mentioned in step 9, you will be redirected to below page. Please follow the mentioned instructions to get the connection credentials. You will need to copy the Consumer Key, as well as the Client Secret Key to be added to AOM> 

Step 2: Connect Salesforce to AOM

  1. Now, go back to AOM and return to the Salesforce integration page by selecting Integrations>Manage in the Salesforce section. Inside the Salesforce integration settings page, paste the Client ID and Client secret (Consumer Key and Client secret from step 10). You will also need to toggle the Enable Salesforce button to on.
  2. You can see there is another field "Enter Salesforce Domain Name". This field requires your Salesforce instance name. You can find it in the URL of your salesforce account.
  3. After filling all the details, you need to click on Save & Authorize button. After that you will be redirected to salesforce platform. If you are not logged in then you will see the login page. You need to login and allow all the permissions the LMS requires to connect to Salesforce. 
  4. After allowing the access you will be redirected to LMS and you should see successful authorized notification like below. If you are not getting success notification that means something went wrong and you need to troubleshoot. Please reach out to the support team if needed.

Step 3: Configure Actions and Mappings in LMS

Let's move on to configuring the actions and mappings. Actions determine the different events that are going to trigger changes in Salesforce, and the mappings are  how Salesforce is going to get updated when an event is triggered.

Set Up Actions

Frist, you'll need to set up the actions inside the  Actions tab according to your needs. This is where you will determine the different events that are going to trigger changes in Salesforce. It is essentially where you will determine when Salesforce data is going to be updated, and which thing we are updating in Salesforce (Contacts or Custom objects). Then, we will add more details on how each Salesforce object is going to get created/updated but for now you will want to think about the different events that should trigger a change.

  1. Within the Salesforce integration settings in AOM, select the Actions tab
  2. Click +Setup Action and choose desired events and actions from the dropdown menus. Click Save once you have chosen the event in AOM and the corresponding Salesforce update. Click +Setup Action again to add another action 

Set Up Mappings

In order to actually configure  how Salesforce is going to get updated when an Event is triggered, we will need to configure the Mappings. The Actions set up above tells us when Salesforce data should get updated as well as which object in Salesforce, but it has not told us anything about the specific details of how to update the data. This is what we will do here in the Mappings tab. 

  1. Click on the Mappings tab in the Salesforce Settings. Without mappings, the user activity data is not going to be sent to Salesforce, so we will need to set it up carefully. It is what will allow Salesforce to understand what to do with the data that is coming in.
  2. There are two types of mappings:
    1.  Contact Mappings: Used to create and update Salesforce contacts.
    2. Course & Registration Mappings: Used to update Salesforce Custom objects for Courses and Course registrations.Contact Mapping: Click the Add New button, add the AOM LMS properties that you wish to sync with Salesforce Contacts, and link each to the desired associated Salesforce Contact property you want to create/update. These mappings should be laid out for user properties mappings.
  3. To add Contact Mapping: Click the Add New button, add the AOM LMS properties that you wish to sync with Salesforce Contacts, and link each to the desired associated Salesforce Contact property you want to create/update. These mappings should be laid out for user properties mappings.

    Once done, click the   Save Mapping button.
  4. To add Course & Registration Mappings: To store your course and course registration data in salesforce, you need to use this option. There are two sections one for course and another for course registrations, for each you need to create custom object in your Salesforce account. Please read through each of the sub steps here to ensure you get this set up properly. 
    1. Course Property Mapping: You need to create a new custom object and use the newly created object name while mapping. For example, you created a Course object in salesforce then add the name and all the fields/property which you have created in the Course object.
    2. Course Registration Property Mapping: You need to create another custom object and use newly created object name while. For example, you created a Course Registration object in salesforce then add the name and all the fields/property which you have created in the Course Registration object.
    3. NOTE:
      i)  See the steps to create new custom objects in Salesforce. First you need to create custom objects for both Course and Course registrations. After that you should map both Courses Property and Course Registration property with respective Salesforce properties/fields (See below images).
      ii) All the custom objects created in salesforce, their names will be appended with double underscore and c. For example if you have created Course object then the name of the object will be "Course__c". This "Course__c" name is required while saving the mapping for course. Same for Course Registration.
      iii) The custom field names are also appended with "__c". "__c" means custom in salesforce. For example if you create a new field for course id named as "course_id" then the actual name of the field will be "course_id__c".
      iv) Don't create any field marked as Required.
    4. Course Property Mappings
    5. Course Registration Property Mappings
      Note : For Course Registration mapping, Course ID and User/Contact ID is mandatory. Otherwise the integration will not work.
  5. Click the "Save Mapping" button to save your changes.

Now, every time one of the Actions is triggered, the related Salesforce object will get created/updated.

Step 4: Synchronizing Courses from AOM LMS to Salesforce

There are various actions that you set up in the steps above, where on certain events Salesforce data will get created/updated. You might be wondering why there is no action for creating/updating the course data. The course data is only managed by the Admins, and Admins can use "Sync Courses" button to sync all the course details in the Salesforce custom object. For this to work you need to add mapping in "Course Property Mapping" by completing the steps in the Step 3 section above related to Course & Registration Mappings.

  1. From the Salesforce integration settings, click the Mappings tab
  2. Click Sync Courses, as seen in the image below.

Note: This process will run in background, so you just need to invoke this event by clicking on the Sync Courses button and the LMS will take care of the syncing process behind the scene. If the Sync process is in progress then you will see a loader inside the "Sync Courses" buttonYou can also use the "i" button to see the logs. Inside the logs you can see the success or error messages like the count of courses which got synced successfully.

Logs Page for course sync: 

Step 5: Create Custom Objects in Salesforce

You can track and store data that’s unique to your organization using custom objects. You need to use "Object Manager" to create custom objects so make sure you have correct permissions to create/edit custom objects.
Let's create custom object for Course. Follow the below instruction to create a new object with their fields.

  1. Within Salesforce, in the Quick Find section type in "Object manager" and select it from the options.
  2. You will be redirect to the Object manager page, from the right side of the screen you need to click on "Create" button and select "Custom Object"
  3. You will see a form where you need to fill some values related to your object. After filling all the details click on Save button. Record Name for course object will be "Course Name" and this field will be used while mapping the course name in LMS.
    Note: For course registration object, the Record Name should be "Course Registration ID" and it's Data type should be "Auto Number" with "Display Format" as "{0}"
  4. Now you have successfully created a new custom object. You will be redirected to below page where you need to click on "Fields & Relationships" to add custom fields to store your data in this object.

  5. You will be redirected to Fields and Relationships page and from the right side of the screen click on "New" button to create new fields. Salesforce provides default fields automatically after creating a custom objects. Since your business requires to store extra data, you have to create new fields.
  6. Now you will see "New Custom Field" page and there will be a form which you need to submit. There are 4 different steps where you have to provide the data about the new custom field.
    Page 1: Here you need to specify the type of information that the custom field will contain. (If the field is Course ID then select Number)
    Page 2: Here you need to enter the details like label, description, etc.
    Page 3: No action needed, just click Next button .
    Page 4: No action needed, just click Next/Save button.

    Page 1 Image:

    Page 2 Image : Make sure you check External ID field for Course ID field. No need for other fields.

  7. Upon completing all 4 steps, you will be redirected to the "Fields & Relationships" page where you will be able to see the newly created field.

  8. Now following the same process you can create multiple custom fields (course category) and map it in the LMS using Mappings tab inside the salesforce integration.
    You can follow this salesforce article on How to create custom objects for more information.

Step 6: Create Tabs in Salesforce to See Custom Object data

To see all the data stored inside your new custom object like course and course registration, you have to create tabs for both.The tabs are similar to what you see in your Marketing Home page like Contacts, Leads, etc.

  1. Within Salesforce, use the Quick Find search for "Tabs". Now click on the Tabs link.
  2. You will be redirected to Custom Tabs page where you have to click on New button to create a new tab for your custom object.
  3. Now you are at "New Custom Object Tab" page where you have go through 3 steps to create the tab.

    Step 1 : Choose the custom object for this new custom tab. Fill in other details and click on Next button.

    Step 2 : Choose the user profiles for which the new custom tab will be available. You can leave default settings as it is for now and click on Next button.
    Step 3 : Choose the custom apps for which the new custom tab will be available. You can leave default settings as it is for now and click on Save button

  4. The tab is created successfully. Now you can see the Course object data in your Home page like you see for Contacts, Leads, etc. but first you need to go to services pages

  5. Once you redirected to Marketing page, you can see your new tab for course as "Courses". Click on the "Courses" tab to see course details.

  6. You should see all the courses created in LMS here. You can also select fields to display on this screen

    After clicking on the Save button you should see all the fields that you have selected to display