Skip to main content

Salesforce Integration

The Re:infer Salesforce Integration provides a convenient and easy-to-setup way to sync your Salesforce communications data into Re:infer in real time. The integration is capable of syncing emails and other communications data.

Overview#

The Salesforce Integration is a managed pipeline running on the Re:infer cloud that can be configured to extract pieces of communications data from Salesforce objects without any development needed.

Once the integration is configured it will continuously poll for the configured objects and fields in Salesforce, clean them, enrich them with object metadata and convert them to Re:infer comment objects.

The Re:infer comments will be stored in a Re:infer source as configured. If you connect the source to a new or existing dataset, those comments will then be available on the web interface and from the API to any user with the right access.

Access to Salesforce data via the Salesforce Integration is managed through Salesforce Connected Apps and authenticated with OAuth2, giving you full control of when and how much you give Re:infer access to your data.

Salesforce Integration Architecture Overview
Salesforce Integration Architecture

Configuring Salesforce#

In order to provide Re:infer access to your Salesforce instance, a Salesforce administrator will need to create a Connected App.

It's worth familiarising yourself with the concepts of Connected Apps in the above link, but to set up the Re:infer Salesforce Integration the following steps should be sufficient.

Creating a Connected App#

  1. In your Salesforce Setup, under Apps, select App Manager and click on New Connected App.
Create a new Connected App
Create a new Connected App in Salesforce
  1. Follow the guidance from Salesforce and fill in the required information, such as App Name, API Name and Contact Email. The following is an example:
Required information for a Connected App
Example required information
  1. Select the checkbox Enable OAuth2 Settings, this will open up a new section of options.

  2. Under Callback URL, insert the following line, replacing <mydomain> with your (tenant domain)[/api/tenants#api-endpoint]: https://<mydomain>.reinfer.io/external/salesforce/oauth2/callback.

  3. Under Selected OAuth2 Scopes you'll need to select the access the App will give Re:infer. The following scopes are required for the Salesforce Integration to work:

OAuth2 Scopes
Access and manage your data (api)
Perform requests on your behalf at any time (refresh_token, offline_access)

Select the above and click "Add" to add them to the Selected OAuth2 Scopes.

OAuth2 Settings for a Connected App
The required OAuth2 settings for the Connected App
  1. You do not need to change any of the other settings. Click on Save at the bottom of the page to create the Connected App.

Take note of the Consumer Key and Consumer Secret on the Connected App you just created, you will need both of these in the following steps.

Connected App Consumer Key and Consumer Secret
Consumer Key and Consumer Secret

Configuring Re:infer#

Contact Us

At the moment, only Re:infer engineers can configure the Salesforce Integration. Please get in touch with your Re:infer representative or email support@reinfer.io for assistance.

After creating a Connected App, you will need to contact us at support@reinfer.io for a Re:infer engineer to create the Salesforce Integration.

The following information should be provided to assist creating the integration:

NameDescription
Consumer KeyA long string of letters and numbers, found on the page for the Connected App
Consumer SecretA long string of letters and numbers, found on the page for the Connected App
Instance URLYour Salesforce instance URL, e.g. um6.salesforce.com, see Salesforce documentation for how to find it

Once the integration has been created by the Re:infer engineer, continue by authenticating to Salesforce via OAuth2 below, after which you should contact us again to provide a list of Salesforce objects, their mapping to comment objects, and Re:infer sources they should be synced into. A Re:infer engineer will use this information to configure and initialize the integration.

Authenticating with OAuth2#

Once the integration has been created, it needs to be authenticated to get access to your Salesforce data. This is done through OAuth2 with an authorized Salesforce account.

Start by going to the following URL:

https://<mydomain>.reinfer.io/integrations/<org-name>/<integration-name>/oauth2/authenticate

Make sure to replace <mydomain> with your tenant domain, and <org-name>/<integration-name> with the values you provided when creating the integration.

Integration User

Any Salesforce user with the right access to the data you'd provide to Re:infer can be used to authenticate the integration, however it's generally recommended to use a dedicated integration user for this so that the Salesforce Integration is not tied to a specific person's user account. You can read more about Salesforce's recommendations on the matter here.

Once you load that URL in a browser you will be automatically redirected to a Salesforce login page. Log in with the Salesforce account that will provide access to the integration and the browser will redirect to a confirmation page.

Salesforce OAuth2 Login Page
Salesforce OAuth2 Login Page

On the confirmation page, approve the requested permissions.

Salesforce OAuth2 Confirmation Page
Salesforce OAuth2 Confirmation Page

Once done, you should be redirected back to https://reinfer.io with a notification indicating the integration was configured successfully.

Configuring the Integration#

Contact Us

At the moment, only Re:infer engineers can configure the Salesforce Integration. Please get in touch with your Re:infer representative or email support@reinfer.io for assistance.

The Salesforce Integration can be configured to poll for any of your standard or custom Salesforce objects, and map any text field to Re:infer comment objects in a Re:infer source. Note that you will need the API name of your fields and objects, so you may need to ask a Salesforce administrator on your end, or refer to the following Salesforce help article. Contact us with a list of objects and fields, their mapping to comment objects and Re:infer sources they should be synced into and a Re:infer engineer will configure and initialize the integration.

Once the integration is running, it will continuously poll Salesforce at a configured interval (usually every couple of minutes) for the objects configured above. If any data has changed or was added it will propagate to the corresponding comment in Re:infer or create a new comment. You will be able to see the data in Re:infer once the source containing the data has been connected to a dataset.