Setting up Salesforce OAuth

In order to use the Salesforce SOQL plugin, you will need to log into the Salesforce browser interface and setup an OAuth connection. This article summarizes the key steps.  

  • Detailed instructions can be found in the Salesforce support area. Refer to Creating a Connected App for more information.

NOTE

  • The "regular" Salesforce plugin does not require an OAuth connection.
  • You can set up a connection using that plugin simply by inputting your Salesforce username and password, plus your "security token" (which is essentially an extra password, obtainable from the Salesforce browser interface).

1. Log into Salesforce

  1. Go to the "Setup" menu

2. Go to Build > Apps > New

Use the Build Section in the Left Sidebar:

  1. Choose "Apps" in the Create sub-section
  2. Click the "New" button in the Connected Apps section

3. Define the Basics

  1. Specify Connected App Name
    • Enter the API name used when referring to your app from a program
  2. Enter the Contact Email for Salesforce to use when contacting you or your support team. This address isn’t given to Salesforce admins who install the app

For more information, refer to Create a Connected App

4. Enable OAuth Settings

  1. Choose "Enable OAuth Settings"
  2. Provide a Callback URL (endpoint) in this form where example.metricinsights.com is the hostname for your Metric Insights server
  3. Selected OAuth Scopes should include:
    • Access and manage your data (API)
    • Perform requests on your behalf at any time (refresh_token, offline_access): this will enable Metric Insights to refresh Your Token
  4. Click [Save]

5. Connected Apps > your new App

Click the Connected App Name to open its configuration page containing Consumer Key (ID) and Consumer Secret

6. Client ID and Client Secret

You should see your Consumer Key (ID) and your Consumer Secret in the middle of the page.

 ('SALESFORCE_OAUTH2_CLIENT_ID', '3MVxxxxxC92_J.LmfhKJ0Z_...5JydLTMG5bh6eosdfWExxxbc_2FWeBclda5gD6');
 ('SALESFORCE_OAUTH2_CLIENT_SECRET', 'nnnnnn..');

Note: These are client specific.

You need to add your Salesforce Secret and Client ID to the Config variables. For details, see Step 7 below.

7. Configure Salesorce Variables in Metric Insights

Access Config Variables via the Admin menu: Admin > Utilities > System config (For details, see Setting the Configuration Variables):

  1. Filter config settings for Salesforce
  2. Modify the variables to include "Salesforce Secret" and "Client ID"
  3. Commit Changes

0 Comments

Add your comment

E-Mail me when someone replies to this comment