# Klaviyo V2

## Snapshot

| Features                        | Details                                          |
| ------------------------------- | ------------------------------------------------ |
| Release Status                  | Released                                         |
| Source API Version              | v2022-10-17                                      |
| Table Selection                 | Yes                                              |
| Column Selection                | Yes                                              |
| Edit Integration                | Yes                                              |
| Replication Type Selection      | No                                               |
| Authentication Parameters       | Klaviyo API Key                                  |
| Replication Type                | <p>Full Replication<br>Key Based Incremental</p> |
| Replication Key                 | Date Time                                        |
| Suggested Replication Frequency | 1 hour                                           |

## Tables/APIs supported

| Metrics                         | Lists                                    |
| ------------------------------- | ---------------------------------------- |
| Segments                        | Profiles                                 |
| Flows                           | Flow Actions                             |
| Flow Messages                   | Templates                                |
| Active On Site                  | Bounced Email                            |
| Cancelled Order                 | Clicked SMS                              |
| Clicked Email                   | Consented To Receive SMS                 |
| Dropped Email                   | Failed To Deliver Automated Response SMS |
| Failed To Deliver SMS           | Marked Email As Spam                     |
| Merged Profile                  | Opened Email                             |
| Opened Push                     | Placed Order                             |
| Received Automated Response SMS | Received Email                           |
| Received Push                   | Received SMS                             |
| Refunded Order                  | Sent SMS                                 |
| Subscribed To Back In Stock     | Subscribed To List                       |
| Unsubscribed                    | Unsubscribed From List                   |
| Unsubscribed From SMS           | Updated Email Preferences                |

## Integrate Klaviyo with Daton

1. Sign in to Daton&#x20;
2. Select Klaviyo V2 from the list of Integrations&#x20;
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 API Key. Follow this [link](https://docs.sarasanalytics.com/faqs/api-keys/how-to-obtain-klaviyo-api-key) to obtain API key
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

## 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 <a href="#billable-items" id="billable-items"></a>

Purpose: This API is used to fetch all metrics in the account

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_metrics>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Lists

Purpose: This API is used to fetch all lists in the account

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_lists>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Segments

Purpose: This API is used to fetch all segments in the account

Source API Documentation:[ ](https://developers.klaviyo.com/en/reference/get_segments)<https://developers.klaviyo.com/en/reference/get_segments>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Profiles

Purpose: This API is used to fetch all profiles in the account

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_profiles>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Flows

Purpose: This API is used to fetch all flows

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_flows>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Flow Actions

Purpose: This API is used to fetch all flow actions for the flows

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_flow_flow_actions>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Flow Messages

Purpose: This API is used to fetch all flow messages for the flow actions

Source API Documentation:<https://developers.klaviyo.com/en/reference/get_flow_action_messages>

Replication: Full Replication

Replication Key: NA

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Templates

Purpose: This API is used to fetch all templates in the account

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_templates>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Active On Site

Purpose: This API is used to fetch all events of Active On Site metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Bounced Email

Purpose: This API is used to fetch all events of Bounced Email metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

<table><thead><tr><th width="358">Name</th><th>Data Type</th></tr></thead><tbody><tr><td>type</td><td>STRING</td></tr><tr><td>id</td><td>STRING</td></tr><tr><td>attributes</td><td>RECORD</td></tr><tr><td>links</td><td>RECORD</td></tr></tbody></table>

### Cancelled Order

Purpose: This API is used to fetch all events of Cancelled Order metric of Shopify

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Clicked SMS

Purpose: This API is used to fetch all events of Clicked SMS metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Clicked Email

Purpose: This API is used to fetch all events of Clicked Email metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Consented To Receive SMS

Purpose: This API is used to fetch all events of Consented To Receive SMS metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Dropped Email

Purpose: This API is used to fetch all events of Dropped Email metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Failed To Deliver Automated Response SMS

Purpose: This API is used to fetch all events of Failed To Deliver Automated Response SMS metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Failed To Deliver SMS

Purpose: This API is used to fetch all events of Failed To Deliver SMS metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Marked Email As Spam

Purpose: This API is used to fetch all events of Marked Email As Spam metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Merged Profile

Purpose: This API is used to fetch all events of Merged Profile metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Opened Email

Purpose: This API is used to fetch all events of Opened Email metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Opened Push

Purpose: This API is used to fetch all events of Opened Push metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Placed Order

Purpose: This API is used to fetch all events of Placed Order metric of Shopify

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Received Automated Response SMS

Purpose: This API is used to fetch all events of Received Automated Response SMS metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Received Email

Purpose: This API is used to fetch all events of Received Email metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Received Push

Purpose: This API is used to fetch all events of Received Push metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Received SMS

Purpose: This API is used to fetch all events of Received SMS metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Refunded Order

Purpose: This API is used to fetch all events of Refunded Order metric of Shopify

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Sent SMS

Purpose: This API is used to fetch all events of Sent SMS metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Subscribed To Back In Stock

Purpose: This API is used to fetch all events of Subscribed To Back In Stock metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Subscribed To List

Purpose: This API is used to fetch all events of Subscribed To List metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Unsubscribed

Purpose: This API is used to fetch all events of Unsubscribed metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Unsubscribed From List

Purpose: This API is used to fetch all events of Unsubscribed From List metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Unsubscribed From SMS

Purpose: This API is used to fetch all events of Unsubscribed From SMS metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |

### Updated Email Preferences

Purpose: This API is used to fetch all events of Updated Email Preferences metric

Source API Documentation: <https://developers.klaviyo.com/en/reference/get_events>

Replication: Key Based Incremental

Replication Key: greater-or-equal, less-or-equal

**Fields**

| Name       | Data Type |
| ---------- | --------- |
| type       | STRING    |
| id         | STRING    |
| attributes | RECORD    |
| links      | RECORD    |
