Appearance
Exercise 4 - Go Deeper with Calculated Insights
The goal of this exercise is to utilize the integrated and unified individuals to produce customer insights with Calculated Insights (CIs) to bring further value to Coral Cloud’s customer data and power AI Predictions.
Step 1: Create a Calculated Insight from the Unified Individual
Here, we will use Calculated Insights (CIs) to calculate the Lifetime Value (LTV) of a customer. For Coral Cloud, this means aggregating reservation data of over 100M records. This was nearly impossible and a very manual process. With LTV, they can provide their customers with an appropriate level of experience.
Click New. Here, you see the variety of ways to create Calculated Insights
Select Create from a Data Kit and click Next.
Below the Installed Packages heading, select Lifetime Value and click Next to enter the Visual Insights Builder.
Click Join, next to Room Charges.
Joins are a SQL construct for combining data from multiple tables/objects. Basically, it takes two records (one from each table) and joins them into a single record. There are multiple types of Joins. In our case, we want Inner Joins to combine or group Room Charges by the Unified Individual (a guest in Coral Cloud’s case).
Data Cloud has automatically created tables that join Unified Individual with other objects. One table was created, the Unified Individual Link, to store a link between the resolved Unified Individual and the Individual. This is important since the Unified Individual holds the matching Guests from S3 and Service Cloud as the same person. This means we can aggregate for a unique individual or guest, not individuals from each source.
After reviewing the fields on the Join node, go ahead and click Apply.
Next, click on the Aggregate icon on the canvas. Here we can see that a measure has been added named LTV, which is the sum of all related Room Charges for the Unified Individual. A dimension has also been added named UnifiedGuest.
From the Aggregate screen, click Apply and then click Save and Run.
Name the Calculated Insight Lifetime Value, then click Next.
Set the Schedule to Not Scheduled and click Enable.
Now, we need to publish the Calculated Insight. From the Lifetime Value screen, click Publish Now. You may have to click the drop down arrow or refresh your screen if Publish Now is not visible.
From the CI Details, click the Expression tab to see the generated SQL.
NOTE: This can take up to 15 minutes to run. Let’s take a quick break.
- From the Calculated Insight tab, watch the Last Run Status change from Pending to Processing to Success. There’s a small Refresh button in the upper right to refresh the List View.
- You can view the results using the Data Explorer. Specify the Object as Calculated Insights and select your CI.
Step 2: Using Unified Individuals in Salesforce Apps
Finally, we can see how to utilize our unified customer profile for our Salesforce users.
Use the App Switcher in the upper left to switch to (or open a new tab for) the Coral Cloud App.
From Sales, click the Contacts tab and search for Rodriguez.
Click the Sofia Rodriguez link under Name to see the Contact details.
Here, you can see the details from the Unified Individual as a Contact. Let’s edit this page to add Data Cloud Profile Engagement and our recently created LTV Calculated Insight from the Unified Profile.
Click the Gear at the top right and select Edit Page.
In the left-side search bar under Components type Data Cloud.
Drag Data Cloud Profile Engagements to the right under the Contact Card in the left column of the Contact Page.
In the right-hand panel, make the following changes:
Under Match On, select Contact ID
Under Data Space, select default
Under Unified Individual DMO, select Unified Individual
Under Unified Individual Link, select Unified Link Individual
Click Select… under Select Engagement DMOs
Move all Available Engagement DMOs to Selected
Click OK
If your screen looks like the picture below, click Save at the top right:
Next, let’s add that Lifetime Value (LTV) Calculated Insight we created earlier. In the left-side panel drag Data Cloud Profile Insights over to the right and place it between the Contact Card and the Data Cloud Engagements (shown as Activity) component we just created.
On the right-side, under Data Cloud Profile Insights, make the following changes:
Under Match On select Contact ID
Under Data Space select default
Under Unified Individual DMO select Unified Individual
Under Unified Individual Link select Unified Link Individual
Under Calculated Insight select Lifetime Value
Under Measure select ltv__c
Check the Format as Currency box
Once your screen looks like the picture below, click Save.
Exit the Lightning App Builder using the Back Arrow in the upper left to return to the Contact.
No engagement to display? Let’s fix that. Click the filter button at the top right of the Activity component. Select Last 90 days as the Date Range then click Apply
Note that this enriched unified profile data can be used across Salesforce clouds, including Leads, Cases, and Accounts, while still being controlled by roles and permission sets.
This completes Exercise 4.