0% found this document useful (0 votes)
70 views82 pages

Session 5 - Insights

Uploaded by

Joe Nishanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views82 pages

Session 5 - Insights

Uploaded by

Joe Nishanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 82

Data Cloud

Academy
Get Certified

Webinar starting soon


Please stand by ...
Data Cloud
Academy
Get Certified

Session 5 of 8
Insights
First, some logistics
Questions, answers and videos

How do you ask a question?


• Please Post your question only in the Q&A section on
your Zoom Window.
How do you turn on Closed Captions?
• At the bottom of your screen, click on “closed
captions” John Smith
Will this be available as a recording after today?
• Yes, a recording of this event will be available on
demand

Bookmark -> Program Guide

sfdc.co/DCAcademyGuide
Forward Looking Statements
This presentation contains forward-looking statements about, among other things, trend analyses and statements regarding future events, future financial performance, anticipated growth, industry prospects,
environmental, social and governance goals, our strategies, expectation or plans regarding our investments, including strategic investments or acquisitions, our beliefs or expectations regarding our competition, our
intentions regarding use of future earnings or dividends, and the expected timing of product releases and enhancements. The achievement or success of the matters covered by such forward-looking statements
involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, Salesforce’s results could differ materially from the results expressed or implied by
these forward-looking statements. The risks and uncertainties referred to above include those factors discussed in Salesforce’s reports filed from time to time with the Securities and Exchange Commission, including,
but not limited to: our ability to maintain security levels and service performance that meet the expectations of our customers, and the resources and costs required to avoid unanticipated downtime and prevent,
detect and remediate performance degradation and security breaches; the expenses associated with our data centers and third-party infrastructure providers; our ability to secure additional data center capacity; our
reliance on third-party hardware, software and platform providers; uncertainties regarding AI technologies and its integration into our product offerings; the effect of evolving domestic and foreign government
regulations, including those related to the provision of services on the Internet, those related to accessing the Internet, and those addressing data privacy, cross-border data transfers and import and export controls;
current and potential litigation involving us or our industry, including litigation involving acquired entities, and the resolution or settlement thereof; regulatory developments and regulatory investigations involving us or
affecting our industry; our ability to successfully introduce new services and product features, including any efforts to expand our services; the success of our strategy of acquiring or making investments in
complementary businesses, joint ventures, services, technologies and intellectual property rights; our ability to complete, on a timely basis or at all, announced transactions; our ability to realize the benefits from
acquisitions, strategic partnerships, joint ventures and investments, and successfully integrate acquired businesses and technologies; our ability to compete in the markets in which we participate; the success of our
business strategy and our plan to build our business, including our strategy to be a leading provider of enterprise cloud computing applications and platforms; our ability to execute our business plans; our ability to
continue to grow unearned revenue and remaining performance obligation; the pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; our ability to limit
customer attrition and costs related to those efforts; the success of our international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth in our customer base and
operations, including as a result of acquisitions; our ability to preserve our workplace culture, including as a result of our decisions regarding our current and future office environments or remote work policies; our
dependency on the development and maintenance of the infrastructure of the Internet; our real estate and office facilities strategy and related costs and uncertainties; fluctuations in, and our ability to predict, our
operating results and cash flows; the variability in our results arising from the accounting for term license revenue products; the performance and fair value of our investments in complementary businesses through our
strategic investment portfolio; the impact of future gains or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies within
our strategic investment portfolio; our ability to protect our intellectual property rights; our ability to maintain and enhance our brands; the impact of foreign currency exchange rate and interest rate fluctuations on our
results; the valuation of our deferred tax assets and the release of related valuation allowances; the potential availability of additional tax assets in the future; the impact of new accounting pronouncements and tax
laws; uncertainties affecting our ability to estimate our tax rate; uncertainties regarding our tax obligations in connection with potential jurisdictional transfers of intellectual property, including the tax rate, the timing of
transfers and the value of such transferred intellectual property; uncertainties regarding the effect of general economic, business and market conditions, including inflationary pressures, general economic downturn or
recession, market volatility, increasing interest rates, changes in monetary policy and the prospect of a shutdown of the U.S. federal government; the potential impact of financial institution instability; the impact of
geopolitical events, including the ongoing armed conflict in Europe; uncertainties regarding the impact of expensing stock options and other equity awards; the sufficiency of our capital resources; our ability to execute
our share repurchase program; our ability to comply with our debt covenants and lease obligations; the impact of climate change, natural disasters and actual or threatened public health emergencies; expected
benefits of and timing of completion of the restructuring plan and the expected costs and charges of the restructuring plan, including, among other things, the risk that the restructuring costs and charges may be
greater than we anticipate, our restructuring efforts may adversely affect our internal programs and ability to recruit and retain skilled and motivated personnel, our restructuring efforts may be distracting to employees
and management, our restructuring efforts may negatively impact our business operations and reputation with or ability to serve customers, and our restructuring efforts may not generate their intended benefits to the
extent or as quickly as anticipated; and our ability to achieve our aspirations, goals and projections related to our environmental, social and governance initiatives, including our ability to comply with emerging
corporate responsibility regulations.

September 8, 2023
Agenda

Process Overview

Types and applications of Insights

Behind the scenes and considerations

Study Tips & Next Steps

Q&A
Your Salesforce Team

Deepthi Kamath Durgesh Dhoot Gaj Sisodia Zafar Mohammad


Partner Practice Partner Practice Partner Product Partner Practice
Development Development Success Development
Salesforce Certified Data Cloud Consultant
Allotted Passing
Total Question
Time Score
Data Cloud
Consultant
60 105 min 62 %

Exam Outline

Solution Overview | 18%

Activation | 18% Setup & Administration | 12%

Segmentation and Insights | 18% Data Ingestion & Modeling | 20%

Identity Resolution | 14%

Salesforce recommends a combination of hands-on experience, training courses in Partner Learning


Camp, and self-study in the areas listed in the Exam Outline section of this exam guide
Study Tips - Identity Resolution - 14%
Allotted Passing
Total Question
Time Score
Data Cloud
Consultant
60 105 min 62 %

Exam Details

Things to pay attention to - study these concepts!

● Basic Principles & purpose of Identity Resolution


● Identify default match rules & when custom match rules might be necessary
● Party Identification Matching & how it is used
● Reconciliation and how its rule sets are applied
● Use cases for multiple identity rulesets & its expected outcomes
● Results of Identity Resolution & key result data (e.g. Consolidation Rate)
● Optimization methods for identity resolution & troubleshooting technique
● Interpreting Results
● Order of Operations

Salesforce recommends a combination of hands-on experience, training courses in Partner Learning


Camp, and self-study in the areas listed in the Exam Outline section of this exam guide
The Big Picture: Implementation Themes
Related to the components of Data Cloud

Provisioning Insights & Analytics


Provision and set up Data Cloud instance, Derive insights from your mapped data,
users and permissions, configure explore and visualize it in the analytical and

Data Consumption
integrations to source/target systems, etc. business intelligence tools.

Data Preparation
Data Ingestion Segmentation
Set up data streams bringing data into Data Turn mapped data into useful audiences or
Cloud from various supported sources and segments, to understand, target or analyze
applying necessary transformations customers at the unified level.

Data Mapping (Harmonization) Activation


Map ingested data into the Customer 360 Materialize created segments and publish
data model, making it available for to relevant activation/engagement
unification, segmentation and activation platforms. Trigger relevant business
processes based on data points identified
within Data Cloud. Consume and expose
Identity Resolution (Unification) data in relevant user experiences within
Configure rules for individual matching other systems .
across sources of data, establish preference
for unified attributes reconciliation rules
Let’s See Insights in Action!
Let’s talk about Data
Let’s Talk About Data...
Contextualizing calculated insights
Purchases - In Store Purchases - Online

Transaction ID Client ID Transaction Date Amount Transaction ID Client ID Transaction Date Amount

123 1 6/2/21 $250 E416 4 6/2/21 $350

456 2 6/7/21 $1,000 E519 2 6/7/21 $135

519 1 6/8/21 $1,500 E647 1 6/8/21 $599

789 3 6/8/21 $180 E905 5 6/8/21 $190

If an individual purchase is greater than $500, flag it as high value


vs.
If total lifetime purchases are greater than $2,000, flag customer as high value
Let’s Talk About Data...
Contextualizing calculated insights
Purchases - In Store Purchases - Online

Transaction ID Client ID Transaction Date Amount Transaction ID Client ID Transaction Date Amount

123 1 6/2/21 $250 E416 4 6/2/21 $350

456 2 6/7/21 $1,000 E519 2 6/7/21 $135

519 1 6/8/21 $1,500 E647 1 6/8/21 $599

789 3 6/8/21 $180 E905 5 6/8/21 $190

If an individual purchase is greater than $500, flag it as high value


vs.
If total lifetime purchases are greater than $2,000, flag customer as high value
Formula Fields
Works well on a single record w/in a single object

If an individual purchase is greater than $500, flag it as high value


vs.
If total lifetime purchases are greater than $2,000, flag customer as high value
Let’s Talk About Data...
Contextualizing calculated insights
Purchases - In Store Purchases - Online

Transaction ID Client ID Transaction Date Amount Transaction ID Client ID Transaction Date Amount

123 1 6/2/21 $250 E416 4 6/2/21 $350

456 2 6/7/21 $1,000 E519 2 6/7/21 $135

519 1 6/8/21 $1,500 E647 1 6/8/21 $599

789 3 6/8/21 $180 E905 5 6/8/21 $190

If an individual purchase is greater than $500, flag it as high value


vs.
If total lifetime purchases are greater than $2,000, flag customer as high value
Calculated Insights
Works well across multiple records *and* objects

If an individual purchase is greater than $500, flag it as high value


vs.
If total lifetime purchases are greater than $2,000, flag customer as high value
Various Types of Insights
Compare and contrast
Some Key Terms

Attributes Attributes are fields or information found in a data stream.


For example, an attribute can be a person’s first name or customer ID.

Measures Measures are numerical data fields that represent quantitative values
It contain aggregated values of attributes,
like the total amount spent or average order amount.

Dimensions Dimensions contain qualitative values that can be used to categorize a


measure. For eg., 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. Other Examples are like Products, Stores, etc

Foreign Key A foreign key is a column in a relational database that provides a link between
data sources—for example, a customer ID number.

Primary Key A user-selected unique identifier of a record—for example, a customer email


address or a product SKU.
Calculated Insights
Extract Insights About Your Customers

Build Multidimensional Metrics


Define & calculate multi-dimensional metrics on
entire digital state stored in Salesforce Data Cloud

Supercharge Segmentation
Use calculated insights in Segment Builder to gain
deeper understanding of your customers

Activate for Personalization


Personalize using calculated insights
SQL support to
Available Everywhere Clicks-not-Code
define complex
Visual Builder
- API connected to any touchpoint CIs
- Insights on Tableau and any other platform with
JDBC connection.
Calculated Insights
Overview - So, what do you need to know?

What they are: Where they’re accessed:


feature for defining and calculating in the Segmentation UI,
multi-dimensional metrics as a personalization attribute in Activations,
via API, integrations with BI/ML tools
How they’re created:
(ANSI) SQL or Declaratively via Builder Why they’re useful:
Aggregations,
supports more complex use cases, promotes
reusability and consistency, accessible by
external systems
Calculated Insights in Data Cloud Data flow
Simple Example

AWS S3 /
Transform

MCP SFMC CRM


Ingest &

Google Cloud Storage

Data Source Objects


(1...n)
Insights & Identity
Resolution
Modelling,

Data Model Objects Individual


(Profile/Engagement/Other) (Data Model Object)

Calculated Unified Individual


Insights (Data Model Object)
Segmentation
& Activation

Segment

Activation Target
(SFMC, MCP, S3)
Streaming Insights
Calculate metrics on streaming data to trigger real time experiences

Generate time series analytics on continuously


moving (streaming) data

Find useful patterns and share the insights with


other apps with Data Actions

Author using the Insights builder as well as SQL

Available with JDBC API as well as visualizations


tools such as Tableau SQL support to
Clicks-not-Code
define complex
Visual Builder
CIs
Streaming Insights & Data Actions
Overview - So, what do you need to know?

What they are: Where they’re accessed:


Variant of CIs for near real-time data streams, Data Actions, JDBC Driver
WebSDK, MobileSDK, Interaction Studio
Why they’re useful:
How they’re created: Real-time analytics, anomaly detection,
(ANSI) SQL or Declaratively via Builder process orchestration, alerting
SF Platform
Event

Webhook
Identity Enrichment
Real Time Rules Data
Resolution / Insights (Optional up to
Sources (Optional)
10 attributes) Actions
Mapping
Mulesoft

Send Email
Journey
Insights Use Cases
Practical Examples

Calculated Insights Streaming Insights

● Lifetime Value Calculation ● Fin Serv: Detect fraudulent transactions


● Recency, Frequency, Monetary Value and send the account information to
● Spend by Customer and Product fraud department
● Engagement Buckets & Scoring ● Service & Support: Automatically log a
● Ranking by Category Item Purchase case if customer visits multiple
Count troubleshooting pages
● Unified Health Score (Health Cloud) ● Location Based Engagement: Initiate a
workflow if user enters a geofence
● Log Scanning: Filter streaming device log
data (e.g. vending machine) and send to
other systems
Additional Use of Calculated Insights
Troubleshooting Identity Resolution

Click here to read more


How Casey’s Uses Insights
Pizza retailer in America
Calculated Affinity Scores

Guest behavioral data is ingested into Data Cloud


and calculated to create personalized rankings for every guest.

Guest Purchase Ranked


Transactions Frequency Affinities

1.
2.
3.
4.
5.
Personalized Messaging

Rankings are checked against available content


to create an unlimited number of messaging variations.

Ranked Available Personalized


Affinities Content Messaging

1.
2.
3.
4.
5.
Casey’s is Reaping The Rewards

Anne
Affinity 1: Pizza Slice
Affinity 2: Dr Pepper
Affinity 3: Fountain Drink
Affinity 4: Juice
Affinity 5: Monster

Personalized Messaging
Data Cloud Insight
(Powered by MC Engagement)
Customer lifecycle metrics with Calculated Insights
Understand customers deeply with metrics at every stage of customer journey

Advocate
Attract Referral Rate, Social Mentions, Social
Views, Click Through Rates, OptIns, Share Rate, Active engagement rate,
Sentiment Score, Paid Media Impact Revenue Velocity

Nurture Loyalist
Time on Site, Conversion Rate Upsell Rate, Cross Sell Rate, Repeat
Purchase Rate, Loyalty scores

Convert Adopter
LTV, Churn Rate, NPS, Social
Online and Offline Sales, Click to
Engagement Rate, Customer Rank
Purchase Rate, Acquisition Cost

Engage
Advanced RFM, Repeat Purchase Rate,
Affinity Scores , Health Risk Scores
Behind the scenes
Technicalities and implementation considerations
Calculated Insights
Behind the scenes
Anatomy of a Calculated Insight
Quantitative Values
SELECT <Attributes>, <Aggregation[Measures]> e.g. LTV__c
Where you find CI in Attribute in segment
Segmentation UI
FROM <Data Model Object>
JOIN [Inner | Left | Right | Full] <Data Model Object> [Optional]
WHERE <predicate on rows> [Optional]
Qualitative Values
GROUP BY <columns[Dimensions]> e.g. CustomerID__c
Filter criteria in segment

Click here to read more


I want to create an Insight that calculates the
“Lifetime Value” i.e. the total customer spend
for Unified Individual , so that I can use it for
the segmentation and activation purposes
Exploring CI, Follow along
Sales Orders Unified Link Individual Unified Individual
Order Order Individual Unified Data First
Sold To Order Date ID Last Name
Number Total ID ID Source Name

100001 $1,000 cust101 2023-05-01 cust101 dc101 CRM dc101 Jeff Smith
100002 $2,000 cust101 2023-05-02 cust102 dc102 CRM dc102 Tracy Doe
100003 $5,000 cust102 2023-05-01 cust103 dc103 CRM
dc103 Pat Battle
100004 $8,000 cust103 2023-05-05 cust104 dc103 MC
100005 $7,000 cust104 2023-05-06
Let Join them, Why?
Joins “flatten” all the objects, now we can group and summarize
Sales Orders Unified Link Individual Unified Individual
Order Order Individual Unified Data First
Sold To Order Date ID Last Name
Number Total ID ID Source Name

100001 $1,000 cust101 2023-05-01 cust101 dc101 CRM dc101 Jeff Smith
100002 $2,000 cust101 2023-05-02 cust102 dc102 CRM dc102 Tracy Doe
100003 $5,000 cust102 2023-05-01 cust103 dc103 CRM
dc103 Pat Battle
100004 $8,000 cust103 2023-05-05 cust104 dc103 MC
100005 $7,000 cust104 2023-05-06
Joins
Order Number Order Total Sold To Order Date Unified ID Data Source First Name Last Name

100001 $1,000 cust101 2023-05-01 dc101 CRM Jeff Smith

100002 $2,000 cust101 2023-05-02 dc101 CRM Jeff Smith

100003 $5,000 cust102 2023-05-01 dc102 CRM Tracy Doe

100004 $8,000 cust103 2023-05-05 dc103 CRM Pat Battle

100005 $7,000 cust104 2023-05-06 dc103 MC Pat Battle


Exploring CI, Follow along - Row 1 & 2
Sales Orders Unified Link Individual Unified Individual
Order Order Individual Unified Data First
Sold To Order Date ID Last Name
Number Total ID ID Source Name

100001 $1,000 cust101 2023-05-01 cust101 dc101 CRM dc101 Jeff Smith
100002 $2,000 cust101 2023-05-02 cust102 dc102 CRM dc102 Tracy Doe
100003 $5,000 cust102 2023-05-01 cust103 dc103 CRM
dc103 Pat Battle
100004 $8,000 cust103 2023-05-05 cust104 dc103 MC
100005 $7,000 cust104 2023-05-06

CI Output

custid__c LTV__c

dc101 $3,000
Exploring CI, Follow along - Row 3
Sales Orders Unified Link Individual Unified Individual
Order Order Individual Unified Data First
Sold To Order Date ID Last Name
Number Total ID ID Source Name

100001 $1,000 cust101 2023-05-01 cust101 dc101 CRM dc101 Jeff Smith
100002 $2,000 cust101 2023-05-02 cust102 dc102 CRM dc102 Tracy Doe
100003 $5,000 cust102 2023-05-01 cust103 dc103 CRM
dc103 Pat Battle
100004 $8,000 cust103 2023-05-05 cust104 dc103 MC
100005 $7,000 cust104 2023-05-06

CI Output

custid__c LTV__c

dc101 $3,000

dc102 $5,000
Exploring CI, Follow along - Row 4 & 5
Sales Orders Unified Link Individual Unified Individual
Order Order Individual Unified Data First
Sold To Order Date ID Last Name
Number Total ID ID Source Name

100001 $1,000 cust101 2023-05-01 cust101 dc101 CRM dc101 Jeff Smith
100002 $2,000 cust101 2023-05-02 cust102 dc102 CRM dc102 Tracy Doe
100003 $5,000 cust102 2023-05-01 cust103 dc103 CRM
dc103 Pat Battle
100004 $8,000 cust103 2023-05-05 cust104 dc103 MC
100005 $7,000 cust104 2023-05-06

CI Output

custid__c LTV__c

dc101 $3,000

dc102 $5,000

dc103 $15,000
Calculated Insight Example
Lifetime Value (Total Customer Spend) Metrics we are
calculating
SELECT
SUM( SALESORDER__dlm.order_total__c ) as LTV__c,
UnifiedIndividual__dlm.Id__c as custid__c
FROM Dimensions
SALESORDER__dlm Data Model Object we’re aggregating
JOIN
UnifiedLinkIndividual__dlm Join with Unified Link Individual DMO
ON
SALESORDER__dlm.SoldTo__c = UnifiedLinkIndividual__dlm.IndividualId__c
JOIN
UnifiedIndividual__dlm Common keys tying the
Join with Unified Individual DMO
objectscustid__c
together LTV__c
ON
UnifiedLinkIndividual__dlm.UnifiedIndividualId__c
dc101 $3,000
= UnifiedIndividual__dlm.Id__c
GROUP BY dc102 $5,000
custid__c Group by each customer dc103 $15,000
Using the Insights Builder
Visual interface for business users to declaratively build metrics

Allows creation of your own


Left, Right, Inner, Full arithmetic operations

Original Data Logical Transforming Calculation Categorization on Filter out


Source operators the data on 1+ values an aggregate aggregations

Data Source to join


to Sales Order

Data Source to join


to the first join
I want to create an Insight that calculates the
“order amount” for all purchases for
Individual and Unified Individual records in
the last year along with the “first name”, so
that I can use both those fields for the
segmentation and activation purposes
Jump to Appendix to Explore this >>
Metrics on Metrics Important!

Allow the output of one CI to be the input of another

Any previous CI can be used

CI’s and DMOs can be combined to build new CIs

Dependent CI’s are executed in order

Maximum 3 levels deep


Few Examples:
● Categorize customer in different buckets based on
their LTVs,
● Infact, for creating any combined metrics based
on other metrics
Calculated Insights Considerations Important!

Know the differences between Measures & Dimension


CI in Segmentation
● Data Cloud only allows activation of CI Metrics
● CI must contain the object you
● Tip: To Activate Dimensions, turn them into Metrics using FIRST,
segment on as a Join
MAX, LAST
* Ensure the dimension that you are turning into a measure aligns to ● Primary Key of the Object
what you are aggregating on (segmented on) must be a
Test your logic dimension
● Ensure your JOINs are correct
● Test your CI with a subset of records
● Use SQL tools such as Dbeaver, Query Workspaces to model your
Insight logic CI in Activation
*CI uses Spark SQL which is different than DBeaver, Query API which
uses Trino SQL ● Can only activate Measures
Metrics on Metrics (CI on CI) (Not Dimensions)
● Organize complex Calculated Insights SQL data into logical steps ● Can add dimension filters to your
and stitch powerful workflows and improve reuse metrics during activation
● Combined upto 3 CI to reuse common logic
Streaming Insights
Behind the scenes
Quantitative Values
Anatomy of a Streaming Insight e.g. page_views__c
Attribute in segment
Aggregation can only be
SELECT <Attributes>, <Aggregation[Measures]>, SUM or Count
Window definition is WINDOW.START as start__c,
a required aspect of
Streaming Insights! WINDOW.END as end__c
FROM <Data Model Object>
JOIN [Inner] <Data Model Object> [Optional]
WHERE <predicate on rows> [Optional]
GROUP BY Here we’re defining the
WINDOW(<Time Attribute>, X MINUTE/HOUR), length of the window. Can
be minimum 5 minutes &
<other columns[Dimensions]> up to 24 hours.
Did you know
Streaming Insights Streaming Insights can
aggregate data every 5 mins
Create insights and drive real time actions on your streaming data (to 24 hours)

Action Rules
(optional)
Send Email
Mobile SDK

Chatter Post
Streaming Data or
Data Action
Streaming Insights
Web SDK In App - Mobile Notification

Desktop Notification

MC Personalization
Slack Message

Log Custom Platform Event


Streaming Data

Enrichment
(optional)
I want to send a Push Notification with a
coupon to any customer entering a store who
visited product information pages on our site
more than 3 times in last 24 hours
Understanding Streaming Insights
Aggregates

12.00-12.05 Customer ID = 1, PageViews = 5

12.00-12.05 Customer ID = 2, PageViews = 1

12.00 12.05 12.10


Time
Events

12.01: Customer ID = 1, PageViews = 1

12.02: Customer ID = 1, PageViews = 1

12.02: Customer ID = 1, PageViews = 1

12.03: Customer ID = 1, PageViews = 1

12.04: Customer ID = 1, PageViews = 1

12.04: Customer ID = 2, PageViews = 1


Streaming Insights : Example Results

start__c end__c customer_id__c product__c page_views__c


12.00 12.05 1 HK0012 5
12.00 12.05 2 JK0078 1
12.05 12.10 3 HK0078 2
Streaming Insights: Resulted Query
SELECT COUNT( RealTimeMobileEvents__dlm.pageviews__c ) as page_views__c,
ssot__Individual__dlm.ssot__Id__c as customer_id__c,
RealTimeMobileEvents__dlm.product__c as product__c, Quantitative Values
Window WINDOW.START as start__c, e.g. page_views__c
definition is a Attribute in segment
required aspect
WINDOW.END as end__c
Aggregation can only be
of Streaming FROM SUM or Count
Insights! RealTimeMobileEvents__dlm
JOIN
ssot__Individual__dlm
ON
ssot__Individual__dlm.ssot__Id__c = RealTimeMobileEvents__dlm.deviceId__c
GROUP BY
window( RealTimeMobileEvents__dlm.dateTime__c ,'5 MINUTE'),
customer_id__c Here we’re defining the
length of the window. Can
be minimum 5 minutes &
up to 24 hours.
Using the Insights Builder
Visual interface for business users to declaratively build metrics

Min: 5 min
Max: 24 hours

Supported Join: Inner on Engagement to


(Unified) Individual
Streaming Insight Considerations

● Aggregation time window 5 minutes to 24 hours

● Can only JOIN to Individual and Unified Individual


○ Pay attention if you are trying to combine multiple DMOs to create an insight
○ e.g. Order Line Item, Order Header - Individual ID is on the Order header but
insight is based on data from Order Line Item

● Only supports real time data sources


○ Web & Mobile SDK, MC Personalization
○ Ingestion API is NOT supported

● Streaming Insights are not available in Segmentation & Activation


Comparing Features: CIs vs. Streaming Insights
Category Calculated Insights Streaming Insights
Latency of Data is collected in batches as sets of records
Work on events happening in real time
Processing and processed as unit

Perform complex calculations usually over


Volume Handles micro batches of few records
large historical data

Supported Low (Inner JOIN


High
Complexity & SUM, COUNT aggregations only)

Supported Data
Profile & Engagement events (all sources) Engagement events from “real-time sources”
Sources

Data Action Targets, JDBC Driver (incl.


Available via Segmentation, Activation, APIs, Analytics
Tableau)
Useful for Refining segments, Personalization Triggering time-sensitive, rule-based actions
Supported
Programmatic (SQL) & Declarative (Insights Builder)
Creation Method
CI vs. SI vs. Formulas vs. Segment Operators

Formulas Calculated Insights Streaming Insights Segment Operators


Completes high-volume data Self-service filtering use cases
Processes continuous stream as
Used at ingestion time processing and metrics without the help of a data
data is received
generation. analyst.
Performs operations on Collects data in batches as sets Works on events happening in Does not support all operators,
row-based data used of records and processes them as real-time. you have in CI
downstream a unit.

Do not update periodically after Performs complex calculations Handles micro-batches of few
ingestion usually needing large historic records. Updated regularly (12/24h)
(bad example: days since…) data.

Example: Example: Example:


Example: Identify customers who have
Customer rank by spend Clickstream analysis,
Generate flag based on field opened three support cases in
(Top 3 customers by purchase ecommerce, transactions
value the last quarter.
value on shoes)
Knowledge Check

1. What are the two minimum requirements needed when using the Visual Insights
Builder to create a Calculated Insight?
a. WHERE clause is required
b. At least two objects to join
c. At least one dimension
d. At least one measure
Knowledge Check - Answer

1. What are the two minimum requirements needed when using the Visual Insights
Builder to create a Calculated Insight?
a. WHERE clause is required
b. At least two objects to join
c. At least one dimension ✅
d. At least one measure ✅

Help Article
Knowledge Check

2. An administrator wants to be able to create a multi-dimensional metric to identify


unified individual lifetime value (LTV). Which sequence of DMO joins are necessary
within the Calculated Insight to enable this calculation?
a. Unified Individual > Individual > Sales Order
b. Unified Individual > Unified Link Individual > Sales Order
c. Sales Order > Unified Individual

d. Sales Order > Individual > Unified Individual


Knowledge Check - Answer

2. An administrator wants to be able to create a multi-dimensional metric to identify


unified individual lifetime value (LTV). Which sequence of DMO joins are necessary
within the Calculated Insight to enable this calculation?
a. Unified Individual > Individual > Sales Order
b. Unified Individual > Unified Link Individual > Sales Order ✅
c. Sales Order > Unified Individual

d. Sales Order > Individual > Unified Individual


Next Steps
Your Homework for Next Time
Goal (Homework) post this call -
Trailhead
Navigate to the Trailmix
1
● Unlock Your Data with Data Cloud

2 Complete Activities
● Module: Data Cloud Insights
● Module : Data Cloud Insights Using SQL
● Project : Quick Start: Enhance Data with Insights
● Module: Insights Builder in Data Cloud

Demo Video : Insights Bookmark -> Program Guide


3 sfdc.co/DCAcademyGuide
Goal (Homework) post this call -
Partner Learning Camp

➔ Complete
● Activity: Configure Calculated Insights - Visual
Insights Builder
● Activity: Configure Calculated Insights - Using
SQL
● Activity: Configure Calculated Insights -
Deploy From Package
● Activity: Configure Streaming Insights
Q&A
We will try to answer most of queries here in this sheet:
http://sfdc.co/DCAcademyQnA

Bookmark -> Program Guide

sfdc.co/DCAcademyGuide
Thank you
Please provide your valuable feedback
post closing this zoom session, your
feedback will be very valuable to us
More to Learn
Appendix
Exploring CI Follow along

Individual Unified Link Individual Unified Individual

Individual First Last Data Individual Unified Data First Last


Unified ID
ID Name Name Source ID ID Source Name Name

cust101 Jeff Smith CRM cust101 dc101 CRM dc101 Jeff Smith

cust102 Tracy Doe CRM cust102 dc102 CRM dc102 Tracy Doe

cust103 Pat Battle CRM cust103 dc103 CRM dc103 Pat Battle

cust103 Mike Brown MC cust103 dc104 MC dc104 Mike Brown

Sales Orders

Order Order Customer


Order Date
Number Total ID

100001 $1,000 cust101 2023-05-01

100002 $2,000 cust101 2023-05-02

100003 $5,000 cust102 2023-05-01

100004 $8,000 cust103 2023-05-05


Exploring CI Follow along
A Calculated Insight was created using SQL (or via the Visual Builder)
What’s the output and can it be used for it activation?

SELECT ssot__Individual__dlm.ssot__Id__c as customerid__c,


UnifiedIndividual__dlm.ssot__Id__c as unifiedid__c,
SUM(ssot__SalesOrder__dlm.ssot__GrandTotalAmount__c) as YearOrderAmt__c,
UnifiedIndividual__dlm.ssot__FirstName__c as FirstName__c
FROM ssot__SalesOrder__dlm
JOIN IndividualIdentityLink__dlm
ON ssot__SalesOrder__dlm.ssot__SoldToCustomerId__c =
IndividualIdentityLink__dlm.SourceRecordId__c
JOIN UnifiedIndividual__dlm
ON IndividualIdentityLink__dlm.UnifiedRecordId__c =
UnifiedIndividual__dlm.ssot__Id__c
JOIN ssot__Individual__dlm
ON IndividualIdentityLink__dlm.SourceRecordId__c =
ssot__Individual__dlm.ssot__Id__c
WHERE ssot__SalesOrder__dlm.ssot__OrderStartDate__c >
DATE_ADD(CURRENT_DATE(),-365)
GROUP BY unifiedid__c, customerid__c, FirstName__c
Exploring CI Follow along - Row 1

Individual Unified Link Individual Unified Individual

Individual First Last Data Individual Unified Data First Last


Unified ID
ID Name Name Source ID ID Source Name Name

cust101 Jeff Smith CRM cust101 dc101 CRM dc101 Jeff Smith

cust102 Tracy Doe CRM cust102 dc102 CRM dc102 Tracy Doe

cust103 Pat Battle CRM cust103 dc103 CRM dc103 Pat Battle

cust103 Mike Brown MC cust103 dc104 MC dc104 Mike Brown

Sales Orders CI Output

Order Order Customer Unified Customer First Year Order


Order Date
Number Total ID ID ID Name Amt

100001 $1,000 cust101 2023-05-01 dc101 cust101 Jeff $3,000

100002 $2,000 cust101 2023-05-02

100003 $5,000 cust102 2023-05-01

100004 $8,000 cust103 2023-05-05


Exploring CI Follow along - Row 2

Individual Unified Link Individual Unified Individual

Individual First Last Data Individual Unified Data First Last


Unified ID
ID Name Name Source ID ID Source Name Name

cust101 Jeff Smith CRM cust101 dc101 CRM dc101 Jeff Smith

cust102 Tracy Doe CRM cust102 dc102 CRM dc102 Tracy Doe

cust103 Pat Battle CRM cust103 dc103 CRM dc103 Pat Battle

cust103 Mike Brown MC cust103 dc104 MC dc104 Mike Brown

Sales Orders CI Output

Order Order Customer Unified Customer First Year Order


Order Date
Number Total ID ID ID Name Amt

100001 $1,000 cust101 2023-05-01 dc101 cust101 Jeff $3,000

100002 $2,000 cust101 2023-05-02 dc102 cust102 Tracy $5,000

100003 $5,000 cust102 2023-05-01

100004 $8,000 cust103 2023-05-05


Exploring CI Follow along - Rows 3 & 4

Individual Unified Link Individual Unified Individual

Individual First Last Data Individual Unified Data First Last


Unified ID
ID Name Name Source ID ID Source Name Name

cust101 Jeff Smith CRM cust101 dc101 CRM dc101 Jeff Smith

cust102 Tracy Doe CRM cust102 dc102 CRM dc102 Tracy Doe

cust103 Pat Battle CRM cust103 dc103 CRM dc103 Pat Battle

cust103 Mike Brown MC cust103 dc104 MC dc104 Mike Brown

Sales Orders CI Output

Order Order Customer Unified Customer First Year Order


Order Date
Number Total ID ID ID Name Amt

100001 $1,000 cust101 2023-05-01 dc101 cust101 Jeff $3,000


Incorrect as
100002 $2,000 cust101 2023-05-02 dc102 cust102 Tracy $5,000
it’s been
100003 $5,000 cust102 2023-05-01 dc103 cust103 Pat $16,000 summed
twice
100004 $8,000 cust103 2023-05-05 dc104 cust103 Mike $16,000
Exploring CI Follow along - Rows 3 & 4

Individual Unified Link Individual Unified Individual

Individual First Last Data Individual Unified Data First Last


Unified ID
ID Name Name Source ID ID Source Name Name

cust101 Jeff Smith CRM cust101 dc101 CRM dc101 Jeff Smith

cust102 Tracy Doe CRM cust102 dc102 CRM dc102 Tracy Doe

cust103 Pat Battle CRM cust103 dc103 CRM dc103 Pat Battle

cust103 Mike Brown MC cust103 dc104 MC dc104 Mike Brown

Sales Orders CI Output

Order Order Customer Unified Customer First Year Order


Order Date
Number Total ID ID ID Name Amt First Name
100001 $1,000 cust101 2023-05-01 dc101 cust101 Jeff $3,000 cannot be
activated - it
100002 $2,000 cust101 2023-05-02 dc102 cust102 Tracy $5,000 is a
dimension
100003 $5,000 cust102 2023-05-01 dc103 cust103 Pat $16,000

100004 $8,000 cust103 2023-05-05 dc104 cust103 Mike $16,000


Exploring CI Follow along - Updated SQL

SELECT ssot__Individual__dlm.ssot__Id__c as customerid__c,


UnifiedIndividual__dlm.ssot__Id__c as unifiedid__c,
SUM(ssot__SalesOrder__dlm.ssot__GrandTotalAmount__c) as YearOrderAmt__c,
FIRST(UnifiedIndividual__dlm.ssot__FirstName__c) as FirstName__c
FROM ssot__SalesOrder__dlm
JOIN IndividualIdentityLink__dlm
ON ssot__SalesOrder__dlm.ssot__SoldToCustomerId__c =
IndividualIdentityLink__dlm.SourceRecordId__c
JOIN UnifiedIndividual__dlm
ON IndividualIdentityLink__dlm.UnifiedRecordId__c =
UnifiedIndividual__dlm.ssot__Id__c
JOIN ssot__Individual__dlm
ON IndividualIdentityLink__dlm.SourceRecordId__c =
ssot__Individual__dlm.ssot__Id__c
AND IndividualIdentityLink__dlm.ssot__DataSourceObjectId__c =
ssot__Individual__dlm.ssot__DataSourceObjectId__c
WHERE ssot__SalesOrder__dlm.ssot__OrderStartDate__c >
DATE_ADD(CURRENT_DATE(),-365)
GROUP BY unifiedid__c, customerid__c
Exploring CI Follow along - Rows 3 & 4

Individual Unified Link Individual Unified Individual

Individual First Last Data Individual Unified Data First Last


Unified ID
ID Name Name Source ID ID Source Name Name

cust101 Jeff Smith CRM cust101 dc101 CRM dc101 Jeff Smith

cust102 Tracy Doe CRM cust102 dc102 CRM dc102 Tracy Doe

cust103 Pat Battle CRM cust103 dc103 CRM dc103 Pat Battle

cust103 Mike Brown MC cust103 dc104 MC dc104 Mike Brown

Sales Orders CI Output First Name can be


Order Order Customer Unified Customer First Year Order
activated - it is a
Order Date metric now
Number Total ID ID ID Name Amt

100001 $1,000 cust101 2023-05-01 dc101 cust101 Jeff $3,000


Summed up
100002 $2,000 cust101 2023-05-02 dc102 cust102 Tracy $5,000
properly
100003 $5,000 cust102 2023-05-01 dc103 cust103 Pat $8,000 number

100004 $8,000 cust103 2023-05-05 dc104 cust103 Mike $8,000


CI Follow along - Updated SQL

SELECT ssot__Individual__dlm.ssot__Id__c as customerid__c,


UnifiedIndividual__dlm.ssot__Id__c as unifiedid__c,
SUM(ssot__SalesOrder__dlm.ssot__GrandTotalAmount__c) as YearOrderAmt__c,
FIRST(UnifiedIndividual__dlm.ssot__FirstName__c)
What changed? as FirstName__c
FROM ssot__SalesOrder__dlm
JOIN IndividualIdentityLink__dlm
● Join the Data Source Object to avoid a cross join between
ON ssot__SalesOrder__dlm.ssot__SoldToCustomerId__c =
the Individual and Unified Link Individual objects
IndividualIdentityLink__dlm.SourceRecordId__c
* in case there are duplicate Individual IDs from different data sources
JOIN UnifiedIndividual__dlm
ON IndividualIdentityLink__dlm.UnifiedRecordId__c =
● Turn the First Name dimension into a metric so it can be
UnifiedIndividual__dlm.ssot__Id__c
used for activation
JOIN ssot__Individual__dlm
ON IndividualIdentityLink__dlm.SourceRecordId__c
*Ensure the dimension that you are turning into a measure=aligns to what
ssot__Individual__dlm.ssot__Id__c
you are aggregating on
AND IndividualIdentityLink__dlm.ssot__DataSourceObjectId__c =
ssot__Individual__dlm.ssot__DataSourceObjectId__c
WHERE ssot__SalesOrder__dlm.ssot__OrderStartDate__c >
DATE_ADD(CURRENT_DATE(),-365)
GROUP BY unifiedid__c, customerid__c
Common Errors and
Troubleshooting Tips
Things to Consider

Orchestration
Validation Creation Scheduling Execution
& Translation
Validates CI query Inserts a CI entity Runs every 30 mins Picks CIs from the Spark job running on
into DB with all message queue emr clusters to
metadata info Schedules CIs by pushing compute CI results
them to run into a message Translates CI queries
queue (SQS) to Spark SQLs Persists results in
lakehouse tables
New CIs are picked Submits a spark job
immediately to process CIs in a
batch
Old CIs are picked if they
haven’t been processed for
6 hours
Common Errors & Troubleshooting Tips

Behavior:
● Validation error messages on the UI
● “Sorry, we cannot check the syntax. ” (something like this, may
not be these exact words)
● “Sorry, an error occurred. ” (something like this, may not be
these exact words)
Validation

Suggested Cause and Solution:


● Often caused by a syntax or even spelling errors
○ Visually verify queries, use external/online editing
tools/formatters for better visualization and easier proof-reading
○ Try minimizing query fixing one problem at a time
● Could indicate internal error
Creation
○ Would require support case to troubleshoot and resolve
Common Errors & Troubleshooting Tips

Behavior:
● The CI is not picked up
● The CI picked up after a while
● "Pending" status for a "long" time

Scheduling Suggested Cause and Solution:


● Understanding the latency
○ 30 mins - 1 hour for new CI to be picked up
○ Up to 6 hours for existing CI to be reprocessed

Orchestration
& Translation
Common Errors & Troubleshooting Tips

Behavior:
● CI ran for a long time and eventually got "Aborted"

Suggested Cause and Solution:


● May indicate problem with data, e.g. data skew (two tables
joined with a key that is not evenly distributed)
Execution ○ Examine the data in Data Explorer / via API / Query
Workspaces
○ Raise a support case to troubleshoot if you can't verify and
resolve it
Common Errors & Troubleshooting Tips

Behavior:
● Flipping or consistently wrong CI results
● CI status = "Success"

Suggested Cause and Solution:


● Often caused by underlying data
Execution ○ Examine and verify relevant DMO/DLO records
○ Verify proper use of JOIN statements and relevant key fields in the
criteria
● Check for non-deterministic functions used in the CI, such as
FIRST()
○ If you do JOIN or LEFT JOIN and resulting data set contains
multiple rows the FIRST function will pick a random record
● Try breaking query into smaller pieces and get them to work
independently before combining them
Common Errors & Troubleshooting Tips

Behavior:
● CI is not showing in the segmentation canvas

Suggested Cause and Solution:


● Incorrect design of the CI
○ Has to have a relationship with segment target (Individual or
Segmentation Unified Individual)
Canvas
○ Has to have a relationship with the source DMO
● CI has a date time dimension and only 1 non-aggregatable
measure
○ Modify your design to include aggregatable measure
Let’s say there are two DMOs, Individual and SalesOrder. If you want your CI to show
under SalesOrder, the CI has to have the Individual PK as one dimension, and at least
one dimension created directly from a SalesOrder attribute.
eg. SELECT …., Individual.Id as id__c, SalesOrder.category as category__c …

You might also like