Integrations
Salesforce

LicenseSpring to Salesforce Connection: Tutorial

14min

Introduction

This article is a tutorial on the necessary steps to take to connect your Salesforce instance with your LicenseSpring instance and to deploy our Integration Wizard in your Salesforce instance.

This article will take you through all the necessary steps to do so, and after you are done with it, you can move on to the "SalesForce Integration User Documentation" to see how to use the actual Integration Wizard and to get more information on the integration.

Prerequisites

We assume that you have a Salesforce and a LicenseSpring instance setup beforehand.

We assume that you have the necessary rights in your Salesforce instance so that you can do the following steps in it.

Salesforce Connected App Setup

We will go straight to it and the first step is to:

Log in to your Salesforce instance, you can do so by following the link https://login.salesforce.com/

Navigate to Setup : Click the gear icon from the dropdown at the top right

Document image


Search for ‘App manager’ in the search bar (upper left corner)

Document image


Click on the "App Manager". This will display a table with all your connected apps

Document image


Click on the button ‘New Connected App’, In the top right corner of this screen. It will open a configuration screen that will allow you to add LicenseSpring as a new connected app.

Document image


There can only be a single connected app per Salesforce instance that is created and connected to LicenseSpring. The integration will not work correctly if there are multiple connected apps for LicenseSpring.

Fill out the mandatory fields (textbox has a red line on it):

The Connected App Name field can be anything you like (for example ‘Licensespring Salesforce connector’), the API Name will be autofilled based on the name entered above.

Enter your Email address in the Contact Email field.

Document image


Tick the checkbox to enable OAuth Settings.

Document image


this will open up additional options / fields:

Document image


In the Callback URL field, replace "<YOUR_COMPANY_CODE_ON_LICENSESPRING>" text with your LicenseSpring Company Code (remove the quotation marks):

https://integrations.licensespring.com/credentials/authenticateSalesforce/<YOUR_COMPANY_CODE_ON_LICENSESPRING>



Example url if your company code in LicenseSpring is ‘testCompany’: https://integrations.licensespring.com/credentials/authenticateSalesforce/testCompany

Make sure to remove the <> brackets when you copy your LicenseSpring company code into your url. Follow the example url above just make sure its your company code

To find your company code:

  • Go to https://saas.licensespring.com/login and login to your LicenseSpring vendor platform account
  • Click Settings in the left navigation.
  • You will find your Company code In the "Preferences" tab
Document image


Copy your company code from the ‘Company code' field.

Do not copy the "Company name", But the company code, In the example picture above that would be "zdev"

The callback url should look something like in the picture below:

Document image


You will now need to Select 2 OAuth Scope Fields:

  1. Manage user data via APIs (api)
  2. Perform requests at any time (refresh_token, offline_access)

After adding the fields it should look like this:

Document image


The connected app settings page should look like this:

Document image


Click on the Save button, which will show you this page:

Document image


You can now click on the Continue button, which will take you to the Connected App that you have just created.

Warning: The newly created connected app may take up to 10 minutes to take effect inside your Salesforce instance.

Once processed your new connected app detail page should look something like this:

Document image


Click on the Manage Consumer Details button. It will redirect you to the following screen and a verification code will be sent to the email that you entered in the steps above.

Document image


Retrieve the code from your email, enter it into the "Verification Code" field and click the Verify button. After that you will be redirected to a page where you can see the Consumer Key and the Consumer Secret.

Document image


Copy both the Consumer Key and the Consumer Secret.

LicenseSpring integration connection

Open your LicenseSpring instance and navigate to Settings → Integrations.

Document image


By clicking on the Activate button under the SalesForce section, a modal window opens up

Document image


where the Client ID, Client secret, Salesforce Domain and Management API key are required.

For the Client ID copy the above mentioned SalesForce Consumer Key.

For the Client secret copy the above mentioned SalesForce Consumer Secret.

If the list of management keys is empty, a new one can be generated in LicenseSpring, by navigating to Settings → Keys and clicking on the Generate new key button.

The Management key has to have the ‘Read only’ flag disabled, otherwise the integration will not work.

Document image


To find your Salesforce Domain, again go to your Salesforce instance, click on the gear icon, and on the Setup. Search for "My Domain"

Document image


This will open up a page on which you have to copy your "Current My Domain URL" and paste it into the "Salesforce domain" input field

Example URL: test-dev-ed.develop.my.salesforce.com

Once all the fields are filled out, the initialisation process will begin when you press the Confirm button.

The user may be redirected to Salesforce, if needed. After that, if the initialisation is successful, the user is redirected back to LicenseSpring.

And that's it, you can go and use the Initialization wizard in you Salesforce instance by following the "SalesForce Integration User Documentation" in our docs

Troubleshooting

If you get an error while trying to activate the integration, similar to these two:

error=invalid client id&error description=client:20identifier:20invalid

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

Then wait a couple of minutes for the connected app in salesforce to be initialised and try again.

Also make sure to double check the previous steps. If they are correct, please contact the LicenseSpring support team for further assistance: https://licensespring.com/#:~:text=About%20Us-,Contact%20Support,-Contact%20Sales