# Klaviyo schema ERD

Table and field reference for the Fivetran Klaviyo connector.

## Table & Field Reference

### email_template

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created | Instant |  |
| editor_type | String |  |
| html | String |  |
| name | String |  |
| text | String |  |
| updated | Instant |  |

### coupon_code

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| coupon_id | String | FK |
| person_id | String | FK |
| expires_at | Instant |  |
| status | String |  |
| unique_code | String |  |

### flow

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| archived | Boolean |  |
| created | Instant |  |
| name | String |  |
| status | String |  |
| trigger_type | String |  |
| updated | Instant |  |

### segment_person

| Column | Type | Keys |
| --- | --- | --- |
| person_id | String | PK, FK |
| segment_id | String | PK, FK |

### campaign_list

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| list_id | String | PK, FK |
| list_included_or_excluded | String |  |

### form_version

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| form_id | String | FK |
| ab_test_variation_name | String |  |
| created_at | Instant |  |
| form_type | String |  |
| status | String |  |
| updated_at | Instant |  |

### account_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| observed_at | Instant | PK |
| contact_information_default_sender_email | String |  |
| contact_information_default_sender_name | String |  |
| contact_information_organization_name | String |  |
| contact_information_street_address_address_1 | String |  |
| contact_information_street_address_address_2 | String |  |
| contact_information_street_address_city | String |  |
| contact_information_street_address_country | String |  |
| contact_information_street_address_region | String |  |
| contact_information_street_address_zip | String |  |
| contact_information_website_url | String |  |
| industry | String |  |
| locale | String |  |
| preferred_currency | String |  |
| public_api_key | String |  |
| test_account | Boolean |  |
| timezone | String |  |

### campaign_tracking_utm_param

| Column | Type | Keys |
| --- | --- | --- |
| name | String | PK |
| campaign_id | String | PK, FK |
| type | String |  |
| value | String |  |

### list

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created | Instant |  |
| list_name | String |  |
| updated | Instant |  |

### list_exclusion

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| list_id | String | PK, FK |
| created | Instant |  |
| reason | String |  |

### segment_tag

| Column | Type | Keys |
| --- | --- | --- |
| segment_id | String | PK, FK |
| tag_id | String | PK, FK |

### metric

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created | Instant |  |
| integration_category | String |  |
| integration_id | String |  |
| integration_name | String |  |
| integration_object | String |  |
| name | String |  |
| updated | Instant |  |

### segment

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created | Instant |  |
| definition | Json |  |
| name | String |  |
| updated | Instant |  |

### flow_action

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| flow_id | String | FK |
| action_type | String |  |
| created | Instant |  |
| render_options_add_info_link | Boolean |  |
| render_options_add_opt_out_language | Boolean |  |
| render_options_add_org_prefix | Boolean |  |
| render_options_include_contact_card | Boolean |  |
| render_options_shorten_links | Boolean |  |
| send_options_is_transactional | Boolean |  |
| send_options_use_smart_sending | Boolean |  |
| status | String |  |
| tracking_options_add_utm | Boolean |  |
| tracking_options_is_tracking_clicks | Boolean |  |
| tracking_options_is_tracking_opens | Boolean |  |
| updated | Instant |  |

### coupon

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| description | String |  |
| external_id | String |  |

### campaign_message_send_time

| Column | Type | Keys |
| --- | --- | --- |
| datetime | Instant | PK |
| campaign_message_id | String | PK, FK |
| is_local | Boolean |  |

### list_person

| Column | Type | Keys |
| --- | --- | --- |
| list_id | String | PK, FK |
| person_id | String | PK, FK |
| joined_group_at | Instant |  |

### tag_group

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| default | Boolean |  |
| exclusive | Boolean |  |
| name | String |  |

### flow_action_tracking_utm_param

| Column | Type | Keys |
| --- | --- | --- |
| name | String | PK |
| flow_action_id | String | PK, FK |
| value | String |  |

### campaign_tag

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| tag_id | String | PK, FK |

### event

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_id | String | FK |
| flow_id | String | FK |
| flow_message_id | String | FK |
| metric_id | String | FK |
| person_id | String | FK |
| _variation | String |  |
| datetime | Instant |  |
| timestamp | Instant |  |
| type | String |  |
| uuid | String |  |

### tags

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| tag_group_id | String | FK |
| name | String |  |

### flow_tag

| Column | Type | Keys |
| --- | --- | --- |
| flow_id | String | PK, FK |
| tag_id | String | PK, FK |

### list_tag

| Column | Type | Keys |
| --- | --- | --- |
| list_id | String | PK, FK |
| tag_id | String | PK, FK |

### global_exclusion

| Column | Type | Keys |
| --- | --- | --- |
| person_id | String | PK, FK |
| reason | String |  |
| timestamp | Instant |  |

### campaign_message

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_id | String | FK |
| template_id | String | FK |
| channel | String |  |
| content_bcc_email | String |  |
| content_body | String |  |
| content_cc_email | String |  |
| content_from_email | String |  |
| content_from_label | String |  |
| content_media_url | String |  |
| content_preview_text | String |  |
| content_reply_to_email | String |  |
| content_subject | String |  |
| created | Instant |  |
| label | String |  |
| render_options_add_info_link | Boolean |  |
| render_options_add_opt_out_language | Boolean |  |
| render_options_add_org_prefix | Boolean |  |
| render_options_include_contact_card | Boolean |  |
| render_options_shorten_links | Boolean |  |
| updated | Instant |  |

### person

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| address_1 | String |  |
| address_2 | String |  |
| city | String |  |
| country | String |  |
| created | Instant |  |
| email | String |  |
| external_id | String |  |
| first_name | String |  |
| image | String |  |
| ip | String |  |
| last_event_date | Instant |  |
| last_name | String |  |
| latitude | String |  |
| longitude | String |  |
| organization | String |  |
| phone_number | String |  |
| predictive_analytics_average_days_between_orders | Double |  |
| predictive_analytics_average_order_value | Double |  |
| predictive_analytics_churn_probability | Double |  |
| predictive_analytics_expected_date_of_next_order | Instant |  |
| predictive_analytics_historic_clv | Double |  |
| predictive_analytics_historic_number_of_orders | Double |  |
| predictive_analytics_predicted_clv | Double |  |
| predictive_analytics_predicted_number_of_orders | Double |  |
| predictive_analytics_total_clv | Double |  |
| region | String |  |
| subscriptions_email_marketing_can_receive_email_marketing | Boolean |  |
| subscriptions_email_marketing_consent | String |  |
| subscriptions_email_marketing_custom_method_detail | String |  |
| subscriptions_email_marketing_double_optin | String |  |
| subscriptions_email_marketing_last_updated | Instant |  |
| subscriptions_email_marketing_method | String |  |
| subscriptions_email_marketing_method_detail | String |  |
| subscriptions_email_marketing_timestamp | Instant |  |
| subscriptions_mobile_push_marketing_can_receive_push_marketing | Boolean |  |
| subscriptions_mobile_push_marketing_consent | String |  |
| subscriptions_mobile_push_marketing_last_updated | Instant |  |
| subscriptions_mobile_push_marketing_method | String |  |
| subscriptions_mobile_push_marketing_method_detail | String |  |
| subscriptions_mobile_push_marketing_timestamp | Instant |  |
| subscriptions_sms_marketing_can_receive_sms_marketing | Boolean |  |
| subscriptions_sms_marketing_consent | String |  |
| subscriptions_sms_marketing_last_updated | Instant |  |
| subscriptions_sms_marketing_method | String |  |
| subscriptions_sms_marketing_method_detail | String |  |
| subscriptions_sms_marketing_timestamp | Instant |  |
| timezone | String |  |
| title | String |  |
| updated | Instant |  |
| zip | String |  |

### push_token

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| profile_id | String | FK |
| background | String |  |
| created | Instant |  |
| enablement_status | String |  |
| metadata_app_build | String |  |
| metadata_app_id | String |  |
| metadata_app_name | String |  |
| metadata_app_version | String |  |
| metadata_device_id | String |  |
| metadata_device_model | String |  |
| metadata_environment | String |  |
| metadata_klaviyo_sdk | String |  |
| metadata_manufacturer | String |  |
| metadata_os_name | String |  |
| metadata_os_version | String |  |
| metadata_sdk_version | String |  |
| platform | String |  |
| recorded_date | Instant |  |
| token | String |  |
| vendor | String |  |

### flow_message

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| flow_action_id | String | FK |
| template_id | String | FK |
| channel | String |  |
| content_bcc_email | String |  |
| content_cc_email | String |  |
| content_from_email | String |  |
| content_from_label | String |  |
| content_preview_text | String |  |
| content_reply_to_email | String |  |
| content_subject | String |  |
| created | Instant |  |
| name | String |  |
| updated | Instant |  |

### campaign

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| archived | Boolean |  |
| created | Instant |  |
| name | String |  |
| scheduled | Instant |  |
| send_option_ignore_unsubscribes | Boolean |  |
| send_option_use_smart_sending | Boolean |  |
| send_strategy_datetime | Instant |  |
| send_strategy_method | String |  |
| send_strategy_options_is_local | Boolean |  |
| send_strategy_options_send_past_recipients_immediately | Boolean |  |
| send_strategy_options_static_datetime | Instant |  |
| send_strategy_options_static_is_local | Boolean |  |
| send_strategy_options_static_send_past_recipients_immediately | Boolean |  |
| send_strategy_options_sto_date | LocalDate |  |
| send_strategy_options_throttled_datetime | Instant |  |
| send_strategy_options_throttled_throttle_percentage | Double |  |
| send_time | Instant |  |
| status | String |  |
| tracking_options_add_tracking_params | Boolean |  |
| tracking_options_is_add_utm | Boolean |  |
| tracking_options_is_tracking_clicks | Boolean |  |
| tracking_options_is_tracking_opens | Boolean |  |
| updated | Instant |  |

### form

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| ab_test | Boolean |  |
| created_at | Instant |  |
| name | String |  |
| status | String |  |
| updated_at | Instant |  |

## Relationships

- coupon_code(coupon_id) → coupon(id)
- coupon_code(person_id) → person(id)
- segment_person(person_id) → person(id)
- segment_person(segment_id) → segment(id)
- campaign_list(campaign_id) → campaign(id)
- campaign_list(list_id) → list(id)
- form_version(form_id) → form(id)
- campaign_tracking_utm_param(campaign_id) → campaign(id)
- list_exclusion(list_id) → list(id)
- list_exclusion(id) → person(id)
- segment_tag(tag_id) → tags(id)
- segment_tag(segment_id) → segment(id)
- flow_action(flow_id) → flow(id)
- campaign_message_send_time(campaign_message_id) → campaign_message(id)
- list_person(person_id) → person(id)
- list_person(list_id) → list(id)
- flow_action_tracking_utm_param(flow_action_id) → flow_action(id)
- campaign_tag(tag_id) → tags(id)
- campaign_tag(campaign_id) → campaign(id)
- event(metric_id) → metric(id)
- event(campaign_id) → campaign(id)
- event(flow_id) → flow(id)
- event(flow_message_id) → flow_message(id)
- event(person_id) → person(id)
- tags(tag_group_id) → tag_group(id)
- flow_tag(tag_id) → tags(id)
- flow_tag(flow_id) → flow(id)
- list_tag(tag_id) → tags(id)
- list_tag(list_id) → list(id)
- global_exclusion(person_id) → person(id)
- campaign_message(campaign_id) → campaign(id)
- campaign_message(template_id) → email_template(id)
- push_token(profile_id) → person(id)
- flow_message(flow_action_id) → flow_action(id)
- flow_message(template_id) → email_template(id)
