Embed Tableau Views into Salesforce

You can easily embed Tableau views into Salesforce Lightning pages using the Tableau Viz Lightning web component that is available from the Salesforce AppExchange. When you edit a Lightning page, you simply drag and drop the Tableau Viz Lightning web component onto the page and then provide the URL for the Tableau view. You can embed Tableau views from Tableau Server, Tableau Cloud, or Tableau Public. The Tableau Viz Lightning web component supports all versions of Tableau. Using the Tableau Viz Lightning web component, Salesforce administrators and developers can quickly integrate Tableau dashboard into Salesforce pages.

You can set up Tableau Server and Tableau Cloud for single sign-on (SSO), so that users of the Tableau Lightning web component won't have to sign in to Tableau every time they visit the Salesforce page.

The Tableau Lightning web component includes built-in support for filtering the view based upon the Lightning record page you are embedding the view in. The component lets you configure how the view is displayed in Salesforce, and provides additional filtering capabilities based upon Tableau and Salesforce fields you select.

Requirements and Permissions

  • The Tableau Viz Lightning web component is designed to run on the Salesforce Lightning Experience. Lightning Web Components are supported in many Salesforce experiences and tools such as Lightning Communities and Salesforce App. The Tableau Viz Lightning web component does not support Salesforce Classic.
  • To install and configure the Tableau Viz Lightning component, you need to have administrator privileges for the Salesforce org.
  • Context and advanced filtering of the Tableau view is only available on Lightning Experience record pages.

The Tableau Viz Lightning web component only supports the Salesforce Lightning Experience. If you want to embed a Tableau view into Salesforce Classic, you have other options. You could use the Salesforce Canvas Adapter for Tableau, or create a custom solution using Apex code and Visualforce pages. For more information, see Tableau Viz Lightning Web Component Does Not Work on Salesforce Classic(Link opens in a new window).

Configure single sign-on (SSO)

If you are embedding a Tableau view from Tableau Server or Tableau Cloud, you might want to configure SSO with Salesforce. That way when users sign into Salesforce and open a page that contains an embedded Tableau view they won't need to re-authenticate with Tableau. The Tableau Viz Lightning web component only supports SAML as the SSO method. The SAML IdP used for Tableau authentication must be either the Salesforce IdP or the same IdP that is used for your Salesforce instance. Configuring Tableau Server or Tableau Cloud requires Tableau administrator permissions.

Note: Users in Tableau Cloud who are configured with Salesforce Authentication(Link opens in a new window) will need to reauthenticate to view embedded visualizations in Tableau Cloud.

Install the Tableau Lightning web component

The Tableau Lightning web component is available from the Salesforce AppExchange.

  1. Get the component from the Salesforce AppExchange(Link opens in a new window).
  2. Install the Tableau Viz Lightning Web Component in your Salesforce org.

Add the Tableau view to the Lightning page

After you have successfully installed the Tableau component for your Salesforce org, you can use the component to add a Tableau view to Lightning Experience pages.

  1. From the App Launcher (App Launcher), find and select a page to embed the Tableau visualization. (For example, select Sales or any other App that provides a home or record page where you can embed the Tableau Lightning web component).
  2. Click the Setup gear (Setup gear) and then select Edit Page.
  3. Drag the Tableau Visualization component from the Custom - Managed area of the Lightning Components list to the top of the Page Canvas.
  4. Select a Tableau view to display by providing the URL for the view in the Enter the Viz URL text box.
  5. To find the URL for a view on Tableau Server or Tableau Cloud, click Share on the toolbar and select Copy Link from the Share View dialog box. For Tableau Public, copy the URL for the view from the address bar in your browser.
  6. In Salesforce, use the options for the Tableau Visualization component to control the size of the view and whether you want to show the Tableau toolbar or any tabs for the view.

    You can also control when the Tableau Viz Lightning web component appears by selecting component visibility filters. For more information about the Set Component Visibility options, see Dynamic Lightning Pages(Link opens in a new window) in the Salesforce Help.

For the best experience, you might want to configure Tableau and Salesforce to use SSO. See Configure single sign-on (SSO).

Tableau Visualization LWC

 

Filter the view based upon the page context

The Tableau Lightning component supports two ways of filtering the Tableau visualization. These methods of filtering only work on Lightning record pages. Filtering is not available for Home pages or App pages. For record pages, you can automatically filter the Tableau visualization based upon the page it is embedded in (context filtering), or you can specify the fields to use for filtering in Tableau and in Salesforce to create more sophisticated views.

To have the view filtered based upon the page it is embedded in, the Tableau view needs to have a field that corresponds to the record page ID. For example, if you want to embed a view for sales on a user's page that shows just the sales for that user, the Tableau view should include a field or parameter that holds the record IDs for users.

  1. In your Salesforce org, select a record page where you want to embed the viz (for example, Users or Opportunities).

  2. Edit the record page and configure the component by entering the URL of the Tableau view that contains the data you want to display. The Tableau visualization must include a field that holds the record IDs (for example, user or account IDs).

  3. Select Filter visualization based on the page and save your changes to the page.

    When the record ID of the page matches the corresponding value in a field in the Tableau view, the Tableau Lightning component applies that filter. For example, if you want to embed a Tableau view on the Account page and filter for the specific account, the Tableau view needs to have a field named Account ID. The Tableau Viz Lightning web component uses the default field name when a user connects to Salesforce using Tableau.

Apply filters based upon on Tableau and Salesforce fields

If you want more control over filtering the Tableau visualization on a records page, you can map a field or parameter in Tableau to a specific field in Salesforce. The Tableau field or parameter needs to be on the view that you are embedding. The Salesforce field must be a qualified field on the page where you are embedding the view. When the values of these two fields match, the Tableau Visualization component will automatically filter the Tableau view.

To apply the advanced filtering, add the Tableau Visualization component to a record page. For example, if you have a Tableau view that contains Salesforce data that is related to sales information, you can add that view to your opportunity record pages.

  1. In your Salesforce org, click the App Launcher (App Launcher), find and select Sales (or any other App that provides a record page where you can embed the Tableau Lightning component). For example, the click Accounts tab. Select an account, for example, Burlington Textiles from the All Accounts list.

  2. Click the Setup gear (Setup gear) and then select Edit Page.

  3. Drag the Tableau Visualization component from the Custom area of the Lightning Components list to the top of the Page Canvas.

  4. Configure the component.

    • Enter the URL of the Tableau view that contains the sales data you want to display.

    • Provide the name of the Tableau field to use for filtering. The Tableau field needs to be the name of a field in the view that you are embedding. For example, the view might contain a field for the User ID.

    • Provide the name of the Salesforce field to use in filtering. You can select the qualified field names for the page from the drop-down list. For example, on the account record page, you could select Owner ID.

      When the values from these two fields match, the Tableau Visualization component automatically filters the view.

      Tableau Viz LWC filtering options

  5. Save your changes to the page.

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!