This article describes how to connect Tableau to Salesforce.com data and set up a data source.
- Beginning with Tableau Desktop version 2020.4, OAuth is used for all sign-ins. Signing in with username and password is not an available option.
- Tableau Prep Builder version 2020.2.1 supports connecting to Salesforce.com data. However, not all connector options described in this article are supported. For information about what is supported by Tableau Prep Builder, see Connect to Salesforce data(Link opens in a new window) in the Tableau Prep Builder help.
Before you begin, gather this connection information:
Credentials for signing in to Salesforce.com using OAuth
Setup a custom OAuth Client to use your company's IT policies
You can fully control your OAuth configuration according to your own IT policies with a custom OAuth client. The option to use your own OAuth client frees you from being tied to Tableau release cycles and Tableau’s OAuth client rotation schedule. For information on how to configure your own OAuth client see, Configure Custom OAuth for a site.
Start Tableau and under Connect, select Salesforce. For a complete list of data connections, select More under To a Server. Then do the following:
Enter your sign-in credentials for Salesforce.com.
Select Log In.
In the Allow Access dialog box, select Allow.
If the connection is unsuccessful, verify that the authentication information is correct. If the connection continues to fail, your computer is having trouble locating the server or you may not have permission to access the data. Contact your network administrator or Salesforce administrator.
On the data source page, do the following:
(Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.
Select a standard connection or create your own custom connection.
Under Standard Connection, you can select from a list of predefined queries, which represent commonly used objects, and drag it to the canvas. Or, under Table, you can select a single table, which includes any custom objects your company has created, and drag it to the canvas.
Select the sheet tab to start your analysis.
Work with a subset of columns
Beginning with Tableau Desktop versions 2020.1, you can work with a subset of columns.
If you want to select a subset of columns to work with, double-click New Custom SQL and use this syntax:
SELECT <column1, column2, […]columnN> FROM <table>
For example, to work with three columns from the Org table — Account Rep, Department, and Cost Code — you could type:
For more information, see Connect to a Custom SQL Query.
SELECT AccountRep, Department, CostCode from Org
Refresh Salesforce data
After you click the sheet tab, Tableau imports the data by creating an extract. Tableau Desktop supports only extracts for Salesforce.
Note: The initial extract may take some time depending on the amount of data that is included.
After the initial extract, you can do a full or incremental refresh of the extract. Incremental refreshes for Salesforce data include any Salesforce object that has been added or changed since the last incremental refresh. Results returned are limited to the previous 30 days.
To refresh, select Data> [data source name] > Extract> Refresh (Incremental) | Refresh (Full).
Note: The incremental refresh option doesn't support Custom SQL.
You can use an Accelerator to quickly build informative dashboard designs made specifically for key business metrics on Tableau Desktop and Tableau Cloud. For more information, see Use Accelerators to Quickly Visualize Data.
When you set up the data source on the data source page, when you drag a table to the canvas, the list of tables you can select from to join is filtered. You can create joins on any string fields and on fields that are constrained references between tables. (Only left and inner joins are supported.) You can also add joins later. For more information, see Join Your Data.
Note that Salesforce connections do not support non-equi joins and must use the equality operator (=).
Cross-database join limitations with Salesforce
Salesforce also supports combining tables from different databases using a cross-database join. For more information, see the "Combine tables from different databases" section in Join Your Data.
When a Salesforce connection is included in a multi-connection data source, the data source won't support the following features:
Incremental updates to the extract
Viewing your data in the data grid
Tableau leverages the various force.com APIs to connect to Salesforce.com, Force.com, and Database.com data. These services have some restrictions on the type of data and the amount of data that you can access at a given time. If you are having trouble connecting, the following list of common restrictions may help you find a solution.
Company account and user profile configuration
In order for Tableau to connect to Salesforce data, all of the following must be enabled on both your company's account and your user profile:
SOAP API for signing in
REST API for getting meta data
BULK API for downloading objects
REST API for downloading objects that the BULK API does not support
Replication SOAP APIs for retrieving changes in the data
To optimize for performance and ensure the APIs are available for all of their customers, Salesforce.com balances the load by limiting the number of concurrent API requests as well as limiting the total number of API requests overall. An error occurs if these limits are reached while connected using Tableau. See the Salesforce.com developer documentation to learn more about these limits.
Note: Some editions of Salesforce may not allow API access at all. Contact your Salesforce administrator to verify that your account has access to the above list of APIs.
Errors during extract
When you connect to Salesforce using Tableau, the data is automatically extracted into a Tableau Data Extract file. In some cases, certain fields cannot be extracted because of character limits. Specifically, text fields that are greater than 4096 characters and calculated fields will not be included in the extract. If you have calculated fields in your data, you will need to recreate them in Tableau after creating the extract.
In addition, the Force.com API restricts queries to 10,000 total characters.
- Set Up Data Sources – Add more data to this data source or prepare your data before you analyze it.
- Build Charts and Analyze Data – Begin your data analysis.
5 Ways to Maximize Your Salesforce Data(Link opens in a new window) - Read the Tableau whitepaper (registration or sign in required).