Calculated Insight
A Calculated Insight is a Salesforce Data Cloud metric or attribute computed by an SQL-style query against Data Model Objects, materialized on a schedule, and surfaced as a queryable field on a DMO or as a standalone metric available to segmentation, activations, and Customer 360 profile cards.
Definition
A Calculated Insight is a Salesforce Data Cloud metric or attribute computed by an SQL-style query against Data Model Objects, materialized on a schedule, and surfaced as a queryable field on a DMO or as a standalone metric available to segmentation, activations, and Customer 360 profile cards. Calculated Insights are how Data Cloud turns transactional event data (every email opened, every purchase, every web visit) into derived attributes like Lifetime Value, Average Order Value, Last Engagement Date, or Customer Health Score.
The Calculated Insight engine runs scheduled SQL queries that aggregate child records into parent-level metrics. The query language is a constrained dialect (essentially ANSI SQL with Data Cloud-specific functions and joins). Each Calculated Insight produces one or more output fields, persisted on the target DMO or stored in a separate Calculated Insight Object. Downstream segmentation, prompts, and activations can filter or display Calculated Insight values exactly like any other DMO attribute. This is the bridge from raw events to actionable business metrics.
How Calculated Insights turn raw event data into Customer 360 metrics
The query model: SQL on top of DMOs
Calculated Insights are written in a SQL-like Data Cloud language. The query targets one or more DMOs, joins them via configured relationships, applies WHERE filters and GROUP BY aggregations, and outputs one or more metric fields. Most Calculated Insights aggregate child events into parent attributes: COUNT of Email Engagements per Individual in the last 30 days, SUM of Sales Order amounts per Account lifetime, MAX of EngagementDate per Individual. The query language supports the most common aggregations plus window functions and CASE expressions.
Output: DMO field versus standalone Calculated Insight Object
Each Calculated Insight either writes its output as a field on an existing DMO (Individual.LifetimeOrderValue) or stores results in a dedicated Calculated Insight Object (a separate table queryable by segmentation). DMO-field outputs are simpler but cap at one value per record. Standalone CI Objects can hold multiple metric rows per Individual (engagement counts per channel, per month). The choice depends on the downstream consumption pattern.
Materialization schedule and freshness
Calculated Insights are batch-materialized; they do not run on every read. Schedule options include hourly, every 6 hours, daily, or on-demand. Each run executes the query and updates the output. Downstream segmentation reads the materialized value, not a live computation. The freshness trade-off: more frequent materialization is fresher but more expensive in credits. Most metrics are fine at daily; high-cadence engagement metrics may need hourly.
Real-time Calculated Insights (beta and emerging)
Salesforce has been releasing real-time Calculated Insight capabilities that compute on event ingestion instead of on schedule. Real-time CIs underpin in-the-moment decisioning (a customer hits 1000 lifetime spend, fire a flow). The feature is GA for a subset of patterns and still beta for others. Check the current release notes; the capability surface expands each release.
Credit cost and query optimization
Each materialization consumes processing credits. Expensive Calculated Insights (wide scans, complex joins, full-table aggregates) burn credits fast. Optimization patterns: filter to active records only, use partitioned DMOs (date-based filters are cheap), avoid recomputing data that has not changed (use incremental patterns when supported), batch related metrics into one Calculated Insight rather than many.
Segmentation and activation consumption
Once a Calculated Insight is materialized, downstream features consume it like any DMO field. Segmentation can filter on Lifetime Value over 10000. Activation can pass the value to Marketing Cloud as a personalization token. Prompt templates can reference it as a grounding attribute for AI responses. The CI becomes a first-class profile attribute; consumers do not see the underlying SQL.
Versioning and refactoring
Calculated Insights can be edited and refactored; the next materialization run applies the new query. Changing the schema (adding or removing output fields) requires updating downstream consumers (segments, activations) that reference the changed fields. Major refactors are easier to ship as a new CI alongside the old, migrate consumers, then retire the old. Salesforce does not auto-migrate downstream references.
Building a Calculated Insight
Setup runs in three phases: design the metric (what business question are you answering), write the SQL query, then materialize and verify.
- Define the business metric
Decide what attribute you want to compute: Lifetime Value per Individual, Average Order Value per Account, Last Engagement Date per Customer Profile. Pick the source DMOs that hold the raw events and the target DMO that will receive the output.
- Write the Calculated Insight SQL
Data Cloud, Calculated Insights, New. Use the SQL editor. Write a SELECT that groups source events by the target DMO''s primary key and aggregates with SUM, COUNT, MAX, AVG. Test the query against current data; review row counts and sample outputs.
- Pick the output destination
Either write to a field on the target DMO (Individual.LifetimeOrderValue) or to a standalone Calculated Insight Object. DMO field is simpler; CI Object handles multi-row outputs.
- Schedule the materialization
Pick a refresh cadence: hourly, every 6 hours, daily, on-demand. Match to actual freshness need; over-refreshing wastes credits, under-refreshing produces stale segments.
- Verify in segmentation
After the first successful run, build a test Segment using the new attribute. Verify the segment counts match expectations. If counts are off, debug the SQL by querying directly via Data Cloud SQL.
DMO field (one value per record) or standalone Calculated Insight Object (multiple rows per record).
Hourly, every 6 hours, daily, or on-demand. Trade freshness against credit cost.
SUM, COUNT, AVG, MIN, MAX, plus window functions. Standard SQL aggregations with Data Cloud extensions.
One or more, joined via configured relationships. Joins are expensive on wide DMOs; filter early when possible.
- Calculated Insights are batch-materialized, not real-time. Segments read the most recent materialized value; field changes mid-cycle lag the segment until the next run.
- Schema changes break downstream consumers. Plan refactors carefully or build new CIs alongside old.
- Wide scans on large DMOs burn credits fast. Filter early, partition where possible, batch related metrics.
- Real-time CIs are still expanding feature-wise. Check release notes before assuming a real-time pattern is supported.
- Standalone CI Objects need explicit relationships to standard DMOs for segmentation to traverse them.
Trust & references
Cross-checked against the following references.
- Calculated Insights OverviewSalesforce Help
- Create a Calculated InsightSalesforce Help
Straight from the source - Salesforce's reference material on Calculated Insight.
- Calculated Insight SQL ReferenceSalesforce Help
- Real-Time Calculated InsightsSalesforce Help
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What is a Calculated Insight in Data Cloud?
Q2. Which of these is a common Calculated Insight?
Q3. How can Calculated Insights be used downstream?
Discussion
Loading discussion…