Skip to main content

Overview

Summary definitions let you control exactly how interaction data is aggregated. Instead of a fixed set of rollup tables, you define the dimensions, aggregates, and time windows that matter to your business. The platform materializes these summaries continuously as interactions flow in, so they are always ready for fast reads at decision time and in dashboards. Each summary definition is a named aggregation shape consisting of three parts:
  1. Dimensions — What to GROUP BY
  2. Aggregates — What to compute
  3. Windows — Rolling time periods to maintain

Dimensions

Dimensions determine the grouping keys for each summary row. You can select one or more of the following:
DimensionDescription
offer_idGroup by Offer
creative_idGroup by Creative
category_idGroup by Category
sub_category_idGroup by Sub-Category
channel_idGroup by Channel
placement_typeGroup by placement (e.g. banner, inline, push)
directionGroup by direction (inbound vs outbound)
outcome_keyGroup by outcome type (impression, click, conversion, etc.)
Start with fewer dimensions and add more only when needed. Each additional dimension multiplies the number of summary rows the system must maintain.

Aggregates

Aggregates define the values computed for each group. The following aggregate types are available:
AggregateDescription
countNumber of interactions in the group
sum_valueSum of the value field across interactions (e.g. revenue, spend)
last_contactTimestamp of the most recent interaction
distinct_offersCount of distinct Offer IDs (useful when grouping by channel or category)
You can select multiple aggregates in a single summary definition. All selected aggregates are computed for every dimension combination.

Windows

Windows define the rolling time periods over which aggregates are maintained. You can select one or more windows per summary definition:
WindowPeriod
1dLast 24 hours (1 day)
7dLast 7 days
14dLast 14 days
30dLast 30 days
90dLast 90 days

How Rolling Windows Work

Summary definitions use a daily bucket approach for rolling windows:
  1. Interactions are bucketed by calendar day (UTC).
  2. At read time, the system SUMs the daily bucket rows that fall within the requested window.
  3. This approach is exact — no approximation or sampling.
  4. Old daily buckets are retained indefinitely (no TTL), which means you can always redefine windows without losing data.
Because rolling windows are computed at read time by summing daily buckets, changing a window value (e.g. from 7d to 14d) takes effect immediately with no reprocessing required.

System Defaults

Every tenant is automatically provisioned with three default summary definitions. These cover the most common analytics needs and are used by built-in dashboards and contact policy evaluation:
Default SummaryDimensionsAggregatesWindows
Offer Interactionsoffer_id, channel_id, outcome_keycount, sum_value, last_contact1d, 7d, 30d
Category Outcomescategory_id, outcome_keycount, sum_value, distinct_offers7d, 30d, 90d
Channel Performancechannel_id, direction, outcome_keycount, sum_value, last_contact1d, 7d, 30d
System default summaries cannot be deleted, but you can modify their dimensions, aggregates, and windows if the defaults do not suit your needs.

API Reference

MethodEndpointDescription
GET/api/v1/summary-definitionsList all summary definitions for the tenant
POST/api/v1/summary-definitionsCreate a new summary definition
PUT/api/v1/summary-definitionsUpdate an existing summary definition (requires id in body)
DELETE/api/v1/summary-definitions?id={id}Delete a summary definition

Create Example

POST /api/v1/summary-definitions

{
  "name": "Creative Placement Performance",
  "description": "Tracks creative performance by placement type and outcome",
  "dimensions": ["creative_id", "placement_type", "outcome_key"],
  "aggregates": ["count", "sum_value", "last_contact"],
  "windows": ["1d", "7d", "30d"]
}
Response:
{
  "id": "sd_creative_placement",
  "name": "Creative Placement Performance",
  "description": "Tracks creative performance by placement type and outcome",
  "dimensions": ["creative_id", "placement_type", "outcome_key"],
  "aggregates": ["count", "sum_value", "last_contact"],
  "windows": ["1d", "7d", "30d"],
  "isSystemDefault": false,
  "createdAt": "2026-03-26T10:00:00Z",
  "updatedAt": "2026-03-26T10:00:00Z"
}

Use Case: Creative Placement Performance

Suppose you run creatives across multiple placement types (banner, inline, push notification) and want to understand which creative/placement combinations drive the most conversions:
  1. Create a summary definition with dimensions creative_id, placement_type, outcome_key.
  2. Select aggregates count and sum_value to track volume and revenue.
  3. Choose windows 7d and 30d for weekly and monthly views.
  4. The platform immediately begins materializing rows for this shape as new interactions arrive.
  5. Query the data via dashboards or the interaction summary API, grouped by your chosen dimensions.

Summary Definitions vs Behavioral Metrics

Summary definitions and behavioral metrics both aggregate interaction data, but they serve different purposes:
Summary DefinitionsBehavioral Metrics
PurposePre-materialized rollups for fast readsComputed signals for rules and scoring
ConfigurationDimensions + aggregates + windowsAggregation function + source field + filter conditions
Used byContact policies, dashboards, analyticsQualification rules, contact policies, scoring
ComputationDaily buckets, summed at read timeRealtime or batch recomputation
Use summary definitions when you need flexible, high-performance rollups of interaction data. Use behavioral metrics when you need computed signals with filter conditions and complex aggregation logic.

Contact Policies

Contact policies read from summary definitions to enforce frequency caps, cooldowns, and suppressions.

Behavioral Metrics

Computed aggregations with filter conditions for use in rules and scoring.

Dashboards

Dashboards use summary definition data to power real-time visualizations.