Einstein Analytics Dashboards In Communities

Overview:

The Client had a requirement to show Einstein Analytics dashboards in Communities for the Customers/Partners without logging into Salesforce. The goal is to embed Einstein Analytics in Communities. This will allow external users to view different insights from dashboards and take suitable actions.

Solution / Approach:

We have followed the below steps to integrate Einstein Analytics with Communities:

1. Enablement:

First, to integrate Einstein Analytics with Communities, we need to enable Analytics for Communities. Below are the steps to enable that:

  • Search for Analytics in Quick find of Salesforce.
  • Then Click on Setting in Analytics as shown below:

    Einstein Analytics Dashboards In Communities image1

  • Now check Share Analytics with Communities and save the settings.

    Einstein Analytics Dashboards In Communities image2

2. Dashboard Creation:

Now, we will create the dashboards that we will use in the Community. The data resides in the Salesforce Org, so we have developed the dashboards in Einstein Analytics using the same data. Below are the steps to create the dashboard and share the app in which dashboards have been created:

  • We have created the dataflow to bring the data in Einstein Analytics and created the dataset.
  • We have created the App which contains all the dashboards and datasets.
  • We have developed the dashboards using the same dataset.
  • We have used the bindings to achieve the functionalities of the dashboards.
  • After saving the dashboard, we will get the URL at the top of the browser in the URL bar which contains the ID of the dashboard. This ID will be used in the community to embed the dashboard.
  • Lastly, we have to enable sharing with Communities for the App.

    Einstein Analytics Dashboards In Communities image3

3. Licenses and Permission Sets:

We need to purchase two types of Licenses to able to view the Dashboards in Community and i.e. Customer Community Plus License and Analytics for communities Permission Set License (It is "Einstein Analytics For Community Logins" (for Partner Community Login, Customer Community Plus Login, Customer Community Login user licenses) and "Einstein Analytics For Community Members" (for Customer Community Plus, Partner Community user licenses.)). Below are the steps to assign License and Permission sets to Community User after purchasing them:

  • After purchasing the above license and permission sets, we need to assign those licenses and permission sets to the user who is going to access the dashboards on Community.
  • Assign the Customer Community Plus license in the User License column of User detail record.
  • After getting the permission set license, create the Permission set that includes the System Permission view analytics on community pages in the Salesforce.

    Einstein Analytics Dashboards In Communities image4

  • Assign this permission set to the user from the related list “Permission Set License Assignment”.

4. Community Creation:

The next step is to create the Community. Below are the steps to create the community:

  • Search for the Communities in Quick Find box.
  • Click on All Communities.
  • Then Click the New Community. Here you will need to select the template for your community.
    Note: Be aware that not every template type is compatible with Einstein Analytics Dashboards.
  • Now after clicking on Get started, enter Name and URL for your community
    Note: You won’t be able to edit the URL of your Community after you create it.
  • The Url you have entered above is the Url through which Users will access the Community.

5. Add Einstein Analytics Dashboards to Community:

There are many ways to add the Einstein Analytics Dashboards to Community like through Lightning Component, Visualforce Page, or directly from Community Builder. We have added the EA dashboards in Community through Lightning Component and Visualforce pages to achieve the Client’s requirement. Below is the description of some methods through which we can achieve this functionality:

  • 1. Through Community Builder
    1. Go to Community Builder.
    2. Now click on the lightning bolt icon.
    3. Search for Wave in Quick find box.
    4. Now drag the Wave dashboard Component onto your page layout.
    5. To save changes and make the dashboard visible to your Community User, click on the Publish button.
  • 2. Through Lightning Component:
    1. We have created a lightning component, in this we have written the code to create the tabs.
    2. Below is the code to show the Dashboard through the Lightning component.

      coding

    3. Now add this page to the Community Builder and add the dashboard Id there.
    4. Now publish the changes to make the dashboard visible to your community user.
    5. Below is the screenshot of Community in which there are tabs and by clicking on the tabs the user will be able to see the respective dashboards.

      codline

  • 3. Through Visualforce Page:
    1. We have created a Visualforce Page, in this we have written the code to create the tabs.
    2. Below is the code to show the Dashboard through the Lightning component.

      Einstein Analytics Dashboards In Communities image5

    3. We need to give access to the Visualforce page to show in the community.
    4. Now add this page to the Community Builder and add the dashboard Id there.
    5. Now publish the changes to make the dashboard visible to your community user.

References:

  1. https://help.salesforce.com/articleView?id=bi_app_communities.htm
  2. https://astreait.com/Salesforce_Einstein_Analytics/
  3. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_wave_dashboard.htm
  4. https://developer.salesforce.com/docs/component-library/bundle/wave:waveDashboard/specification