Embed Tableau Views into Salesforce
Tableau views can easily be embedded into Salesforce Lightning pages using the Tableau Viz Lightning web component available from the Salesforce AppExchange. When you edit a Lightning page, you drag and drop the Tableau Viz Lightning web component onto the page and then provide the Tableau view’s URL. You can also embed Tableau views from Tableau Server, Tableau Online, or Tableau Public. The Tableau Visualization Lightning web component supports all versions of Tableau. Using the Tableau Visualization Lightning web component, Salesforce administrators and developers can quickly integrate the Tableau dashboard into Salesforce pages.
You can also set up Tableau Server and Tableau Online for single sign-on (SSO) so that the Tableau Lightning web component users will not have to sign in to Tableau every time the users visit the Salesforce page.
The Tableau Lightning web component comprises built-in support for filtering the views based upon the Lightning record page on which you are embedding the view. This component lets you configure how the view is displayed in Salesforce and provides the additional filtering capabilities based upon the Tableau and Salesforce fields you select.
Requirements and Permissions:
The Tableau Viz Lightning web component is basically designed to run on the Salesforce Lightning Experience. Lightning Web Components are supported by many Salesforce experiences and tools like Salesforce App and Lightning Communities. The Tableau Viz Lightning web component do not support the Salesforce Classic.
For installing and configuring the Tableau Viz Lightning component, you need to have the administrator privileges for Salesforce org.
Context and advanced filtering of a Tableau view are only available on Lightning Experience record pages.
Configure single sign-on (SSO):
If you are trying to embed a Tableau view from Tableau Server or Tableau Online, you may want to configure SSO with Salesforce. In that way, when users sign-in to Salesforce and open a page that contains an embedded Tableau view, they will not need to re-authenticate with Tableau. The Tableau Visualization Lightning web component only supports SAML as the SSO method. The SAML IdP used for the Tableau authentication must be either the Salesforce IdP or the same IdP used for your Salesforce instance. Configuring the Tableau Server or Tableau Online requires Tableau administrator permissions.
How to install the Tableau Lightning web component?
The Tableau Lightning web component is available in the Salesforce AppExchange.
- Get the component from the Salesforce AppExchange.
- Install the Tableau Viz Lightning Web Component under your Salesforce org.
How to add the Tableau view to the Lightning page?
After you have installed the Tableau component successfully for your Salesforce org, you can then use the component for adding a Tableau view to the Lightning Experience pages.
- In the App Launcher (), find and select a page for embedding the Tableau visualization. (For instance, select Sales or any other App providing a home or record page where you can embed the Tableau Lightning web component).
- Click on the Setup gear () and then select Edit Page.
- Drag the Tableau Visualization component available from the Custom – Managed area of the Lightning Components list and drop to the top of the Page Canvas.
- Select a Tableau view for displaying by providing the URL for the view in the Enter the Viz URL text box.
- For finding the URL for a view on Tableau Server or Tableau Online, click on Share on the toolbar and select the Link from the Share View dialog box. In Tableau Public, copy the URL for the view from the address bar in your browser.
- In Salesforce, use the Tableau Visualization component options to control the size of your view and whether or not you wish to show the Tableau toolbar or any tabs for the view.
You can also control when the Tableau Visualization Lightning web component appears by selecting component visibility filters.
How to filter the view based upon the page context?
The Tableau Lightning component supports two ways for filtering the Tableau visualization. These methods of filtering only work on the Lightning record pages. Filtering is available for neither Home pages nor App pages. You can automatically filter out the Tableau visualization based upon the page it is embedded in for record pages. You can also specify the fields to use for filtering in Tableau and Salesforce to create more sophisticated views.
To filter the view based upon the page it is embedded upon, the Tableau view must have a field corresponding to the record page ID. For instance, if you embed a view for sales on the user’s page showing just the sales for that user, then the Tableau view must include a field that contains the record IDs.
- In the Salesforce org, select a record page where you might want to embed the visualization (for instance, Users or Opportunities).
- Edit the record page and then configure the component by entering the URL of the Tableau view containing the data you want to display. The Tableau visualization must also include a field that holds the record IDs (for instance, user or account IDs).
- Select the Filter visualization based on the page and save your changes to the page.
When the page’s record ID matches the corresponding value in a field in the Tableau view, the Tableau Lightning component applies that filter. For instance, if want to embed a Tableau view on the Account page and filter for a specific account, the Tableau view needs a field named Account ID. The Tableau Visualization Lightning web component uses the default field name when a user connects to Salesforce using Tableau.
Apply filters based upon Tableau and Salesforce fields:
If you wish to own more control over filtering the Tableau visualization on a records page, you can then map a field in Tableau to a specific salesforce field. The Tableau field must be on the view that you are embedding. The Salesforce field needs to be a qualified field on the page where you are embedding the view. When these two fields match the values of these two fields, the Tableau Visualization component will automatically filter the Tableau view.
For applying the advanced filtering, add the Tableau Visualization component to a record page. For instance, if you have a Tableau view containing Salesforce data related to sales information, you can add the view to your opportunity record pages.
- In your Salesforce org, click on the App Launcher (), find and select Sales (or any other App providing a record page where you can embed the Tableau Lightning component). For example, click the Accounts tab. Select an account, for instance, Burlington Textiles, from the All Accounts list.
- Click on the Setup gear () and then select Edit Page.
- Drag the Tableau Visualization component available from the Custom area of the Lightning Components list to the top of the Page Canvas.
- Then Configure the component.
- Enter the URL of the Tableau view containing the sales data you might want to display.
- Provide the name of the Tableau field for filtering. The Tableau field must be the name of a field in the view that you are embedding. For instance, the view may contain a field for the User ID.
- Provide the name of the Salesforce field you want to use in filtering. You can also select the qualified field names for the page from the drop-down list. For instance, on the account record page, you could select the Owner ID.
- When the values from the above two fields match, the Tableau Visualization component will automatically filters the view.
- Save your changes to the page.
I have installed TableauViz component but unable (its grad out only) to drop this Tableau Viz component into my community page.
Is there way I can access it in my lwc component as well?
Kindly help me