Establish Connectivity to Salesforce Reports

This article describes how to connect to Salesforce using Salesforce Reports plugin in order to load data into Datasets and Reports in Metric Insights.

NOTE:

Our plugin currently supports functioning with Salesforce Classic UI, so make sure that the User account has Salesforce Classic UI enabled on the Salesforce site.

1. Create New Data Source

Access Admin > Collection & Storage > Data Sources

  1. [+ New Data Source]
  2. Choose "Salesforce Reports" from the Other drop-down list
  3. [Next Step]

2. Provide Required Parameters

  1. Enter a descriptive phrase in Data Source Name
  2. Enter Salesforce Client ID
  3. Provide Salesforce Client Secret
  4. Input Salesforce Username  
  5. Provide Salesforce Plugin Password

Optionally, toggle on Enable On-Demand Element Creation

The following parameters are used for OAuth 2 authorization of connected Apps:

  • Client id = Consumer Key in Salesforce
  • Client secret = Consumer Secret in Salesforce  

You can obtain them from your organization's Salesforce account. See more details in sections below.

2.1. Finding Consumer Key and Consumer Secret in Salesforce (Classic UI)
  1. Go to Build > Create > Apps
  2. Under Connected Apps, open the App link
  3. In the API section, copy Consumer Key
  4. Click the link to reveal and copy Consumer Secret

3. Configure Optional Parameters


Name Description
1 Server

Specify the name of your custom Salesforce Server that you want to use instead of the default one

4. Proceed with Advanced Configuration

Advanced Configuration settings can be set to default values unless Data Source requires more precise tuning. For more details on how to proceed, refer to Advanced Data Source Configuration.

[Test Connection] in the upper right corner

5. Troubleshoot 4xx Errors when Getting External Reports List

A comprehensive list of Status Codes and Error Responses is provided by Salesforce REST API Developer Guide.

When trying to establish connection with Salesforce via the corresponding plugin connection profile, you might get 4xx client errors caused by security constraints.

In order to alleviate the problem of authorization, you may need to relax IP restrictions in Salesforce.

For reference, see instructions below.

  1. To access Connected Apps:
    • From the Homepage, go to Setup
    • In the Left Side menu, find the Build section
    • Expand Create to reveal the list of Apps
    • Move down to Connected Apps
  2. Next to the Connected App name, click [Manage] 
  3. On the Detail page, click [Edit Policies]
  4. On the Edit page, for IP Relaxation select Relax IP restrictions under OAuth policies