RESOURCES / Articles

SOQL connector to pull data from Salesforce database into Datorama

May 16, 2023

Ever wanted to connect marketing data with information from the Salesforce database to get a holistic performance view? The SOQL connector can generate hidden insights which will be helpful in growing your business at a whole new level. At first, such a connection feels unattainable, but below is a detailed explanation of how to achieve it.

Marketing Cloud Intelligence (previously known as Datorama) by Salesforce showcases its supremacy when it comes to data connectors. For anyone new to Datorama, it is a marketing intelligence tool, focused to serve marketers. It handles marketing data by using pre-created pipelines, while also collecting and integrating non-marketing data to give a holistic view of marketing performance by using various dimensions and slicing techniques. These data connections can be formed using any of the 120+ API (Application Programming Interfaces) connectors and/or 30+ technical vendors to fetch and update data at regular time intervals. Most of the marketing vendors are connected via API and their corresponding future data fetch is automated. Datorama enables users to connect to the Salesforce database (Standard & Custom objects) with the help of the Salesforce Object Query Language – SOQL (Pronounced Sockle) connector. Some common use cases relate to the CRM, Buy Data and Product Data Stream Types.

The user gets access to the workbench using their Salesforce credential and can formulate SOQL queries. Below are a few examples of the queries that can be formed to fetch data into the Marketing Cloud Intelligence workspace:

Query using one salesforce object –

Query

In the above query, fields from Order Object are retrieved, fields that end with prefix “__c” are custom fields.).

Relational Queries are used to access multiple objects at once to retrieve merged data from two or more objects. This a complex yet remarkably effective functionality to access Parent and Child objects present in the Salesforce ecosystem. For example, a query to retrieve fields from standard object Contact will be:

Query

but we would like to retrieve fields from Account (Parent) Object as well. In such cases relational queries will come to the rescue. Below are the examples:

1) Query Using parent & child objects, referencing parent fields by using relationship name alongside fields from the child object while querying the child object.

Query

This query will retrieve all mentioned fields from parent and child objects. This relationship referencing can be up to five layers in the relationship tree such as parent -> grandparent -> grand grandparent and so on.

2) Query using parent & child objects, in this case, its other way around. Parent is queried and fields from child are retrieved using the relationship.

Query

This query will retrieve all mentioned fields from parent and child objects. This can go all the way down the relationship tree.

Below are a few of the many advantages of using SOQL connector:

  • We can use parent-child query or subquery to combine various Salesforce objects in our SOQL itself and fetch only the required data, which reduces the file size.
  • Provides flexibility to view any object of our choice, be it a standard or custom object.
  • Data refresh is easy. A query can be structured to fetch the last N days (any no. of days as per the user’s preference) of data on every fetch, reducing processing time.
  • New field names can be added to the query at any point in time. Thus, bringing in new fields or custom fields is easier.

Get Expert Datorama Salesforce Implementation Support

Decision Foundry is a tier one Datorama Implementation Partner. With our years of expertise and data centric approach we have one goal – to provide our clients with accurate and insightful dashboards with a top-notch UI/UX experience.

Partner with Decision Foundry to upscale and revamp dashboards, reporting and data automation. Contact us for a discovery call.

CATEGORIES

Datorama