# 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

![](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LbJ1eMq5M51cIpU163R%2F-MWRfCBk5hyKYkvLLnBG%2F-MWRfPohOjRvGkNkz3je%2F2021-03-22%20at%208.21%20PM.png?alt=media\&token=e92af9dc-ff38-4790-a41b-0c83fa1d20b1)

**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](https://15515196-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LbJ1eMq5M51cIpU163R%2F-MWRfCBk5hyKYkvLLnBG%2F-MWRg5VNHU_U7nWl9cWS%2F2021-03-22%20at%208.25%20PM.png?alt=media\&token=d47f3763-caa9-4152-9485-51e25b96e86b)

### 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          |
