metric_aggregate
Aggregate any Klaviyo metric, including opens, clicks, and revenue, over custom dates or preset timeframes with hourly to monthly intervals. Get flexible metric-level totals for deeper analysis.
Instructions
Aggregate values for any Klaviyo metric (e.g. opens, clicks, revenue) over a custom timeframe + interval. More flexible than campaign/flow reports - use for any metric.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Custom end YYYY-MM-DD. Defaults to now. | |
| start | No | Custom start YYYY-MM-DD. Raw events have NO 2023 floor - reaches back to account inception. Max 1 year per call. | |
| account | Yes | Account name | |
| interval | No | Note: metric-aggregates uses singular (hour/day/week/month), NOT the series-report plural form. | |
| metric_id | Yes | Metric ID. Get from list_metrics. | |
| timeframe | No | Preset lookback. Use this OR start/end. Default: last_30_days. | |
| measurement | No | count, sum_value (revenue), or unique. Default count. |