Klaviyo
Version 0.0.11
Check out the API docs here for more information.
Our connector is using revision
2024-07-15of the API.
Set up
To get set up with the Klaviyo connector you will have to generate a Klaviyo API key here.
Features
| Feature | Support | Notes |
|---|---|---|
| Backfill | ✅ | 10 years: Profiles Up to 8 years: Templates, Lists, Segments, Flows, Flow Actions, Flow Action Message, Campaigns SMS, Campaigns Email, Campaigns Email (included messages). All time: Metrics and Campaigns Email (including tags). 1 Year: Query Campaign Values 1 Month: Events |
| Incremental | ✅ | Events, Templates, Profiles, Lists, Segments, Campaigns SMS, Campaigns Email, Campaigns Email (included messages), Flows, Flow Actions, Flow Action Messages |
| API reliability | 🟢 | Reliable API |
Reports detail
| ⬇️ Report | 🔑 Incremental key | 🔑 Primary key | 📄 Link to API endpoint |
|---|---|---|---|
| Campaigns (old v1 API) Deprecated | - | ID | Get Campaigns |
| Campaigns SMS | UPDATE_AT | ID | Get Campaigns |
| Campaigns Email | UPDATE_AT | ID | Get Campaigns |
| Campaigns Email (including messages) | UPDATE_AT | ID | Get Campaigns |
| Campaigns Email (including tags) | - | ID | Get Campaigns |
| Templates | UPDATED | ID | Get Templates |
| Profiles | CREATED | ID | Get Profiles |
| Events | DATETIME | ID | Get Events |
| Events (Custom dates) | - | ID | Get Events |
| Metrics | - | ID | Get Metrics |
| Lists | UPDATED | ID | Get Lists |
| Segments | UPDATED | ID | Get Segments |
| Flows | UPDATED | ID | Get Flows |
| Flow Actions | FLOW UPDATED | ID | Get Flow Actions |
| Flow Action Messages | FLOW ACTION MESSAGE | ID | Get Flow Action Messages |
| Query Metric Aggregates (custom query) | - | ID | Query Metric Aggregates |
| Query Campaign Values | - | ID | Query Campaign Values |
Limitations
- Due to rate limits with the Klaviyo API, it is not recommended to run more than two extracts at a time.
- It is only possible to get one month worth of events data and the backfill can take several hours (applies for both Events and Events (Custom dates) reports
- For Events (Custom dates) report the start and end values on the extract setup must be in the format
2024-01-02T23:20:49Z. Start datetime is exclusive and End datetime is inclusive
Campaigns
v1 / v2 legacy APIs are scheduled to retire on June 30, 2024. The report "Campaigns (old v1 API)" is relying on the old v1 API version so we suggest you use the new Campaign reports before Jun 2024 to avoid any issues.
Query Metric Aggregates (custom query)
For running this report you need to provide the custom query you want to execute (in JSON format). Information and tips on how to form this query can be found here
As explained in the API docs: because this endpoint allows for large scale event aggregation and grouping, it’s helpful to think of it as a way to execute SQL-style queries for data in Klaviyo.
For example, if you wanted to sum the revenue (using the Placed Order metric, for the metric-based report) by flow in your Klaviyo account for the last year using SQL, you would write something like this:
SELECT SUM(revenue) FROM klaviyo_event_data WHERE metric="placed order" AND timestamp>="2022-01-01" AND timestamp\<="2023-01-01" AND $flow!=null GROUP BY $flowThis can be achieved with the example query (while of course using the relevant
metric_idfor your case):{ "data": { "type": "metric-aggregate", "attributes": { "measurements": [ "sum_value" ], "by": [ "$attributed_flow" ], "filter": [ "greater-or-equal(datetime,2022-01-01T00:00:00)", "less-than(datetime,2023-01-01T00:00:00)", "not(equals($attributed_flow,\"\"))" ], "metric_id": "abc123", "interval": "month", "timezone": "US/Eastern" } } }The
Metricsreport can be used to find the relevantmetric_id. Alternatively, you can find the corresponding metric_id in your Klaviyo account by navigating to the page for a given metric (more info here). Once on the page for a given metric, you'll find the metric_id in the URL (e.g.,https://www.klaviyo.com/metric/METRIC_ID/metricname).Further examples and clarifications can be found on the link to the API docs above.
Data received from this report will need to be cleaned in a Transform.
Query Campaign Values
To run this report, you will need a
conversion_metric_id. TheMetricsreport provides theIDfor possible metrics that can be used to calculate the conversion-based statistics.For example, to run the report for the Placed Orders metric, retrieve the corresponding
IDfrom theMetricReport. ThisIDcan then be used as an input for theQuery Campaign Valuesreport.
Limitations
Flow Action MessagesreportPlease run this report/extract on its own (not while other extracts are running in the same Source), as the rate limits are quite restrictive.
Updated 2 months ago
