Klaviyo
Version 0.0.8
Check out the API docs here for more information.
Our connector is using revision
2023-10-15
of 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 | β | Events (1 Month), Templates (2 years), Profiles (2 years), Lists (2 years), Segments (2 years), Campaigns (All time), Metrics (All time), Flows (All time), Query Campaign Values (1 year) |
Incremental | β | Events, Templates, Profiles, Lists, Segments |
API reliability | π’ | Reliable API |
Reports detail
β¬οΈ Report | π Incremental key | π Primary key | π Link to API endpoint |
---|---|---|---|
Campaigns (old v1 API) | - | ID | Get Campaigns |
Campaigns SMS | - | ID | Get Campaigns |
Campaigns Email | - | ID | Get Campaigns |
Campaigns Email (included messages) | - | ID | Get Campaigns |
Campaigns Email (included 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 | - | ID | Get Flows |
Flow Actions | - | ID | Get Flow Actions |
Flow Action Messages | - | 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 $flow
This can be achieved with the example query (while of course using the relevant
metric_id
for 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
Metrics
report 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
. TheMetrics
report provides theID
for 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
ID
from theMetric
Report. ThisID
can then be used as an input for theQuery Campaign Values
report.
Limitations
Flow Action Messages
reportPlease 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 3 months ago