Bring Data Cloud Closer to CRM


One of the biggest focus areas for Salesforce in 2023 was Data Cloud – it was all over Dreamforce and World Tours. One of the things I think Salesforce users are thinking about is how does Data Cloud relate to core Salesforce? So I wanted to use this blog to recap a demo Skip Sauls and I prepared for Dreamforce 2023 that aimed to answer this question with a few new features that are available to Salesforce and Data Cloud.

What to Expect

This blog will not be a step-by-step walk-through of all the setup options of Data Cloud. Instead, it will provide an overview of the necessary steps to start leveraging the new CRM enrichment features. Thus we will first talk about the transaction and Salesforce CRM data we ingest and how we need to process the data before we can use it in Salesforce CRM. The setup will focus on how you can:

  1. show the latest transactions on the contact page with Related Lists,
  2. calculate the lifetime value (LTV) for a contact and populate that field on the contact record and,
  3. identify VIP customers, and notify the contact owner when a contact reaches this status with a flow.

Note: For more advanced use cases leveraging copy fields and related lists check out this blog.

Setting Data Cloud Up

As mentioned, I won’t go through all the detailed steps to get up and running with Data Cloud, there are a few pretty good trails that walk you through that – start here if you just got a new org provisioned. However, I want to highlight the basic setup we did to leverage the Data Cloud CRM Enrichment features – all within Salesforce in a way that is familiar with core.

Note: If you are new to Data Cloud you may benefit from reading my blog Demystifying Data Cloud Concepts, which aims to explain key terminology and features.

Data Cloud Setup

While I’m not going into a step-by-step walkthrough of how to set up a newly provisioned Data Cloud org, I do want to mention that there are some basic admin steps that need to be completed before you can access and use Data Cloud. Below are the steps necessary to complete before you and your users are ready to get more out of your data:

  1. Assign Data Cloud Admin permission set to the admin user
  2. Data Cloud Admin enables Data Cloud from the Data Cloud Setup
  3. Data Cloud Admin creates connections to external sources and Salesforce CRM from the Data Cloud setup
    • For Salesforce CRM make sure the Standard Data Bundles are installed or updated as this will make the Data Model mapping easier
  4. Create custom permission sets to be used for Data Cloud users
  5. Assign permission sets to Data Cloud users.

Creating Data Streams & Data Lake Object

From the Data Stream tab, you can create new Data Streams from Salesforce CRM and external sources. For demo purposes, we have set up a few Data Streams that come with standard data bundles for Sales and Service when selecting Salesforce CRM as a source.

The great thing about the bundles is that everything comes mapped, so there is minimal setup after the creation. For our demo, it’s just important to have the contacts ingested.

We also have transaction data ingested from Amazon S3 – as this is a demo we just generated something from mockaroo, meaning all screenshots going forward will have fake data. However, we did make sure to have a few fields we can use in our data transformation. Below you can see a screenshot from the Data Lake Object (DLO) that shows this data is categorized as engagement data and an overview of all the fields we are ingesting.

Map to the Data Model Object

Now, that we have the transactions ingested, we need to make sure we map the fields to the data model. In the below model you can see how we have 1) created a custom data model object (DMO) for transactions and 2) mapped all the fields from the DLO to the new DMO. This can all be done from the DLO page via the mapping section to the right.

Note: The DMO is especially helpful if we have transactions from multiple sources, that way all the data is merged via the DMO. Furthermore, the DMO is joined by the id to the individual, which allows us to query multiple objects seamlessly.

In order to link the transactions back to a contact and individual, we’ve made sure to create the relationship from the new Transactions DMO as seen below.

As mentioned we don’t have to do anything with mapping the Salesforce CRM data as long as we stick with the standard fields. Thus we didn’t do any additional setup, however, if you are bringing custom objects and fields over, you would need to go through the mapping process and potentially add relationships as per your data model.

Setting up Identity Resolution & Unified Individual

In order for the CRM enrichment features to work we do need to make sure to have a “unified individual”. This is created by setting up identity resolution rules and from fragmented data creating a single truth of your profile data. Once the identity resolution rule is active a new DMO “unified individual” is created.

We can set up and manage identity resolution rules from the Identity Resolution tab. As I am working in a demo org, I don’t have fragmented and/or duplicate data, however, in a production org it’s very likely that your profile data isn’t as clean, so these rules will really help you.

In my example, I’ve set up a very simple rule with fuzzy name and normalized email. You can of course make your rules loose or tight which will affect how many profiles are matched. Since my data is pretty simple and clean you’ll notice a 0% consolidation rate.

Creating Aggregated Metrics

For our use case, we want to calculate the LTV of a customer to add to the Salesforce Contact record page. We also need to create a “VIP” boolean that we can leverage in the flow. In Data Cloud we can use Calculated Insight (CI) as well as Data Transforms to aggregate data. Data Transformations are more targeted toward data cleansing whereas CI is about aggregating data to be used in segments, analytics etc.

I do have a background in CRM Analytics, so naturally, I opted for Data Transforms, but in all honesty, both will work with the CRM enrichment feature as long as they relate back to the individual. For CIs that means you need to make sure that you include a join to the individual DMO.

As I opted for the Batch Data Transform I do need to make sure I’ve created a DLO and mapped it to a DMO as well as joined it to the individual. I need this to have a destination for the aggregation output and of course to leverage it later.

As mentioned, we are aggregating the LTV for each customer ID and then calculating if the customer is “VIP” based on the LTV from the Transaction DLO. We are then joining the data with the Contact DLO and writing it to the new DLO we called LTV.

Note: Before creating the data transform I’ve already created the new DLO, mapped it to a new DMO, and joined it to the unified individual and account contact.

CRM Enrichment with Data Cloud

With the basic setup of Data Cloud completed and our data prepped, we are now ready to enhance our contact record and kickstart a Salesforce flow with our “VIP” tag.

Note: Check out the CRM Enrichment documentation from Salesforce Help and review the section on considerations before getting started.

Data Cloud Related Lists

To add a Data Cloud Related List to the contact page is pretty simple – it follows the setup we know from Salesforce CRM. From the Salesforce Setup navigate to the “Object Manager” and the “Contact” object. To the left click “Data Cloud Related List” and “New” in the top right corner.

You will now have the option to create a Related List or copy some fields – we will first set up the Related List and in the next section we will copy fields.

After selecting “Related List” and clicking “Start”, you need to agree to the parent permission by checking the checkbox and hit “Next”.

Now you need to select the DMO you want to show. If you have multiple Data Spaces you would need to pick the Data Space that has the DMO you want to show. Since we only have the default Data Space we can select the DMO right away – and here we want the Transactions DMO.

After you click “Next” you need to provide a name for the Related List, which will be used when you view the Related List on the contact record page.

Finally, you need to define what page layout(s) need to have the new transaction Related List. You also have the option to add it for those users who have customized the record page.

Once you have saved the Related List, you can head to the Page Layout and change the order of the Related Lists and what fields to show – just like the standard Related Lists you know from Salesforce CRM.

Copy Fields from Data Cloud

As promised let’s now look at how to copy fields from Data Cloud. First, we need to create the field(s) on the contact record that we want to populate with Data Cloud data. In a previous step, we calculated the LTV value of a contact in a data transform and wrote the output to a DLO. Thus we need to make sure we have a field on the contact object that represents the LTV – you can see the field we created below.

After you create the field you need to make sure the integration user has permission to read and edit the object and field(s). The way to do this is to head to “Permission Sets” in the Salesforce setup menu and select the “Customer 360 Data Platform Integration” permission set. In the Object Settings select “Contact” and make sure that on an Object Permission level you grant access to:

  • Read
  • Edit
  • View All.

Next, make sure that there are read and edit access to the field(s) you want to populate.

With the field created, we are going to head back to the “Data Cloud Copy Field” menu item on the Contact object and hit “New” and select “Copy Fields”.

After hitting “Start” you can pick the Data Cloud object you want to use as the source for the field we will be copying – in this case the LTV DMO. It’s worth remembering that the object has to be related to the Unified Individual, thus the LTV DMO is joined with the Individual object and the Unified Individual through the unification process.

In the next screen, you get to pick the field(s) you want to copy to the contact record. As mentioned previously, we are only going to copy the LTV value/number from the DMO to the contact record, thus that’s the only field that is selected.

The final step before saving is to give your Data Cloud Copy Field Enrichment a name.

Once saved, you land on the field mapping screen, as we need to define what field on the record page we want to populate. You need to map each field that was selected in the creation flow individually, however, in this example, there is only one field, which is mapped to the custom field we created.

To map the field, just click the “Click to Edit” link to the right of the field.

Then select the LTV custom field. You’ll notice that the field type must match that of the DMO field.

Finally, we just have to hit “Save & Activate” in the top right corner to initiate the sync of fields. To follow this process you can check the “Bulk Data Load Jobs” in the Salesforce Setup.

One thing to note with the copy field enrichment feature is that while the creation and modification are happening on the contact pages in the Object Manager, the update is actually being triggered by a Data Cloud Data Action and Data Action Target. Thus, this is what controls the event rules and conditions.

Note: The CRM Enrichment features (copy field and related lists) are in this current release only available for Leads and Contacts. However, as Person Account, in reality, is a combination of an Account and a Contact record, you can also leverage the copy field feature through the Contact object.

Live Data Query from Data Cloud with CRM Analytics

I’ve previously written a blog on how to query data directly from Data Cloud using CRM Analytics. What I didn’t cover in that blog is that you can of course embed your dashboard on a record page and have it filter based on the viewed record. Below you’ll see how I’ve embedded a dashboard that queries the Transactions DMO on the contact record page.

Filtering the DMO from the analytics component is not currently possible, however there is a workaround to leveraging this feature.

In my dashboard, I’ve created a hidden query using a Contact dataset. The query only groups by contact id.

I’ve then used the “Connected Data Sources” functionality to make the queries from the Transaction DMO facet to the selection of the hidden query using the Contact dataset.

Now you can use the Contact Id from the Contact dataset in your embedded dashboard filter to just show transactions relevant to the contact record you are viewing.

In addition to CRM Analytics, you can also use Salesforce Lightning Reports and Dashboards to query your data. Ankita Dutta already did a great blog outlining how you can use Reports and Dashboards in Data Cloud in her latest blog “Introducing Reports & Dashboards for Data Cloud“.

Use Data Cloud with Flows

The final thing I want to highlight you can do with Data Cloud and Salesforce platform features is you can use Data Cloud in Flows. Earlier Gina Nichols wrote a blog showing how you can use Flow to schedule a Calculated Insight, but there are unlimited use cases for Flows for Data Cloud.

Earlier we introduced the concept of “VIP Customers” and we created a boolean based of a calculation. We can use this boolean to trigger actions, such as a custom notification to the contact owner, in Salesforce. While I won’t go into every single decision of the notification flow, I will highlight a few places where I interact with Data Cloud data.

When you create your flow you must choose how to trigger the flow – a newer option is the “Data Cloud-Triggered Flow”, which allows you to trigger based on data from Data Cloud.

You can pick the DMO or CI you want to use to trigger and set the conditions.

You can then use any flow element with this data from Data Cloud. Since the use case is to create a notification if they are a VIP customer, we need to make a decision.

Throughout the flow, we can leverage the data from the selected DMO. I’ve completed my flow by getting the custom notification id and using my DMO to assign the recipients as that DMO has the Contact Owner Id. I then created my notification and again used the Contact Id from the DMO to assign a target of the notification.

Let’s See the Demo

Below you’ll find a walkthrough of the setup we have done in this blog. Feel free to select between the chapters or watch the video end to end.

How useful was this post?

Click on a star to rate useful the post is!

Written by

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.