Tableau quick integration in Salesforce


Salesforce is one of the leaders in the CRM sector and it is used in thousands of companies around the world. It is really useful software for managing the data of a sales department and it performs even better if you can combine it with Tableau. If you integrate Tableau into Salesforce you will be able to have the departmental reporting on the same page, saving time and making better analysis of the data.

Tableau offers you a solution with the Salesforce Canvas Adapter, but depending of the level of integration needed you can implement the following very easily. With the method explained here you could save time developing the integration and therefore save money too.

This method takes advantage of the flexibility offered by Tableau with the URL parameters and the facility to embed Tableau in an iframe. Also, Salesforce allows us to create some flexible objects with Apex programming language. Now we are going to explain the procedure for integrating Tableau with Salesforce in four quick and easy steps. Take into account that these actions need to be done in the dev version of Salesforce (sandbox) and then deploy it to production.

Tableau Salesforce 1
Step 1 – Tableau dashboard

Create a dashboard in Tableau and publish it to the server. This Dashboard has to be filtered with an available field in Salesforce. For instance, the ID for a certain account can be the perfect candidate if you are sure that exists in the EDW and in Salesforce. Once published, the URL provided by Tableau Server will be useful in the next step.

Step 2 – Visualforce page

Create a Visualforce Page in Salesforce:

This part can seem scary if you are not used to Salesforce development, but following this step by step guide can help you without needing previous knowledge in this area. All that is necessary to do this is to access the developer console in the sandbox environment.

Tableau Salesforce 2

Once inside the developer console is time to add the apex code below. The URL copied in the previous step needs to replace the red one. The filtering field in Tableau must replace the blue variable and the ID field of Salesforce replaces the green one. Name it and save it as a visualforce page.

<apex:page standardController="Account">

<apex:iframe src="http://tableauserver/views/workbook/dashboard?:embed=yes&CRMID={!account.AccountID__c}&:toolbar=no"

height="1110px" width="1160px" scrolling="true"/>


Now we are going to analyse the relevant parts of this code:

  1. <apex:iframe – apex code to create an iframe where the Tableau dashboard will appear.
  2. http://tableauserver/views/workbook/dashboard - URL of the published dashboard in Tableau server.
  3. ?:embed=yes – parameter to embed the dashboard into the iframe.
  4. &CRMID={!account.AccountID__c} – part of the URL to filter the view. CRMID is the field used in Tableau and has to be set as a filter in the dashboard. !account.AccountID__c is the ID of the accounts used in Salesforce. Both fields have to be common.
  5. &:toolbar=no – Parameter to hide the toolbar.
  6. height="1110px" width="1160px" – height and width of the iframe. It is advisable to be the same as the Tableau dashboard (unless using automatic size).
  7. scrolling="true" – enables the option of having a scroll in case it does not entirely fit.

The console will look like this:

Tableau Salesforce 3

(!) The common fields for which Tableau has to filter have to be defined in {!account.AccountID__c} section of the code. To detect the proper name of the Salesforce field it is advisable to go to the fields section just to ensure that you are picking the correct name and not the alias that is used in the view.

Tableau Salesforce 4

Step 3 – Create Salesforce section

To create a section to place the Tableau dashboard you will have to edit the page layout. To enter the editor mode press the “Edit Layout” link.

Tableau Salesforce 5

Afterwards, drag and drop the section object to the desired emplacement and name it.

Tableau Salesforce 6

Step 4 – Add Visualforce page

The next step consist in drag and drop the Visualforce page that we have created in step 2 to the “Tableau Reporting” section added in step 3.

Tableau Salesforce 7

Once added, it is possible to edit the dimensions of the Visualforce page pressing the settings button.

Tableau Salesforce 8

Finally, you will have to save the layout and the Tableau report will appear in your account view filtered by the account that you are visualizing. Each time that you change the account in Salesforce the Tableau report will also change. The final result will look something similar to this:

Tableau Salesforce 9



Enjoy your integration!


21 Responses to “Tableau quick integration in Salesforce”

  1. Pablo,

    Nice instructions. Do you know if this solution requires SSL? I followed the steps but cannot see any visualizations in Tableau.

  2. Pablo says:

    Hi Robert,

    Thank you for your comment. This solution is independent of the SSL applied to Tableau Server. It is Tableau giving you any error?

    You can send us information of your problem to the following email address:


  3. Arish says:

    Thank you so much for the info, this is just what I needed for something I’m working on!

  4. admin says:

    Thank you very much, and if you need anything else, just let us know, you can send us an e-mail:

  5. Raj says:


    I am publishing the tableau dashboards in salesforce page by creating a new custom tab . I can view those dashboards in my browser, but unable to see them on my salesforce1 app. How can I resolve this
    I’m using iframes , don’t want to use canvas adapter.



  6. Ridha says:

    Hi Pablo,

    Great article and well explained :-)
    If this integration can embed a dynamic tableau dashboard, so what’s the benefit of deploying a complex sparkler (adapter) server? Could you explain this point?


  7. Hello Ridha,
    Thanks for your comment. The functionality of both solutions is basically the same. The benefit of deploying the Canvas is that you are using the platform used to develop Salesforce Apps.

  8. Ridha says:

    Hi Pablo,

    I can add also that you can use Trusted Authentication through Sparkler, but you can’t do that directly. Is this always true or the Trusted Authentication can be achieved in both cases?


  9. Hi Ridha, with the solution shown in this blog you can also achieve Trusted Authentication if you have configured this option correctly in your system.

  10. Hi Raj,

    What output are you getting? You can send us more information about this issue to our e-mail if you prefer.

  11. export option says:


    Can you tell me if we can put export option when we embed tableau work book in salesforce like how we get export option when we export to tableau server.

  12. Hello,

    You have to change the toolbar URL parameter and set it to “top”:

    <apex:iframe src="http://tableauserver/views/workbook/dashboard?:embed=yes&CRMID={!account.AccountID__c}&:toolbar=top"


  13. Carl Herman says:


    I’m very interested in this solution since it seems way simpler than the Trusted Authentication – Canvas – Sparkler path.
    I am a Salesforce Admin, but I have never created a Visualforce Page before.
    I’m running into trouble:
    I used the following code and put the Visualforce Page in the Account layout, but the iframe still came up blank. Do you know why?

    The same thing happens if I use our Tableau URL.
    Strangely, If I use our company website (, it shows up in the iframe…


  14. Robert says:

    Can Sales force pass the filter on a Tableau story mode? I have a story and the filter is only being passed on the first tab but not on any subsequent tab.

    Can this get fixe?

  15. Hello Carl,
    Does it ask you for credentials when you directly insert the URL in a browser?


  16. Hello Robert,
    You have to configure the filter you are using in the dashboards of the storytelling on the workbook to apply to all the sheets that you are showing. Do not hesitate to contact us if you need more info.

  17. Peter Wells says:

    How were you able to resolve the ‘x-frame: same origin’ issue? Was this just a setting on the Salesforce Server side?

  18. Hello Peter,
    In my case I didn’t find this problem.
    Are you using the embed code from the dashboard in Tableau?

    Also, you can find further information on how to configure your visualforce by enabling or disabling clickjack protection:

    Hope it helps.

  19. Peter Wells says:

    Thanks for the response! After speaking with our BI folks on the subject, turns out there was an erroneous ‘#’ being injected into the Tableau url. This causes the browser (or something) to think click-jacking is taking place.

  20. Many thanks for the feedback!

  21. Lesley says:

    I’m trying to pass two parameters to one tableau dashboard with two graphs. My dashboard is pulling the graphs from two separate worksheets. I was hoping that the first parameter “Region_Desc={!$User.Department}” would filter the first graph and the second parameter” Sales_Rep_Key={!$User.BATO_Sales_Rep_ID__c}” would filter the second graph. However, I’m finding that if a user has both parameters only the Sales_Rep_Key is being considered so the graphs end up looking the same.

privacy policy - Copyright © 2000-2010 ClearPeaks