Reading Time: 5 minutes

Tableau CRM, formerly known as Einstein Analytics, is an AI visualization tool that enables users to turn insights into customer data. The MuleSoft Salesforce Analytics Connector works directly with Tableau CRM to generate dashboards and reports. Together, MuleSoft and the Salesforce Analytics Connector can unleash the full power of your CRM to unite back-end business units and deliver the integrated and connected experiences customers expect.

Using MuleSoft to connect to Tableau CRM 

The Tableau CRM platform provides two ways to integrate external data: The External Data API and Upload User Interface.

MuleSoft connects to the External Data API by using the Salesforce Analytics Connector. The Mule APIs fetch the data in real-time from these separate data sources and aggregate it into metadata called a dataset.

Image caption: Build powerful dashboards quickly with analytics and real-time data.

Using datasets to connect your data 

The MuleSoft Salesforce Analytics Connector can insert data into Tableau CRM by either connecting to an existing dataset or creating a new dataset. 

Option 1: Connecting to an existing dataset

Connecting to an existing dataset from MuleSoft requires a dataset ID. To fetch the dataset ID from Salesforce, use the following SOQL query:  

SOQL: Select id, EdgemartAlias,EdgemartContainer,

EdgemartLabel,Status,Action,isDeleted,StatusMessage,

LastModifiedDate from InsightsExternalData where EdgemartAlias =“Dataset Name”order by LastModifiedDate desc.

Follow the most recent entry only from this SOQL query.

Option 2: Creating a new dataset 

Creating a new dataset requires a metadata.json file that describes the structure of the external data object. The example metadata.json file for Mule 4 below demonstrates how to define field names and data types. 

{
    "fileFormat":{
       "charsetName":"UTF-8",
       "fieldsEnclosedBy":"\"",
       "fieldsDelimitedBy":",",
       "linesTerminatedBy":"\n",
       "numberOfLinesToIgnore":1
    },
    "objects":[
       {
          "connector":"Salesforce connector",
          "fullyQualifiedName":"New_Dataset",
          "label":"New_Dataset",
          "name":"New_Dataset",
          "fields":[
             {
               "fullyQualifiedName":"ZipCode",
               "name":"ZipCode",
               "type":"Text",
               "label":"ZipCode",
               "isSystemField":null,
               "defaultValue":null,
               "isUniqueId": false,
               "isMultiValue":false,
               "multiValueSeparator":null,
               "precision":null,
               "scale":null,
               "format":null,
               "fiscalMonthOffset":null
            }
               
          ]
       }
    ]
 }

Aggregating and sending data in real-time 

Image caption: Orchestrate real-time integration flows using MuleSoft Salesforce Analytics Connector.

Most Salesforce environments come with a daily upload limit. Therefore, you will want to use a size-based aggregator to orchestrate continuous data input to Tableau to send data in real-time and stay within the data limit.

Ensuring your data is secure

Finally, and most importantly, you’ll need to connect to Salesforce with security credentials. A common way to connect is through a username password connection type with a token and URL configuration. MuleSoft also provides a way to connect via OAuth and JWT.

Image caption: The Salesforce Analytics Connector provides a secure way to connect to Tableau CRM. 
latest report
Learn why we are the Leaders in API management and iPaaS

Conclusion 

With the power of MuleSoft and Salesforce Analytics, we can use Tableau to understand data through the power of custom-generated data visualizations. By following these steps, you can see how to unlock your data using MuleSoft while connecting the data to Tableau. If you would like to learn more about connecting to Tableau CRM, check out the MetaDataSet.xmd.json file or Sample Mule App sample implementations.