GuidesRecipesAPI ReferenceChangelog
HomeSee demo
Guides

Salesforce

Configuring Salesforce with Polytomic On Premises

In order to connect Polytomic On Premises to Salesforce, you must create a Connected App in the Salesforce Console. A Connected App allows Polytomic to make a secure connection to Salesforce using OAuth.

These are the steps to go through:

  1. Go to Setup in Salesforce and open the App Manager, located in Platform Tools.

  1. Click New Connected App in the upper right, and provide a name and contact email for the app. The contact email should be one you control.

  1. Check the Enable OAuth Settings box to edit the connection settings.

The Callback URL should be set to <POLYTOMIC_URL>/connect/salesforce, where POLYTOMIC_URL is the URL you use to access Polytomic. For example, if you access Polytomic at https://polytomic.internal.acmecorp.com callback URL will be https://polytomic.internal.acmecorp.com/connect/salesforce.

The selected OAuth scopes must include the following:

  • Manage userdata via APIs (api).
  • Access the identity URL service (id, profile, email, address, phone).
  • Perform requests at any time (refresh_token, offline_access).

  1. Click Save and you’ll be presented with the configured app. There are two details to capture here: the Consumer Key and Consumer Secret.

  1. If your Salesforce organization is set to enforce refresh token restrictions by default, you may need to configure the Refresh Token Policy:

Click on Manage Connected Apps then click the name of the app you just created ("Polytomic On Premises" in this example).

Verify that the refresh token policy is set to Refresh token is valid until revoked.

  1. Set the following environment variables in your Polytomic installation:
    • SALESFORCE_CLIENT_ID: the Consumer Key from step 4.
    • SALESFORCE_CLIENT_SECRET the Consumer Secret from step 4.