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
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 Log in.
It will then bring up the Add Account window.
Open a separate Internet browser window.
- Login to salesforce.com
- Expand Apps in the left hand navigation
- Select App Manager
- From the upper right hand corner select New Connected App
- Use the settings:
- Connected App Name - "iDashboards Data Hub" (or other descriptive name)
- API Name - Should automatically populate after completing Connected App Name
- Contact Email - Your email address
- The other "Basic Information" options are not required, but can be helpful to users of the application.
- Enable OAuth Settings - Checked
- Callback URL - Use the "Redirect URL" value from the Add Account dialog in the iDashboards Data Hub
- Selected OAuth Scopes - Add the following:
- Access and manage your data (api)
- Allow access to your unique identifier (openid)
- Perform requests on your behalf at any time (refresh_token, offline_access)
- Require Secret for Web Server Flow - Checked
- Include ID Token - Checked
- Include Standard Claims - Checked
You should see another Add Account Dialog box.
Once you click on OK, it will bring up another windows asking to Log in to Salesforce.
Then click Allow 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.
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.
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.
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.
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.
Workbench is a great tool when trying to setup and map objects <Link>.