iDashboards.com

Salesforce API Connection

This document goes over the process required to create an API connection to Salesforce. This process will flow from initializing the API connection to creating a job in the ETL tool that transfers that API data into a database table/data source, to adding a chart connecting to that data source.

Table of Contents

Salesforce API Connection

Connecting the Salesforce API

Creating a new Data Set

Creating a new chart

Connecting the Salesforce API

Begin by logging into the iDashboards Data Hub and select the API Accounts option from the System Drop Down menu.

You will now see a new screen that shows you the API Accounts options as well as any existing API connections you might have already configured. Click the Add Account button.

Now select the Salesforce option and click Login.

It will then bring up the Add Account window.

Open a separate Internet browser window.

  1. Login to salesforce.com
  2. ExpandApps in the left hand navigation
  3. Select App Manager
  4. From the upper right hand corner select New Connected App
  5. Use the settings:
  6. Connected App Name - "iDashboards Data Hub" (or other decriptive name)
  7. API Name - Should automatically populate after completing Connected App Name
  8. Contact Email - Your email address
  9. The other "Basic Information" options are not required, but can be helpful to users of the application.
  10. Enable OAuth Settings - Checked
  11. Callback URL - Use the "Redirect URL" value from the Add Account dialog in the iDashboards Data Hub
  12. Selected OAuth Scopes - Add the following:
  13. Access and manage your data (api)
  14. Allow access to your unique identifier (openid)
  15. Perform requests on your behalf at any time (refresh_token, offline_access)
  16. Require Secret for Web Server Flow - Checked
  17. Include ID Token - Checked
  18. Include Standard Claims - Checked
  19. Save the app, you should be taken to the page to view your newly created app.
  20. Copy the Consumer Key and paste it into the Client ID field in the Add Account dialog in the iDasboards Data Hub.
  21. Click to reveal the Consumer Secret, Copy it and paste it into the Client Secret fieldin the Add Account dialog in the iDasboards Data Hub, click Next.

You should see another Add Account Dialog box.

Once you click on OK, it will bring up another windows asking to Allow Access from Salesforce.

After giving it access you will see.

You will now see the newly created Salesforce option avialable in the Data Hub window.

Creating a new Data Set

You have completed adding your Salesforce API connection. From here you are now ready to proceed to creating a new data set in the ETL tool. First create a new Data Set:

Select Cloud API and choose the Salesforce option.

The next window will ask you what kind of Query Type you would like to use. (This example will use the Lead object and select the 3 columns listed below.)

Then, click Save. In the new window, you can confirm your data.

Click Save and give the new data set a name and save it to an available Data Sets folder. Click Save again.

Your new Data Set will now be available in the Data Hub and you can access it under Edit Data Sets:

Creating a new ETL job

Select New ETL job to add the data from the data Set into a database table. Drag an “E” task from the left onto the canvas. Hover over the “Extract Data” task and click on the gear icon. Select your Data Set and click Open.

Click Save.

Add a Load operation and link the Extract to the Load. Then configure the Load operation to save the data to a table in your database.

Click Create a Target Table from Input. Select a Schema:

Give the Table a name and click Create:

Verify your details in the next window and click Save.

Now you can begin building out your ETL job. Create a simple job that moves the data from the data set into a database table of your choosing with just an Extract task and Load task. Once that is done, click Save or Save As.

Once the job has been run to create the table and it has added the data to the data store target table you selected, you now have an available data source that contains your Salesforce data and you are ready to build a chart from this data in the User application.

Creating a new chart

Log into the User application and right click on any dashboard and select New Chart, then find the data hub data source you added the table to and select it from the list. Now pick the correct data set table you created in the ETL tool and click Next.

Now, select the columns you want to use in your chart and click Next.

Finally, choose a chart type and click Finish.

You will now see your new chart filled with data from your Salesforce API connection in your new chart.