Embedding Tableau Dashboards in Salesforce Records using Visualforce

This post originally appeared on the Atrium blog. Authored by Monali Dixit.

This post will focus on using Visualforce to embed Tableau dashboard in Salesforce records. This method assumes you have already published your Tableau dashboard, and have some Salesforce development knowledge.

Embed and Filter Your Tableau Dashboard in Salesforce Lightning Experience Records

After you have published your Tableau Dashboard online, go to your Salesforce org and do the following:

  • Create a new Visualforce page by navigating to Salesforce Setup, search for and open “Visualforce Pages”.
  • Click the “New” button, enter “SimpleEmbedTableau” for the name and check the box “Available for Lightning Experience, Lightning Communities, and the mobile app”.
  • Replace the placeholder code with the code below.
See original
  • Navigate to your Tableau dashboard online and click the “Share” button.
  • Copy the value in the link field starting from https:// until the first “?”, but do not include the “?” in your selection.
  • Replace [URL FOR TABLEAU DASHBOARD] with the value you just copied. Save the Visualforce page.

Now we need to customize the sObject record page to show the dashboard.

  • Navigate to the sObject record in your Salesforce org to which this dashboard relates.
  • Click the gear icon in the top right and select “Edit Page”. This will open the Record Page editor in the Lightning App Builder.
  • Click the Tabs (1) component, then the Add Tab (2) button. Select “Custom” (3) for the Tab Label and enter “Tableau” for the Custom Tab Label (4).
  • Click the Tableau tab, then drag the Visualforce component from the list of Lightning Components onto the page.
  • In the right pane, select “SimpleEmbedTableau” for the Visualforce Page Name and leave the Height blank to use the default height set by the Visualforce page.
  • Save the Record Page and then view the record to see the filtered dashboard.

That’s it! Happy embedding!

As the market leader in intelligent solutions, we help organizations make smarter decisions and act on them. Learn more at atrium.ai

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store