<< Back

Embedding Tableau into Salesforce: A guide

Salesforce.com is a market-leading CRM platform, and it recently acquired Tableau, a market-leading data visualisation platform. Many companies are using both tools heavily, and have deeply embedded the two systems into the day-to-day activities.

In order to consolidate both platforms, a common question is posed on how to marry these two platforms together.

This post will go through a couple of methods of doing this.

Update September 2020: There is now another new and easy way to embed Tableau into Salesforce. Learn more about it here!

In order to do any of the following, you do require the correct permissions, so do check with your Salesforce administrator.

Adding a Web Tab

The simplest and most basic option is to add a Tab with an embedded web-page which is linking to Tableau Server. In order to create the Tab, go to the ‘Setup’ cog in the top right section and search for the ‘Tabs’ section.

The type of Tab you need to create is a ‘Web Tab’. There are a few things to consider when setting up your new tab:

  • Ensure it’s a full-width tab
  • The tab will be a web object
  • Set your height accordingly based on the visualisation implemented
  • If Active Directory single-sign on is used, the transition to viz should be seamless – if Local Authentication is used, then the user may be prompted to log-in.

What’s the use case?

This type of ’embed’ solution is particularly useful when hosting generic visualisations which are company wide, and do not require any parameters to be passed through from Salesforce or any additional authentication.

For more, find this post on the Trailblazer community: https://success.salesforce.com/answers?id=9063A000000pBPBQA2

Using a Visualforce page

Creating a Web Tab is the easiest method of adding a Tableau dashboard into your Salesforce platform. Another option would be to create a Visualforce page to drag into different elements of your Salesforce portal.

The Visualforce page will eventually land you at this view, where you’ll have to write some APEX in the ‘Visualforce Markup’ section. Essentially, this is where you will embed the iFrame link to your Tableau visualisation.

A key difference between this and the previous option, creating a Web Tab, is that you’re able to pass through Salesforce fields and parameters back to the visualisation. So for example, if a dashboard has a “Client Name” which is the same on a dashboard, you’re able to utilise URL filters by adding additional conditions to a URL.

tableau.yourcompany.com/site/views/someWorkbook/someView?:embed=y&:showShareOptions=false&:toolbar=false&:display_count=no&:showVizHome=no&ClientName={! Account.Name }

In the above example ‘ClientName’ is identical to the “{! Account.Name } which is passed through from Salesforce. So depending on the Account I am looking at, my Tableau dashboard will filter the named dimension.

Creating this Visualforce page will mean you can use it in your Accounts, or ‘Lightening Apps’ – You can do this by navigating to an Account, clicking the gear in the top right and selecting ‘Edit Page’

As above, you’re able to add your ‘Visualforce’ page anywhere on the page. In the above example, the page is being added to a new tab.

What’s the use case?

Using this method allows a more dynamic view as Salesforce’s Visualforce language (Glossary here: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/visualforce_glossary.htm) can be used as URL filters or even further embedded into the link. The ability to drag and drop this ‘block’ into accounts makes it easier to integrate more closely within Salesforce as a platform.

For more detail on this example, click through to the following link: https://www.aaronwinters.org/embed-tableau-dashboard-in-salesforce-records-using-visualforce/

The SFDC Canvas Adapter from Tableau

The third option is to use the Salesforce Canvas Adapter from Tableau. This is a solution built by Tableau which they talk about in this blog post and this video from 2013.

This uses a combination of Salesforce, Tableau Server and a Heroku application named Sparkler to tie the three systems together.

The key benefit of using this method is to be able to control authentication (for example, through SAML or Trusted Ticket). It does seem like this was a solution before the Lightening platform and Visualforce existed.

The documentation and application were last updated in 2016, and we are currently investigating whether this method is still actively supported by Tableau themselves.

What’s the use case?

With the Canvas Adapter, the use case would be when an organisation is looking to use more nuanced methods of authentication such as Trusted Ticket or SAML, as well as have the technical skill to maintain Heroku Sparkler, Salesforce and Tableau in tandem.

For more, you can have a look at the Canvas Adapter here: https://www.tableau.com/sfdc-canvas-adapter

Conclusion

As mentioned above, in order to test any of these methods, you may need certain privileges to Salesforce, Tableau Server and even to Heroku. Depending on the use case for the dashboard an organisation would like to embed, any of these could solve the need for embedded analytics.

As the Salesforce & Tableau acquisition officially completes, other solutions may arise to better embedding Tableau visualisations into the Salesforce platform.

Ravi Mistry

London, UK

3 thoughts on “Embedding Tableau into Salesforce: A guide

  1. Ravi, as always, many thanks.

    Our Tableau server is core based licence, Active Directory (AD) user store behind SAML.

    We already have Salesforce embedded Tableau visualizations working using SSO credentials seamlessly, where the same user credentials are used for both Salesforce and Tableau.

    We had a further business requirement to federate Tableau dashboards in Salesforce where the Salesforce users do not have AD accounts are are not going to be added to AD. This viz is filtered by account (common identifier in Salesforce and Tableau).

    Achieved using the Canvas Sparkler adapter, trusted authentication, signed identity using a separate Tableau Site for this purpose.

    Key challenge was controlling embedded viz Tableau toolbar options; Although Tableau permissions can limit types of download and comments but not every toolbar option, the adapter appears to have only the option to display or hide the toolbar. Options similar to the JavaScript API for downloads, custom views and share links do not appear applicable in the canvas.

    As you say, interested to see how this type of integration develops.

Leave a Reply

Your email address will not be published. Required fields are marked *