> For the complete documentation index, see [llms.txt](https://help.daasity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.daasity.com/core-concepts/data-integrations/setup-guides/digital-integrations/klaviyo-v2/integration-specifications.md).

# Integration Specifications

{% hint style="danger" %}
**This documentation is still under construction 🚧**
{% endhint %}

{% hint style="danger" %}
**Data load speeds for Klaviyo are slow**

Klaviyo is an extremely slow endpoint and loading history can take a considerable amount of time if the data volume is high.
{% endhint %}

## Integration Overview

Our Klaviyo extractor pulls information about your Email/SMS profiles, lists, and events so that they can be analyzed alongside your order and marketing data.

## Integration Availability

This integration is available for:

* Enterprise
* Growth

## API Endpoints

This extractor is based on [this documentation](https://developers.klaviyo.com/en/reference/api_overview). The following endpoints are used by Daasity to replicate data:

* [Get Campaigns](https://developers.klaviyo.com/en/reference/get_campaigns)
* [Get Events](https://developers.klaviyo.com/en/reference/get_events)
* [Get Flows](https://developers.klaviyo.com/en/reference/get_flows)
* [Get Lists](https://developers.klaviyo.com/en/reference/get_lists)
* [Get Metrics](https://developers.klaviyo.com/en/reference/get_metrics)
* [Get Profiles](https://developers.klaviyo.com/en/reference/get_profiles)
* [Get Segments](https://developers.klaviyo.com/en/reference/get_segments)
* [Get Tags](https://developers.klaviyo.com/en/reference/get_tags)

## Klaviyo V2 Schema

The Klaviyo V2 extractor creates these tables using the endpoints and replication methods listed. The data is mapped from source API endpoint to the table based on the mapping logic outlined in each table.

* [Campaigns](#campaigns)
* [Campaign Audiences Excluded](#campaign-audiences-excluded)
* [Campaign Audiences Included](#campaign-audiences-included)
* [Campaign Messages](#campaign-messages)
* [Campaign Message Send Times](#campaign-message-send-times)
* [Campaign Tags](#campaign-tags)
* [Custom Events](#custom-events)
* [Events](#events)
* [Event Attributions](#event-attributions)
* [Event Group IDs](#event-group-ids)
* [Flows](#flows)
* [Flow Actions](#flow-actions)
* [Flow Action Messages](#flow-action-messages)
* [Flow Tags](#flow-tags)
* [Lists](#lists)
* [List Profiles](#list-profiles)
* [List Tags](#list-tags)
* [Metrics](#metrics)
* [Member Lists](#member-lists)
* [Profiles](#profiles)
* [Profile Email List Suppressions](#profile-email-list-suppressions)
* [Profile Email Suppressions](#profile-email-suppressions)
* [Segments](#segments)
* [Segment Profiles](#segment-profiles)
* [Segment Tags](#segment-tags)
* [STG Member Lists](#stg-member-lists)
* [Tags](#tags)

### Campaigns

* Endpoint: [Get Campaigns](https://developers.klaviyo.com/en/v2023-09-15/reference/get_campaigns)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.campaigns`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>campaign_id</td></tr><tr><td>data[].attributes.name</td><td>name</td></tr><tr><td>data[].attributes.status</td><td>status</td></tr><tr><td>data[].attributes.archived</td><td>archived</td></tr><tr><td>data[].attributes.channel (no longer populated)</td><td>channel</td></tr><tr><td>data[].attributes.send_options.use_smart_sending</td><td>send_options_use_smart_sending</td></tr><tr><td>data[].attributes.send_options.ignore_unsubscribes</td><td>send_options_ignore_unsubscribes</td></tr><tr><td>data[].attributes.tracking_options.is_tracking_opens</td><td>tracking_options_is_tracking_opens</td></tr><tr><td>data[].attributes.tracking_options.is_tracking_clicks</td><td>tracking_options_is_tracking_clicks</td></tr><tr><td>data[].attributes.tracking_options.is_add_utm (no longer populated)</td><td>tracking_options_is_add_utm</td></tr><tr><td>data[].attributes.tracking_options.add_tracking_params</td><td>tracking_options_add_tracking_params</td></tr><tr><td>data[].attributes.send_strategy.method</td><td>send_strategy_method</td></tr><tr><td>data[].attributes.send_strategy.options_static.datetime, options_throttled.datetime or options.datetime (by send_strategy.method)</td><td>send_strategy_datetime</td></tr><tr><td>data[].attributes.send_strategy.options_static.datetime (no longer populated)</td><td>send_strategy_options_static_datetime</td></tr><tr><td>data[].attributes.send_strategy.options_static.is_local</td><td>send_strategy_options_static_is_local</td></tr><tr><td>data[].attributes.send_strategy.options_static.send_past_recipients_immediately</td><td>send_strategy_options_static_send_past_recipients_immediately</td></tr><tr><td>data[].attributes.send_strategy.options_throttled.datetime (no longer populated)</td><td>send_strategy_options_throttled_datetime</td></tr><tr><td>data[].attributes.send_strategy.options_throttled.throttle_percentage (or send_strategy.throttle_percentage)</td><td>send_strategy_options_throttled_throttle_percentage</td></tr><tr><td>data[].attributes.send_strategy.options_sto.date (no longer populated)</td><td>send_strategy_options_sto_date</td></tr><tr><td>data[].attributes.created_at</td><td>created_at</td></tr><tr><td>data[].attributes.scheduled_at</td><td>scheduled_at</td></tr><tr><td>data[].attributes.updated_at</td><td>updated_at</td></tr><tr><td>data[].attributes.send_time</td><td>send_time</td></tr></tbody></table>

### Campaign Audiences Excluded

* Endpoint: [Get Campaigns](https://developers.klaviyo.com/en/v2023-09-15/reference/get_campaigns)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.campaign_audiences_excluded`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>campaign_id</td></tr><tr><td>data[].attributes.audiences.excluded[]</td><td>audience_id</td></tr></tbody></table>

### Campaign Audiences Included

* Endpoint: [Get Campaigns](https://developers.klaviyo.com/en/v2023-09-15/reference/get_campaigns)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.campaign_audiences_included`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>campaign_id</td></tr><tr><td>data[].attributes.audiences.included[]</td><td>audience_id</td></tr></tbody></table>

### Campaign Messages

* Endpoint: [Get Campaigns](https://developers.klaviyo.com/en/v2023-09-15/reference/get_campaigns)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.campaign_messages`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>included[].type</td><td>campaign_message_type</td></tr><tr><td>included[].id</td><td>campaign_message_id</td></tr><tr><td>included[].attributes.definition.label (or included[].attributes.label)</td><td>label</td></tr><tr><td>included[].attributes.definition.channel (or included[].attributes.channel)</td><td>channel</td></tr><tr><td>included[].attributes.definition.notification_type</td><td>notification_type</td></tr><tr><td>included[].attributes.content.subject</td><td>content_subject</td></tr><tr><td>included[].attributes.content.preview_text</td><td>content_preview_text</td></tr><tr><td>included[].attributes.content.from_email</td><td>content_from_email</td></tr><tr><td>included[].attributes.content.from_label</td><td>content_from_label</td></tr><tr><td>included[].attributes.content.reply_to_email</td><td>content_reply_to_email</td></tr><tr><td>included[].attributes.content.cc_email</td><td>content_cc_email</td></tr><tr><td>included[].attributes.content.bcc_email</td><td>content_bcc_email</td></tr><tr><td>included[].attributes.definition.content.title</td><td>content_title</td></tr><tr><td>included[].attributes.definition.content.body</td><td>content_body</td></tr><tr><td>included[].attributes.definition.content.dynamic_image</td><td>content_dynamic_image</td></tr><tr><td>included[].attributes.definition.options.on_open.type</td><td>options_on_open_type</td></tr><tr><td>included[].attributes.definition.options.on_open.ios_deep_link</td><td>options_on_open_ios_deep_link</td></tr><tr><td>included[].attributes.definition.options.on_open.android_deep_link</td><td>options_on_open_android_deep_link</td></tr><tr><td>included[].attributes.definition.options.badge.display</td><td>options_badge_display</td></tr><tr><td>included[].attributes.definition.options.badge.badge_options.badge_config</td><td>options_badge_config</td></tr><tr><td>included[].attributes.definition.options.play_sound</td><td>options_play_sound</td></tr><tr><td>included[].attributes.render_options.shorten_links</td><td>render_options_shorten_links</td></tr><tr><td>included[].attributes.render_options.add_org_prefix</td><td>render_options_add_org_prefix</td></tr><tr><td>included[].attributes.render_options.add_info_link</td><td>render_options_add_info_link</td></tr><tr><td>included[].attributes.render_options.add_opt_out_language</td><td>render_options_add_opt_out_language</td></tr><tr><td>included[].attributes.created_at</td><td>created_at</td></tr><tr><td>included[].attributes.updated_at</td><td>updated_at</td></tr><tr><td>included[].relationships.campaign.data.type</td><td>campaign_data_type</td></tr><tr><td>included[].relationships.campaign.data.id</td><td>campaign_data_id</td></tr><tr><td>included[].relationships.template.data.type</td><td>template_data_type</td></tr><tr><td>included[].relationships.template.data.id</td><td>template_data_id</td></tr></tbody></table>

### Campaign Message Send Times

* Endpoint: [Get Campaigns](https://developers.klaviyo.com/en/v2023-09-15/reference/get_campaigns)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.campaign_message_send_times`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>included[].id</td><td>campaign_message_id</td></tr><tr><td>included[].relationships.campaign.data.id</td><td>campaign_id</td></tr><tr><td>included[].attributes.send_times[].datetime</td><td>send_time_datetime</td></tr><tr><td>included[].attributes.send_times[].is_local</td><td>send_time_is_local</td></tr></tbody></table>

### Campaign Tags

* Endpoint: [Get Campaigns](https://developers.klaviyo.com/en/v2023-09-15/reference/get_campaigns)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.campaign_tags`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>campaign_id</td></tr><tr><td>data[].relationships.tags.data[].id</td><td>tag_id</td></tr><tr><td>data[].relationships.tags.data[].type</td><td>tag_type</td></tr></tbody></table>

### Custom Events

* Endpoint: [Get Events](https://developers.klaviyo.com/en/reference/get_events)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.custom_events`]

Loaded only for the custom metrics selected in the integration settings. The event properties of a custom metric vary, so they are stored whole as JSON instead of one column each.

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>id</td></tr><tr><td>id of the custom metric configured on the integration</td><td>metric_id</td></tr><tr><td>name of the custom metric configured on the integration</td><td>metric_name</td></tr><tr><td>data[].attributes.timestamp</td><td>timestamp</td></tr><tr><td>data[].attributes.datetime</td><td>event_datetime</td></tr><tr><td>data[].relationships.profile.data.id (included[] profile)</td><td>profile_id</td></tr><tr><td>included[] profile: attributes.email</td><td>profile_email</td></tr><tr><td>data[].attributes.event_properties (whole object, as JSON)</td><td>event_properties</td></tr></tbody></table>

### Events

* Endpoint: [Get Events](https://developers.klaviyo.com/en/reference/get_events)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.events`]

<details>

<summary>❗️Not all events are pulled by our extractor</summary>

In order to speed up extraction of your events data, we only extract data for the following events:

* received email
* received sms
* bounced email
* failed to deliver sms
* clicked email
* clicked sms
* opened email
* marked email as spam
* unsubscribed
* clicked email to unsubscribe
* unsubscribed from email marketing
* unsubscribed from sms marketing
* subscribed to list
* bounced push
* opened push
* received push
* sent sms
* subscribed to email marketing
* subscribed to sms marketing
* unsuppressed from list for email marketing
* added to list
* manually suppressed from email marketing
* manually unsuppressed from email marketing

</details>

<details>

<summary>❗️Some columns in the events table will be NULL</summary>

Some of the event properties in this table exist for only certain types of events.

For example, the `TO_NUMBER` property is available only for the following events: Unsubscribed from SMS Marketing, Received SMS, and Failed to Deliver SMS. Since we can't get that data for *all* event types, the `TO_NUMBER` column value will be NULL for many of your events records.

</details>

<table data-full-width="true"><thead><tr><th width="578">JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].attributes.event_properties.App Build</td><td>APP_BUILD</td></tr><tr><td>data[].attributes.event_properties.App ID</td><td>APP_ID</td></tr><tr><td>data[].attributes.event_properties.App Name</td><td>APP_NAME</td></tr><tr><td>data[].attributes.event_properties.App Version</td><td>APP_VERSION</td></tr><tr><td>data[].attributes.event_properties.$attribution.$attributed_channel (no longer populated, see Event Attributions)</td><td>ATTRIBUTION_ATTRIBUTED_CHANNEL</td></tr><tr><td>data[].attributes.event_properties.$attribution.$attributed_event_id (no longer populated, see Event Attributions)</td><td>ATTRIBUTION_ATTRIBUTED_EVENT_ID</td></tr><tr><td>data[].attributes.event_properties.$attribution.$flow (no longer populated, see Event Attributions)</td><td>ATTRIBUTION_FLOW</td></tr><tr><td>data[].attributes.event_properties.$attribution.$message (no longer populated, see Event Attributions)</td><td>ATTRIBUTION_MESSAGE</td></tr><tr><td>data[].attributes.event_properties.$attribution.$send_ts (no longer populated, see Event Attributions)</td><td>ATTRIBUTION_SEND_TS</td></tr><tr><td>data[].attributes.event_properties.$attribution.$variation (no longer populated, see Event Attributions)</td><td>ATTRIBUTION_VARIATION</td></tr><tr><td>data[].attributes.event_properties.Bounce Type</td><td>BOUNCE_TYPE</td></tr><tr><td>data[].attributes.event_properties.Campaign Name</td><td>CAMPAIGN_NAME</td></tr><tr><td>data[].attributes.event_properties.Carrier Delivery Status</td><td>CARRIER_DELIVERY_STATUS</td></tr><tr><td>data[].attributes.event_properties.Client Canonical</td><td>CLIENT_CANONICAL</td></tr><tr><td>data[].attributes.event_properties.Client Name</td><td>CLIENT_NAME</td></tr><tr><td>data[].attributes.event_properties.Client OS</td><td>CLIENT_OS</td></tr><tr><td>data[].attributes.event_properties.Client OS Family</td><td>CLIENT_OS_FAMILY</td></tr><tr><td>data[].attributes.event_properties.Client Type</td><td>CLIENT_TYPE</td></tr><tr><td>data[].attributes.event_properties.$_cohort$message_send_cohort</td><td>COHORT_MESSAGE_SEND_COHORT</td></tr><tr><td>data[].attributes.event_properties.$_cohort$variation_send_cohort</td><td>COHORT_VARIATION_SEND_COHORT</td></tr><tr><td>data[].attributes.event_properties.Content Type</td><td>CONTENT_TYPE</td></tr><tr><td>data[].attributes.event_properties.custom_method_detail</td><td>CUSTOM_METHOD_DETAIL</td></tr><tr><td>data[].attributes.event_properties.Device ID</td><td>DEVICE_ID</td></tr><tr><td>data[].attributes.event_properties.Device Manufacturer</td><td>DEVICE_MANUFACTURER</td></tr><tr><td>data[].attributes.event_properties.Device Model</td><td>DEVICE_MODEL</td></tr><tr><td>data[].attributes.event_properties.double_optin</td><td>DOUBLE_OPTIN</td></tr><tr><td>data[].attributes.event_properties.email_address</td><td>EMAIL_ADDRESS</td></tr><tr><td>data[].attributes.event_properties.Email Domain</td><td>EMAIL_DOMAIN</td></tr><tr><td>data[].attributes.event_properties.Error Description</td><td>ERROR_DESCRIPTION</td></tr><tr><td>data[].attributes.event_properties.Error Name</td><td>ERROR_NAME</td></tr><tr><td>data[].attributes.event_properties.$ESP</td><td>ESP</td></tr><tr><td>data[].attributes.datetime</td><td>EVENT_DATETIME</td></tr><tr><td>data[].attributes.event_properties.$event_id</td><td>EVENT_ID</td></tr><tr><td>data[].attributes.event_properties.$extra.Android Deep Link</td><td>EXTRA_ANDROID_DEEP_LINK</td></tr><tr><td>data[].attributes.event_properties.$extra.Badge</td><td>EXTRA_BADGE</td></tr><tr><td>data[].attributes.event_properties.$extra.Badge Configuration</td><td>EXTRA_BADGE_CONFIGURATION</td></tr><tr><td>data[].attributes.event_properties.$extra.Badge Value</td><td>EXTRA_BADGE_VALUE</td></tr><tr><td>data[].attributes.event_properties.$extra.$bounce_delivery_info.action_id</td><td>EXTRA_BOUNCE_DELIVERY_INFO_ACTION_ID</td></tr><tr><td>data[].attributes.event_properties.$extra.$bounce_delivery_info.add_exclusion</td><td>EXTRA_BOUNCE_DELIVERY_INFO_ADD_EXCLUSION</td></tr><tr><td>data[].attributes.event_properties.$extra.$bounce_delivery_info.code</td><td>EXTRA_BOUNCE_DELIVERY_INFO_CODE</td></tr><tr><td>data[].attributes.event_properties.$extra.$bounce_delivery_info.ip</td><td>EXTRA_BOUNCE_DELIVERY_INFO_IP</td></tr><tr><td>data[].attributes.event_properties.$extra.$bounce_delivery_info.is_autoresponder</td><td>EXTRA_BOUNCE_DELIVERY_INFO_IS_AUTORESPONDER</td></tr><tr><td>data[].attributes.event_properties.$extra.$bounce_delivery_info.reason</td><td>EXTRA_BOUNCE_DELIVERY_INFO_REASON</td></tr><tr><td>data[].attributes.event_properties.$extra.$bounce_delivery_info.type</td><td>EXTRA_BOUNCE_DELIVERY_INFO_TYPE</td></tr><tr><td>data[].attributes.event_properties.$extra.\_\_\_customer\_merge\_\_\_</td><td>EXTRA_CUSTOMER_MERGE</td></tr><tr><td>data[].attributes.event_properties.$extra.From City</td><td>EXTRA_FROM_CITY</td></tr><tr><td>data[].attributes.event_properties.$extra.From Country</td><td>EXTRA_FROM_COUNTRY</td></tr><tr><td>data[].attributes.event_properties.$extra.From State</td><td>EXTRA_FROM_STATE</td></tr><tr><td>data[].attributes.event_properties.$extra.Inbound Message ID</td><td>EXTRA_INBOUND_MESSAGE_ID</td></tr><tr><td>data[].attributes.event_properties.$extra.iOS Deep Link</td><td>EXTRA_IOS_DEEP_LINK</td></tr><tr><td>data[].attributes.event_properties.$extra.IP Address</td><td>EXTRA_IP_ADDRESS</td></tr><tr><td>data[].attributes.event_properties.$extra.Key-value Pairs</td><td>EXTRA_KEY_VALUE_PAIRS</td></tr><tr><td>data[].attributes.event_properties.$extra.Media URL</td><td>EXTRA_MEDIA_URL</td></tr><tr><td>data[].attributes.event_properties.$extra.Message Body</td><td>EXTRA_MESSAGE_BODY</td></tr><tr><td>data[].attributes.event_properties.$extra.Message ID</td><td>EXTRA_MESSAGE_ID</td></tr><tr><td>data[].attributes.event_properties.$extra.$metadata.recipient_variation_id</td><td>EXTRA_METADATA_RECIPIENT_VARIATION_ID</td></tr><tr><td>data[].attributes.event_properties.$extra.Sound</td><td>EXTRA_SOUND</td></tr><tr><td>data[].attributes.event_properties.Failure Source</td><td>FAILURE_SOURCE</td></tr><tr><td>data[].attributes.event_properties.Failure Type</td><td>FAILURE_TYPE</td></tr><tr><td>data[].attributes.event_properties.$flow</td><td>FLOW</td></tr><tr><td>data[].attributes.event_properties.Flow Action ID</td><td>FLOW_ACTION_ID</td></tr><tr><td>data[].attributes.event_properties.Flow ID</td><td>FLOW_ID</td></tr><tr><td>data[].attributes.event_properties.From Number</td><td>FROM_NUMBER</td></tr><tr><td>data[].attributes.event_properties.From Phone Region</td><td>FROM_PHONE_REGION</td></tr><tr><td>data[].id</td><td>ID</td></tr><tr><td>data[].attributes.event_properties.Inbox Provider</td><td>INBOX_PROVIDER</td></tr><tr><td>data[].attributes.event_properties.Intent 1</td><td>INTENT_1</td></tr><tr><td>data[].attributes.event_properties.Intent 1 Confidence</td><td>INTENT_1_CONFIDENCE</td></tr><tr><td>data[].attributes.event_properties.$internal.send_timestamp</td><td>INTERNAL_SEND_TIMESTAMP</td></tr><tr><td>data[].attributes.event_properties.$internal.vendor</td><td>INTERNAL_VENDOR</td></tr><tr><td>data[].attributes.event_properties.ip</td><td>IP</td></tr><tr><td>data[].attributes.event_properties.Bot Click</td><td>IS_BOT_CLICK</td></tr><tr><td>data[].attributes.event_properties.$klaviyo_bounce_category</td><td>KLAVIYO_BOUNCE_CATEGORY</td></tr><tr><td>data[].attributes.event_properties.List</td><td>LIST</td></tr><tr><td>data[].attributes.event_properties.list_id (or data[].attributes.event_properties.List ID)</td><td>LIST_ID</td></tr><tr><td>data[].attributes.event_properties.list_id (or data[].attributes.event_properties.List ID)</td><td>LIST_NAME</td></tr><tr><td>data[].attributes.event_properties.machine_open</td><td>MACHINE_OPEN</td></tr><tr><td>data[].attributes.event_properties.$message</td><td>MESSAGE</td></tr><tr><td>data[].attributes.event_properties.Message Body</td><td>MESSAGE_BODY</td></tr><tr><td>data[].attributes.event_properties.Message Format</td><td>MESSAGE_FORMAT</td></tr><tr><td>data[].attributes.event_properties.$message_interaction</td><td>MESSAGE_INTERACTION</td></tr><tr><td>data[].attributes.event_properties.Message Name</td><td>MESSAGE_NAME</td></tr><tr><td>data[].attributes.event_properties.Message Title</td><td>MESSAGE_TITLE</td></tr><tr><td>data[].attributes.event_properties.Message Type</td><td>MESSAGE_TYPE</td></tr><tr><td>data[].attributes.event_properties.Method</td><td>METHOD</td></tr><tr><td>data[].attributes.event_properties.method_detail</td><td>METHOD_DETAIL</td></tr><tr><td>data[].relationships.metric.data.id</td><td>METRIC_DATA_ID</td></tr><tr><td>data[].relationships.metric.data.type</td><td>METRIC_DATA_TYPE</td></tr><tr><td>data[].attributes.event_properties.Opt In Type</td><td>OPT_IN_TYPE</td></tr><tr><td>data[].attributes.event_properties.OS Name</td><td>OS_NAME</td></tr><tr><td>data[].attributes.event_properties.OS Version</td><td>OS_VERSION</td></tr><tr><td>data[].attributes.event_properties.phone_number</td><td>PHONE_NUMBER</td></tr><tr><td>data[].relationships.profile.data.id</td><td>PROFILE_DATA_ID</td></tr><tr><td>data[].relationships.profile.data.type</td><td>PROFILE_DATA_TYPE</td></tr><tr><td>included[].attributes.email (the profile in data[].relationships.profile)</td><td>PROFILE_EMAIL</td></tr><tr><td>data[].attributes.event_properties.Push Platform</td><td>PUSH_PLATFORM</td></tr><tr><td>data[].attributes.event_properties.Push Token</td><td>PUSH_TOKEN</td></tr><tr><td>data[].attributes.event_properties.reason</td><td>REASON</td></tr><tr><td>data[].attributes.event_properties.SDK Name</td><td>SDK_NAME</td></tr><tr><td>data[].attributes.event_properties.SDK Version</td><td>SDK_VERSION</td></tr><tr><td>data[].attributes.event_properties.Segment Count</td><td>SEGMENT_COUNT</td></tr><tr><td>data[].attributes.event_properties.Subject</td><td>SUBJECT</td></tr><tr><td>data[].attributes.timestamp</td><td>TIMESTAMP</td></tr><tr><td>data[].attributes.event_properties.To Number</td><td>TO_NUMBER</td></tr><tr><td>data[].attributes.event_properties.To Phone Region</td><td>TO_PHONE_REGION</td></tr><tr><td>data[].type</td><td>TYPE</td></tr><tr><td>data[].attributes.event_properties.Unsubscribe Reason</td><td>UNSUBSCRIBE_REASON</td></tr><tr><td>data[].attributes.event_properties.URL</td><td>URL</td></tr><tr><td>data[].attributes.uuid</td><td>UUID</td></tr><tr><td>data[].attributes.event_properties.$variation</td><td>VARIATION</td></tr><tr><td>data[].attributes.event_properties.Vendor Code</td><td>VENDOR_CODE</td></tr><tr><td>data[].attributes.event_properties.Vendor Error Code</td><td>VENDOR_ERROR_CODE</td></tr><tr><td>data[].attributes.event_properties.Verification ID</td><td>VERIFICATION_ID</td></tr></tbody></table>

### Event Attributions

* Endpoint: [Get Events](https://developers.klaviyo.com/en/reference/get_events)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.event_attributions`]

One row per attribution of an event (fetched with `include=attributions`). The flow and campaign ids come from the attribution's relationships.

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>event_id</td></tr><tr><td>data[].relationships.attributions.data[].id</td><td>attribution_id</td></tr><tr><td>included[] attribution: relationships.attributed-event.data.id</td><td>attributed_event_id</td></tr><tr><td>included[] attribution: relationships.flow.data.id</td><td>flow_id</td></tr><tr><td>included[] attribution: relationships.flow-message.data.id</td><td>flow_message_id</td></tr><tr><td>included[] attribution: relationships.flow-message-variation.data.id</td><td>flow_message_variation_id</td></tr><tr><td>included[] attribution: relationships.campaign.data.id</td><td>campaign_id</td></tr><tr><td>included[] attribution: relationships.campaign-message.data.id</td><td>campaign_message_id</td></tr></tbody></table>

### Event Group IDs

* Endpoint: [Get Events](https://developers.klaviyo.com/en/reference/get_events)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.event_group_ids`]

One row per group id in the event's `$group_ids` property.

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>event_id</td></tr><tr><td>data[].attributes.event_properties.$group_ids[]</td><td>group_id</td></tr></tbody></table>

### Flows

* Endpoint: [Get Flows](https://developers.klaviyo.com/en/v2023-09-15/reference/get_flows)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.flows`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>flow_id</td></tr><tr><td>data[].attributes.name</td><td>name</td></tr><tr><td>data[].attributes.status</td><td>status</td></tr><tr><td>data[].attributes.archived</td><td>archived</td></tr><tr><td>data[].attributes.created</td><td>created</td></tr><tr><td>data[].attributes.updated</td><td>updated</td></tr><tr><td>data[].attributes.trigger_type</td><td>trigger_type</td></tr></tbody></table>

### Flow Actions

* Endpoint: [Get Flows](https://developers.klaviyo.com/en/v2023-09-15/reference/get_flows)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.flow_actions`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>flow_action_id</td></tr><tr><td>data[].relationships.flow.data.id</td><td>flow_id</td></tr><tr><td>data[].attributes.action_type</td><td>action_type</td></tr><tr><td>data[].attributes.status</td><td>status</td></tr><tr><td>data[].attributes.created</td><td>created</td></tr><tr><td>data[].attributes.updated</td><td>updated</td></tr><tr><td>data[].attributes.tracking_options.add_utm</td><td>tracking_options_add_utm</td></tr><tr><td>data[].attributes.tracking_options.utms</td><td>tracking_options_utm_params</td></tr><tr><td>data[].attributes.tracking_options.is_tracking_opens</td><td>tracking_options_is_tracking_opens</td></tr><tr><td>data[].attributes.tracking_options.is_tracking_clicks</td><td>tracking_options_is_tracking_clicks</td></tr><tr><td>data[].attributes.send_options.use_smart_tracking</td><td>send_options_use_smart_tracking</td></tr><tr><td>data[].attributes.send_options.is_transactional</td><td>send_options_is_transactional</td></tr></tbody></table>

### Flow Action Messages

* Endpoint: [Get Flows](https://developers.klaviyo.com/en/v2023-09-15/reference/get_flows)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.flow_action_messages`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data.id</td><td>flow_action_id</td></tr><tr><td>included[].id</td><td>flow_action_message_id</td></tr><tr><td>included[].attributes.name</td><td>name</td></tr><tr><td>included[].attributes.channel</td><td>channel</td></tr><tr><td>included[].attributes.created</td><td>created</td></tr><tr><td>included[].attributes.updated</td><td>updated</td></tr><tr><td>included[].attributes.content.subject</td><td>content_subject</td></tr><tr><td>included[].attributes.content.preview_text</td><td>content_preview_text</td></tr><tr><td>included[].attributes.content.from_email</td><td>content_from_email</td></tr><tr><td>included[].attributes.content.from_label</td><td>content_from_label</td></tr><tr><td>included[].attributes.content.reply_to_email</td><td>content_reply_to_email</td></tr><tr><td>included[].attributes.content.cc_email</td><td>content_cc_email</td></tr><tr><td>included[].attributes.content.bcc_email</td><td>content_bcc_email</td></tr></tbody></table>

### Flow Tags

* Endpoint: [Get Flows](https://developers.klaviyo.com/en/v2023-09-15/reference/get_flows)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.flow_tags`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>flow_id</td></tr><tr><td>data[].relationships.tags.data[].id</td><td>tag_id</td></tr><tr><td>data[].relationships.tags.data[].type</td><td>tag_type</td></tr></tbody></table>

### Lists

* Endpoint: [Get List Profiles](https://developers.klaviyo.com/en/v2023-09-15/reference/get_list_profiles)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.lists`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>list_id</td></tr><tr><td>data[].attributes.name</td><td>name</td></tr><tr><td>data[].attributes.created</td><td>created</td></tr><tr><td>data[].attributes.updated</td><td>updated</td></tr></tbody></table>

### List Profiles

* Endpoint: [Get List Profiles](https://developers.klaviyo.com/en/v2023-09-15/reference/get_list_profiles)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.list_profiles`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>(part of url path, not part of response)</td><td>list_id</td></tr><tr><td>data[].id</td><td>profile_id</td></tr><tr><td>data[].attributes.joined_group_at</td><td>joined_group_at</td></tr></tbody></table>

### List Tags

* Endpoint: [Get List Profiles](https://developers.klaviyo.com/en/v2023-09-15/reference/get_list_profiles)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.list_tags`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>list_id</td></tr><tr><td>data[].relationships.tags.data[].id</td><td>tag_id</td></tr></tbody></table>

### Member Lists

### Metrics

* Endpoint: [Get ](https://developers.klaviyo.com/en/v2023-09-15/reference/get_metrics)[Metrics](https://developers.klaviyo.com/en/v2023-09-15/reference/get_metrics)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.metrics`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>metric_id</td></tr><tr><td>data[].attributes.name</td><td>name</td></tr><tr><td>data[].attributes.created</td><td>created</td></tr><tr><td>data[].attributes.updated</td><td>updated</td></tr><tr><td>data[].attributes.integration.id</td><td>integration_id</td></tr><tr><td>data[].attributes.integration.name</td><td>integration_name</td></tr><tr><td>data[].attributes.integration.category</td><td>integration_category</td></tr></tbody></table>

### Profiles

* Endpoint: [Get Profiles](https://developers.klaviyo.com/en/v2023-09-15/reference/get_profiles)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.profiles`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>profile_id</td></tr><tr><td>data[].attributes.email</td><td>email</td></tr><tr><td>data[].attributes.phone_number</td><td>phone_number</td></tr><tr><td>data[].attributes.external_id</td><td>external_id</td></tr><tr><td>data[].attributes.anonymous_id</td><td>anonymous_id</td></tr><tr><td>data[].attributes.first_name</td><td>first_name</td></tr><tr><td>data[].attributes.last_name</td><td>last_name</td></tr><tr><td>data[].attributes.organization</td><td>organization</td></tr><tr><td>data[].attributes.image</td><td>image</td></tr><tr><td>data[].attributes.created</td><td>created</td></tr><tr><td>data[].attributes.updated</td><td>updated</td></tr><tr><td>data[].attributes.last_event_date</td><td>last_event_date</td></tr><tr><td>data[].attributes.properties</td><td>properties</td></tr><tr><td>data[].attributes.location.address1</td><td>location_address1</td></tr><tr><td>data[].attributes.location.address2</td><td>location_address2</td></tr><tr><td>data[].attributes.location.city</td><td>location_city</td></tr><tr><td>data[].attributes.location.country</td><td>location_country</td></tr><tr><td>data[].attributes.location.latitude</td><td>location_latitude</td></tr><tr><td>data[].attributes.location.longitude</td><td>location_longitude</td></tr><tr><td>data[].attributes.location.region</td><td>location_region</td></tr><tr><td>data[].attributes.location.zip</td><td>location_zip</td></tr><tr><td>data[].attributes.location.timezone</td><td>location_timezone</td></tr><tr><td>data[].attributes.location.ip</td><td>location_ip</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.consent</td><td>email_marketing_consent</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.consent_timestamp</td><td>email_marketing_timestamp</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.can_receive_email_marketing</td><td>email_marketing_can_receive_email_marketing</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.method</td><td>email_marketing_method</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.method_detail</td><td>email_marketing_method_detail</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.custom_method_detail</td><td>email_marketing_custom_method_detail</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.double_optin</td><td>email_marketing_double_optin</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.last_updated</td><td>email_marketing_last_updated</td></tr><tr><td>data[].attributes.subscriptions.sms.marketing.consent</td><td>sms_marketing_consent</td></tr><tr><td>data[].attributes.subscriptions.sms.marketing.consent_timestamp</td><td>sms_marketing_timestamp</td></tr><tr><td>data[].attributes.subscriptions.sms.marketing.can_receive_sms_marketing</td><td>sms_marketing_can_receive_sms_marketing</td></tr><tr><td>data[].attributes.subscriptions.sms.marketing.method</td><td>sms_marketing_method</td></tr><tr><td>data[].attributes.subscriptions.sms.marketing.method_detail</td><td>sms_marketing_method_detail</td></tr><tr><td>data[].attributes.subscriptions.sms.marketing.last_updated</td><td>sms_marketing_last_updated</td></tr><tr><td>data[].attributes.predictive_analytics.historic_clv (only with predictive analytics enabled)</td><td>pa_historic_clv</td></tr><tr><td>data[].attributes.predictive_analytics.predicted_clv (only with predictive analytics enabled)</td><td>pa_predicted_clv</td></tr><tr><td>data[].attributes.predictive_analytics.total_clv (only with predictive analytics enabled)</td><td>pa_total_clv</td></tr><tr><td>data[].attributes.predictive_analytics.historic_number_of_orders (only with predictive analytics enabled)</td><td>pa_historic_number_of_orders</td></tr><tr><td>data[].attributes.predictive_analytics.predicted_number_of_orders (only with predictive analytics enabled)</td><td>pa_predicted_number_of_orders</td></tr><tr><td>data[].attributes.predictive_analytics.average_days_between_orders (only with predictive analytics enabled)</td><td>pa_average_days_between_orders</td></tr><tr><td>data[].attributes.predictive_analytics.average_order_value (only with predictive analytics enabled)</td><td>pa_average_order_value</td></tr><tr><td>data[].attributes.predictive_analytics.churn_probability (only with predictive analytics enabled)</td><td>pa_churn_probability</td></tr><tr><td>data[].attributes.predictive_analytics.expected_date_of_next_order (only with predictive analytics enabled)</td><td>pa_expected_date_of_next_order</td></tr><tr><td>data[].attributes.predictive_analytics.ranked_channel_affinity (JSON; only with predictive analytics enabled)</td><td>pa_ranked_channel_affinity</td></tr></tbody></table>

### Profile Email List Suppressions

* Endpoint: [Get Profiles](https://developers.klaviyo.com/en/v2023-09-15/reference/get_profiles)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.profile_email_list_suppressions`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>profile_id</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.list_suppressions[].reason</td><td>reason</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.list_suppressions[].list_id</td><td>list_id</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.list_suppressions[].timestamp</td><td>timestamp</td></tr></tbody></table>

### Profile Email Suppressions

* Endpoint: [Get Profiles](https://developers.klaviyo.com/en/v2023-09-15/reference/get_profiles)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.profile_email_suppressions`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>profile_id</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.suppression[].reason</td><td>reason</td></tr><tr><td>data[].attributes.subscriptions.email.marketing.suppression[].timestamp</td><td>timestamp</td></tr></tbody></table>

### Segments

* Endpoint: [Get Segments](https://developers.klaviyo.com/en/v2023-09-15/reference/get_segments)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.segments`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>segment_id</td></tr><tr><td>data[].attributes.name</td><td>name</td></tr><tr><td>data[].attributes.created</td><td>created</td></tr><tr><td>data[].attributes.updated</td><td>updated</td></tr></tbody></table>

### Segment Profiles

* Endpoint: [Get ](https://developers.klaviyo.com/en/v2023-09-15/reference/get_profiles)Segment\_Profiles
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.segment_profiles`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>(part of url path, not part of response)</td><td>segment_id</td></tr><tr><td>data[].id</td><td>profile_id</td></tr><tr><td>data[].attributes.joined_group_at</td><td>joined_group_at</td></tr></tbody></table>

### Segment Tags

* Endpoint: [Get Segments](https://developers.klaviyo.com/en/v2023-09-15/reference/get_segments)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.segment_tags`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>segment_id</td></tr><tr><td>data[].relationships.tags.data[].id</td><td>tag_id</td></tr></tbody></table>

### STG Member Lists

### Tags

* Endpoint: [Get Tags](https://developers.klaviyo.com/en/v2023-09-15/reference/get_tags)
* Update Method: UPSERT
* Table Name: \[`klaviyo_v2.tags`]

<table data-full-width="true"><thead><tr><th>JSON Element</th><th>Database Column</th></tr></thead><tbody><tr><td>data[].id</td><td>tag_id</td></tr><tr><td>data[].attributes.name</td><td>name</td></tr></tbody></table>

## Known Limitations & API Behavior

#### Deleted Flow Behavior

When flows are deleted in Klaviyo, the API behavior creates a data synchronization issue between flow metrics and flow metadata.

**API Behavior for Deleted Flows**

When a flow is deleted in Klaviyo:

* Flow-related events and metrics continue to be returned by the Get Events and Get Metrics endpoints
* The Get Flows endpoint returns a 404 error for deleted flow IDs
* Flow IDs remain in the `events` table (specifically in `FLOW` and `ATTRIBUTION_FLOW` columns) but have no corresponding record in the `flows` table

**Impact on Table Relationships**

This creates orphaned records where:

* `events.FLOW` or `events.ATTRIBUTION_FLOW` contains flow IDs that do not exist in `flows.flow_id`
* Flow performance metrics exist without corresponding flow metadata (name, status, trigger\_type, etc.)
* Joins between events and flows tables on flow\_id will return null values for flow attributes

**Data Integration Behavior**

The Daasity extractor handles this scenario by:

* Continuing to extract flow-related events even when flow metadata returns 404
* Skipping flow metadata updates for deleted flows rather than failing the extraction
* Preserving any previously-loaded flow metadata (flows deleted after initial load will retain their last-known metadata)

{% hint style="info" %}
**Important:** This is expected behavior based on Klaviyo's API design and affects all merchants using the Klaviyo V2 integration.
{% endhint %}

#### **Unsubscribe Event History**

Klaviyo does not reliably expose every unsubscribe event through its API (confirmed by Klaviyo directly). A complete, timestamped unsubscribe history cannot be reconstructed from the API data.

**Impact:**

* `UNSUBSCRIBED_AT_EMAIL` in `uns.unique_contacts` may be missing for contacts who have unsubscribed
* Subscriber counts derived from UNS event data will not fully reconcile to subscriber counts reported in the Klaviyo UI, which are based on current profile consent state

Current point-in-time consent status is available in the `email_marketing_consent` and `sms_marketing_consent` columns of `klaviyo_v2.profiles`.

#### **List Membership Sync (Member Lists)**

Syncing list membership is optional and configured per list ID in the integration settings. Behavior to be aware of:

* **Sync speed:** Klaviyo returns 1,000 contacts per API call, so syncs of large lists are slow
* **Additions only:** the extractor detects contacts joining a list but not contacts leaving it. The `member_lists` table reflects who has ever joined the list, not current membership

{% hint style="info" %}
Do not use synced list membership as a current subscriber count. For point-in-time consent status, use the consent fields on `klaviyo_v2.profiles`.
{% endhint %}
