# Klaviyo

### Snapshot

| Features                        | Details               |
| ------------------------------- | --------------------- |
| Features                        | Details               |
| Release Status                  | Released              |
| Source API Version              | v2                    |
| Table Selection                 | Yes                   |
| Column Selection                | Yes                   |
| Edit Integration                | Yes                   |
| Replication Type Selection      | No                    |
| Authentication Parameters       | Klaviyo Private Key   |
| Replication Type                | Key Based Incremental |
| Replication Key                 | Date                  |
| Suggested Replication Frequency |                       |

| Tables/APIs Supported |                |
| --------------------- | -------------- |
| Metrics               | EventsTimeline |
| Campaigns             | Lists          |
| EmailTemplates        |                |

### Integrate Klaviyo with Daton

1. Signin to Daton&#x20;
2. Select Klaviyo from Integrations page
3. Provide Integration Name, Replication Frequency, and History. Integration name would be used in creating tables for the integration and cannot be changed later&#x20;
4. Provide Klaviyo Private Key. Follow the **section below for instructions.**
5. Post successful authentication, you will be prompted to choose from the list of available tables
6. Then select all required fields for each table
7. Submit the integration

### How to get the Klaviyo API Key?

**Step 1 -** Click on the profile section and navigate to Account Settings

![](/files/-MWRfPohOjRvGkNkz3je)

**Step 2 - Click on the API Keys tab and create a new API key for Daton**

![Copy the API key and enter it in the Daton configuration screen](/files/-MWRg5VNHU_U7nWl9cWS)

### Workflow

1. Integrations would be in Pending state initially and will be moved to Active state as soon as the first job loads data successfully on to the configured warehouse
2. Users would be able to edit/pause/re-activate/delete integration anytime
3. Users can view job status and process logs from the integration details page by clicking on the integration name from the active list

### Klaviyo Data

**Metrics**

Purpose: The Metrics API is used for historical event data in Klaviyo. Returns a list of all the metrics in Klaviyo.

Source API Documentation  <https://www.klaviyo.com/docs/api/metrics>

Replication: Key-Based Replication

Replication Key: created

**Fields**

| Name        | Target Datatype |
| ----------- | --------------- |
| updated     | STRING          |
| name        | STRING          |
| created     | STRING          |
| object      | STRING          |
| id          | STRING          |
| integration | RECORD          |

**EventsTimeline**

Purpose: Returns a batched timeline of all events in your Klaviyo account. Each event object contains information about what metric the event tracks, which person the event is related to, and any extra properties about the event.

Source API Documentation  <https://www.klaviyo.com/docs/api/metrics>

Replication: Key-Based Replication

Replication Key: created

**Fields**

| Name              | Target Datatype |
| ----------------- | --------------- |
| uuid              | STRING          |
| event\_name       | STRING          |
| timestamp         | NUMERIC         |
| object            | STRING          |
| datetime          | STRING          |
| statistic\_id     | STRING          |
| id                | STRING          |
| person            | RECORD          |
| event\_properties | RECORD          |

**Campaigns**

Purpose: Returns a list of all the campaigns you've created. Each entry is a separate Campaign object.

Source API Documentation  <https://www.klaviyo.com/docs/api/campaigns>

Replication: Key-Based Replication

Replication Key: created

**Fields**

| Name | Target Datatype |
| ---- | --------------- |

status STRING updated STRING from\_name STRING status\_id NUMERIC object STRING num\_recipients NUMERIC is\_segmented BOOLEAN id STRING sent\_at STRING campaign\_type STRING name STRING created STRING status\_label STRING from\_email STRING subject STRING template\_id STRING lists RECORD excluded\_lists RECORD

**Lists**

Purpose: Get a listing of all of the lists (memberships and subscriptions) in an account.

Source API Documentation  <https://www.klaviyo.com/docs/api/v2/lists>

Replication: Key-Based Replication

Replication Key: created

**Fields**

| Name       | Target Datatype |
| ---------- | --------------- |
| list\_name | STRING          |
| list\_id   | STRING          |

**EmailTemplates**

Purpose: Returns a list of all the campaigns you've created. Each entry is a separate Campaign object.

Source API Documentation  <https://www.klaviyo.com/docs/api/email-templates>

Replication: Key-Based Replication

Replication Key: created

**Fields**

| Name          | Target Datatype |
| ------------- | --------------- |
| is\_writeable | BOOLEAN         |
| updated       | STRING          |
| name          | STRING          |
| created       | STRING          |
| id            | STRING          |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://daton-sarasanalytics.gitbook.io/daton/integrations/data-sources/saas-integrations/klaviyo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
