This article describes how to connect tableau to data from salesforce.com and set up a data source.
notes: – Starting with version 2020.4 of tableau desktop, oauth is used for all logins. login 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 Tableau Prep Builder supports, see Connect to Salesforce Data (link opens in a new window) in the Tableau Prep Builder Help.
Reading: How to connect tableau to salesforce
Before you begin, collect this connection information:
credentials to login to salesforce.com via oauth
set up a custom authentication client to use your company’s it policies
You can fully control your authentication settings according to your own IT policies with a custom authentication client. the option to use your own oauth client frees you from being tied to tableau’s release cycles and tableau’s oauth client rotation schedule. For information on configuring your own oauth client, see Configuring custom oauth for a site.
establish the connection and configure the data source
launch tableau and under connect select salesforce. for a complete list of data connections, select more on a server. then do the following:
Enter your login credentials for salesforce.com.
in the allow access dialog, 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, then enter a unique data source name to use in tableau. for example, use a data source naming convention that helps other users of the data source determine which data source to connect to.
select a standard connection or create your own custom connection.
Under the standard connection, you can select from a list of predefined queries, which represent commonly used objects, and drag it onto the canvas. Or, below the table, you can select a single table, including any custom objects your company has created, and drag it onto the canvas.
select the sheet tab to start your analysis.
work with a subset of columns
As of the 2020.1 versions of tableau desktop, 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, […]column> from <table>
for example, to work with three columns of the organization table (account representative, department, and cost code), you can type:
select account representative, department, organization cost code
update sales force data
after clicking the sheet tab, tableau imports the data creating an extract. tableau desktop only supports extracts for salesforce.
note: the initial extraction may take some time depending on the amount of data included.
After the initial extract, you can perform a full or incremental update of the extract. Incremental updates to salesforce data include any salesforce objects that have been added or changed since the last incremental update. results returned are limited to the previous 30 days.
to update, select data> [data source name] > extract> update(incremental) | update (complete).
You can use an accelerator to quickly create dashboard layouts built specifically for key business metrics on tableau desktop and tableau online. for more information, see use accelerators to quickly visualize data.
using joins in salesforce
When you configure the data source on the data source page, when you drag a table onto the canvas, the list of tables you can select to join is filtered. you can create joins on any string field and on fields that are restricted references between tables. (only left and inner joins are supported). you can also add combinations later. For more information, see Join your data.
Note that salesforce connections do not support unequal joins and must use the equality operator (=).
cross-database join limitations with salesforce
Salesforce also supports joining tables from different databases using a cross-database join. For more information, see the “Join tables from different databases” section in Joining your data.
When a salesforce connection is included in a multi-connection data source, the data source will not support the following features:
incremental extract updates
view your data in the datagrid
troubleshoot salesforce connections
tableau leverages the various force.com APIs to connect to data from salesforce.com, force.com, and database.com. these services have some restrictions on the type of data and the amount of data you can access at any given time. If you’re having trouble connecting, the following list of common restrictions may help you find a solution.
company account and user profile settings
For tableau to connect to salesforce data, all of the following must be enabled in both your company account and user profile:
soap api to login
rest api to get metadata
massive api to download objects
rest api to download objects that the bulk api does not support
replication soap apis to retrieve data changes
To optimize performance and ensure APIs are available to all of its customers, salesforce.com balances the load by limiting the number of concurrent API requests and limiting the total number of API requests overall. an error occurs if these limits are reached while connected via tableau. see the salesforce.com developer documentation for more information on these limits.
note: some editions of salesforce may not allow access to the api. contact your salesforce admin to verify that your account has access to the above list of api.
errors during extraction
When you connect to salesforce via tableau, the data is automatically extracted into a tableau data extraction file. in some cases, certain fields cannot be extracted due to character limits. specifically, text fields that are longer than 4096 characters and calculated fields will not be included in the statement. if you have calculated fields in your data, you will need to recreate them in tableau after creating the extract.
Also, the force.com api restricts queries to 10,000 characters total.
- configure data sources: add more data to this data source or prepare your data before analyzing it.
- build graphs and analyze data: start your data analysis.
Five Ways to Maximize Your Sales Force Data(link opens in new window): Read the tableau white paper (registration or login required).