Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Create Insights Using Data Cloud

Learning Objectives

In this project, you’ll:

  • Review insight functionality.
  • Create a calculated insight with the builder.
  • View your insights.

Configure Your Environment

This badge is part of a series covering Data Cloud concepts. In this project, you continue building out those concepts by focusing on calculated insights. To do that, first complete the Create a Data Stream in Data Cloud and Quick Start: Create an Identity Resolution Ruleset projects. These projects established the data and processes that are needed for the calculated insights you’re going to create. You use the same Developer Edition org from those projects to complete this one. These Developer Editions are only available for a limited 14-day period—be sure to complete this project before your org expires.

Note

This Developer Edition is designed to work with the challenges in this badge, and may not work for other badges. Always check that you’re using the Trailhead Playground or special Developer Edition org that we recommend. 

Also note that your developer org has a custom permission set that doesn't have access to Data Cloud Setup. It’s intended to be used only for specified Trailhead challenges.

About Data Cloud Insights

After connecting, mapping, and unifying data, Data Cloud users can enhance their data by querying data and building insights that meet business use cases and goals. There are two types: calculated and streaming. Calculated insights allow for complex calculations based on stored data, and streaming insights are created based on real-time data.

In this project, we focus on calculated insights. You can use a calculated insight to define and calculate multidimensional metrics on your entire digital state in Data Cloud. These can be used in several ways.

  • Evaluate performance at the channel level.
  • Encapsulate business logic for common calculations (such as lifetime value).
  • Understand purchasing and browsing behavior.
  • Speed up queries by having calculations pre-aggregated.
  • Enrich CRM data by using insights across Salesforce.
  • Simplify segmentation.
  • Visualize the insights in CRM Analytics to understand data patterns.

Review Terminology

This module uses some terms that are helpful to know about insights.

  • Measure: An aggregated value of attributes, for example a customer’s total amount spent or an average order amount.
  • Dimensions: A qualitative value used to categorize a measure. For example, if you want to see every customer’s total amount spent, the customer ID could be a dimension associated with the measure of the total amount spent.
  • Insight Builder: A tool that allows users to create insights with limited knowledge of SQL.
Note

Want to learn more about insights before you begin? Check out these Trailhead modules.

Verify Unification

To make sure the org you used in the previous project is ready for this challenge, let’s verify that the Identity Resolution rule from the Create an Identity Resolution Ruleset has run. It starts automatically. You know it’s done when data shows up in the Resolution Summary section.

  1. From your Developer Edition org, search for and select Data Cloud in the App Launcher.
  2. From Data Cloud, select the Identity Resolutions tab.
  3. Select the ruleset you created in the previous project.
  4. Verify data is showing.

Ruleset resolution summary showing Total Unified Profiles with 39 of 42 source profiles.

It may take some time, so if you don’t see data, try back later!

Create a Calculated Insight from the Builder

You create a simple calculation in this project—you calculate the number of cases by status for each Unified Individual. Because you only have one org, this is a simple calculation. However, if you have multiple orgs or even different service systems (for example, Zendesk), having a total number of cases across all orgs and systems can be very useful. Before we can create an insight, we need to add more data to Data Cloud.

Add a Data Stream for Case

  1. From Data Cloud, got to the Data Streams tab and click New.
  2. Select Salesforce CRM and click Next.
  3. Select All Objects and search for Case.
  4. Select Case and click Next.

New Data Stream window with All Objects and Case selected.

  1. Leave all data stream fields selected and click Next.
  2. Set the Category to Engagement (1) and set the Event Time Field to Created Date (2).

New Data Stream window with Engagement selected for Category and Created Date selected for Event Time Field.

  1. Keep the name and settings and click Next, then click Deploy.

Map Case to a Data Model Object

Now you have a Data Stream and a corresponding data lake object (DLO). The next step is to map this DLO into one or more data model objects (DMO). Case is a Standard Object included in the Data Cloud Data Model, so map into that standard object. You can, of course, create custom objects or extend standard objects.

  1. On the Case data stream, in the Data Mapping section, click Start.
  2. From the Data Model entities area, click Select Objects.
  3. Search for Case in the Search field.
  4. Click the + icon (1) to add the Case standard object. If the + icon didn’t turn green, click it again.

Map Case objects by clicking on the plus button to automatically map some fields.

  1. Click Done.
    This automatically maps several fields.
  2. There are several more fields to map. Search for these fields and map.
    • Status to Case Status
    • Account Id to Account
    • Contact Id to Individual
  1. Click Save & Close.
Note

If you get an error about being unable to log mapping suggestions, ignore it. This doesn’t impact completion of this badge.

Create the Calculated Insight

  1. On the Calculated Insights tab, click New.
  2. Select Create with Visual Builder and click Next.New Insight window with Create with Visual Builder selected.
  3. Select Create a Calculated Insight and click Next.
  4. Click Get Started.
  5. Search for and then select Unified Individual as your first object in the insight.

Select Input Data window with Individual selected.

  1. Click Next.

Add a Join

  1. In the Visual Insights Builder, click the + next to Unified Individual and select Join.

Calculated Insights Builder with Unified Individual showing Add Node opened with the Join, Aggregate, Case, Filters, Transform, and Arithmetic Expression options.

  1. Select Case and then click Next.
  2. Notice that this automatically adds and joins multiple objects to create a proper join from Unified Individual to Case.
  3. Click Apply (1) to verify your selection.

Visual Insights Builder with Unified Individual joined to Case.

On the same canvas, you can continue building your insight.

Add an Aggregate

Let’s now add the metric we want to calculate, in this case the number of cases.

  1. Click the + on the last Join and select Aggregate.
  2. For Measures, click + (1) and add Count of Case Id (2).
    • Tip: Use the search field to locate Case Id easily.
  1. Click Next (3).

The measures button identified, the metric function count identified, as well as the Next button.

  1. For Metric Name enter Count Case ID. Notice Metric API Name automatically populates with Count_Case_ID.
  2. Click Apply.

Add Dimensions

Now let’s add a dimension, which is how you group the data in an insight.

  1. For Dimensions, click + (under the Measures +) and add Unified Individual Id from the source, Unified Individual.
  2. Click Next.
  3. For Dimension Name enter Unified Individual.
  4. Click Apply.
  5. Follow these steps to add Case Status named Case Status as a dimension.
  6. Click Apply for the Aggregate selections.

Save Your Work

  1. Select Save and Run.
  2. Name your calculated insight Unified Individual Case Counts and click Next.
  3. Leave the schedule to the default, Not Scheduled, and click Enable.
  4. On the Calculated Insights tab, click Publish Now from the dropdown menu.

Click Publish Now to publish the Unified Individual Case Counts insight.

If you don’t see Publish Now, refresh your browser and then select Publish Now from the dropdown found on the Insights home page.

Publish Now selected from the Calculated insight tab.

After you publish your calculated insight, you need to wait for it to be available. After that, Data Cloud automatically manages your published insights. The insight is ready to use when the Status changes from Processing to Active.

Note

Calculated insights may take a few moments to process. If you run into any issues, wait a few minutes and then return to these steps. 

By creating this calculated insight with a join and an aggregate, you have defined complex metrics to enrich your data. Calculated insights can be used to define segment criteria and personalization attributes for activation using metrics, dimensions, and filters. Use these direct and related attributes to build segments, or even clean data before you segment. You can also add them to activations to enable journey decisions and for message personalization in Marketing Cloud Engagement.

Verify Your Work

Now that you have an insight created, check your work and click Verify. For this exercise, we’re just checking that the insight was set up correctly–you don’t have to wait for the insight to process before you verify your work.

View Your Insight

Once your insight has been processed, you can view the results in Data Explorer. Note: Even after the Calculated Insight is active, it still may take a few minutes for Data Explorer to return results. Also be sure you published your insight.

  1. Go to the Data Explorer tab.
  2. Select Calculated Insights from the dropdown.
  3. Then select the corresponding insight, Unified Individual Case Counts.

Data Explorer view of the insight for the unified individual case.

What’s Next?

So far you created data streams, identity rulesets, and a calculated insight to get and build the data you need to get the desired results. But what’s next? Why, segmenting those results, of course! Then you can use them to make decisions and create targeted lists. Keep practicing Data Cloud skills and to get started with segmentation, head to the next project Quick Start: Create a Data Cloud Segment.

Resources

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios