# Iterable schema ERD

Table and field reference for the Fivetran Iterable connector.

## Table & Field Reference

### event

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| _fivetran_user_id | String | PK, FK |
| campaign_id | Long | FK |
| additional_properties | Json |  |
| content_id | Long |  |
| created_at | Instant |  |
| event_name | String |  |
| ip | String |  |
| is_custom_event | Boolean |  |
| message_bus_id | String |  |
| message_id | String |  |
| message_type_id | Long |  |
| recipient_state | String |  |
| status | String |  |
| transactional_data | Json |  |
| unsub_source | String |  |
| user_agent | String |  |
| user_agent_device | String |  |

### campaign_metrics_weekly

| Column | Type | Keys |
| --- | --- | --- |
| start_date | LocalDate | PK |
| id | Long | PK, FK |
| average_order_value | Double |  |
| end_date | LocalDate |  |
| purchases | Double |  |
| revenue | Double |  |
| revenue_m | Double |  |
| total_app_uninstalls | Double |  |
| total_complaints | Double |  |
| total_email_bounced | Double |  |
| total_email_clicked | Double |  |
| total_email_delivered | Double |  |
| total_email_opens | Double |  |
| total_email_sends | Double |  |
| total_hosted_unsubscribe_clicks | Double |  |
| total_purchases | Double |  |
| total_pushes_bounced | Double |  |
| total_pushes_delivered | Double |  |
| total_pushes_opened | Double |  |
| total_pushes_sent | Double |  |
| total_unsubscribes | Double |  |
| unique_email_bounced | Double |  |
| unique_email_clicks | Double |  |
| unique_email_opens_or_clicks | Double |  |
| unique_hosted_unsubscribe_clicks | Double |  |
| unique_purchases | Double |  |
| unique_pushes_bounced | Double |  |
| unique_pushes_opened | Double |  |
| unique_pushes_sent | Double |  |
| unique_unsubscribes | Double |  |

### campaign_metrics_monthly

| Column | Type | Keys |
| --- | --- | --- |
| start_date | LocalDate | PK |
| id | Long | PK, FK |
| average_order_value | Double |  |
| end_date | LocalDate |  |
| purchases | Double |  |
| revenue | Double |  |
| revenue_m | Double |  |
| total_app_uninstalls | Double |  |
| total_complaints | Double |  |
| total_email_bounced | Double |  |
| total_email_clicked | Double |  |
| total_email_delivered | Double |  |
| total_email_opens | Double |  |
| total_email_sends | Double |  |
| total_hosted_unsubscribe_clicks | Double |  |
| total_purchases | Double |  |
| total_pushes_bounced | Double |  |
| total_pushes_delivered | Double |  |
| total_pushes_opened | Double |  |
| total_pushes_sent | Double |  |
| total_unsubscribes | Double |  |
| unique_email_bounced | Double |  |
| unique_email_clicks | Double |  |
| unique_email_opens_or_clicks | Double |  |
| unique_hosted_unsubscribe_clicks | Double |  |
| unique_purchases | Double |  |
| unique_pushes_bounced | Double |  |
| unique_pushes_opened | Double |  |
| unique_pushes_sent | Double |  |
| unique_unsubscribes | Double |  |

### push_template_history

| Column | Type | Keys |
| --- | --- | --- |
| updated_at | Instant | PK |
| id | Long | PK, FK |
| campaign_id | Long | FK |
| badge | String |  |
| buttons | Json |  |
| cache_data_feed | Boolean |  |
| data_feed_ids | Json |  |
| deeplink_android | String |  |
| deeplink_ios | String |  |
| interruption_level | String |  |
| is_default_locale | Boolean |  |
| is_silent_push | Boolean |  |
| locale | String |  |
| merge_data_feed_context | Boolean |  |
| message | String |  |
| payload | Json |  |
| relevance_score | Double |  |
| rich_media_android | String |  |
| rich_media_ios | String |  |
| sound | String |  |
| title | String |  |
| wake | Boolean |  |

### user_unsubscribed_message_type

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK, FK |
| message_type_id | Long | PK, FK |

### campaign_label_history

| Column | Type | Keys |
| --- | --- | --- |
| label | String | PK |
| campaign_id | Long | PK, FK |
| updated_at | Instant | PK, FK |

### cc_email

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK, FK |
| template_id | Long | PK, FK |

### email_template_history

| Column | Type | Keys |
| --- | --- | --- |
| updated_at | Instant | PK |
| id | Long | PK, FK |
| campaign_id | Long | FK |
| cache_data_feed | Boolean |  |
| data_feed_id | Long |  |
| data_feed_ids | Json |  |
| from_email | String |  |
| from_name | String |  |
| google_analytics_campaign_name | String |  |
| html | String |  |
| is_default_locale | Boolean |  |
| locale | String |  |
| merge_data_feed_context | Boolean |  |
| plain_text | String |  |
| preheader_text | String |  |
| reply_to_email | String |  |
| subject | String |  |

### journey

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| created_at | Instant |  |
| creator_user_id | String |  |
| description | String |  |
| enabled | Boolean |  |
| is_archived | Boolean |  |
| journey_type | String |  |
| lifetime_limit | Long |  |
| name | String |  |
| simultaneous_limit | Long |  |
| start_tile_id | Long |  |
| trigger_event_names | Json |  |
| updated_at | Instant |  |
| draft_** |  |  |

### list

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| created_at | Instant |  |
| description | String |  |
| list_type | String |  |
| name | String |  |

### event_extension

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK, FK |
| _fivetran_user_id | String | PK, FK |
| workflow_id | String | FK |
| app_already_running | Boolean |  |
| badge | String |  |
| browser_token | String |  |
| canonical_url_id | String |  |
| catalog_collection_count | Long |  |
| catalog_lookup_count | Long |  |
| city | String |  |
| clicked_url | String |  |
| content_available | Boolean |  |
| content_id | Long |  |
| country | String |  |
| deeplink_android | String |  |
| deeplink_ios | String |  |
| device | String |  |
| email_id | String |  |
| email_subject | String |  |
| error_code | String |  |
| experiment_id | String |  |
| expires_at | Instant |  |
| from_phone_number | String |  |
| from_phone_number_id | Long |  |
| from_smssender_id | Long |  |
| image_url | String |  |
| in_app_body | String |  |
| is_ghost_push | Boolean |  |
| is_sms_estimation | Boolean |  |
| labels | Json |  |
| link_id | String |  |
| link_url | String |  |
| locale | String |  |
| message_context | Json |  |
| message_status | String |  |
| mms_send_count | Long |  |
| payload | Json |  |
| platform_endpoint | String |  |
| product_recommendation_count | Long |  |
| proxy_source | String |  |
| push_message | String |  |
| reason | String |  |
| region | String |  |
| sms_message | String |  |
| sms_send_count | Long |  |
| sound | String |  |
| to_phone_number | String |  |
| url | String |  |
| web_push_body | Unknown |  |
| web_push_click_action | Unknown |  |
| web_push_icon | Unknown |  |
| web_push_message | String |  |
| workflow_name | String |  |
| sms_provider_response_** |  |  |

### list_user

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| _fivetran_id | String | PK, FK |
| list_id | Long | FK |

### user_unsubscribed_channel

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK, FK |
| channel_id | Long | PK, FK |

### campaign_metrics

| Column | Type | Keys |
| --- | --- | --- |
| date | LocalDate | PK |
| id | Long | PK, FK |
| average_order_value | Double |  |
| purchases | Double |  |
| revenue | Double |  |
| revenue_m | Double |  |
| total_app_uninstalls | Double |  |
| total_complaints | Double |  |
| total_email_bounced | Double |  |
| total_email_clicked | Double |  |
| total_email_delivered | Double |  |
| total_email_opens | Double |  |
| total_email_sends | Double |  |
| total_hosted_unsubscribe_clicks | Double |  |
| total_purchases | Double |  |
| total_pushes_bounced | Double |  |
| total_pushes_delivered | Double |  |
| total_pushes_opened | Double |  |
| total_pushes_sent | Double |  |
| total_unsubscribes | Double |  |
| unique_email_bounced | Double |  |
| unique_email_clicks | Double |  |
| unique_email_opens_or_clicks | Double |  |
| unique_hosted_unsubscribe_clicks | Double |  |
| unique_purchases | Double |  |
| unique_pushes_bounced | Double |  |
| unique_pushes_opened | Double |  |
| unique_pushes_sent | Double |  |
| unique_unsubscribes | Double |  |

### template_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| message_type_id | Long | FK |
| client_template_id | String |  |
| created_at | Instant |  |
| creator_user_id | String |  |
| name | String |  |
| template_type | String |  |

### experiment_metrics

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | Long | PK |
| date | LocalDate | PK |
| experiment_id | Long | PK |
| template_id | Long | PK |
| average_order_value | Double |  |
| confidence | String |  |
| created_by | String |  |
| creation_date | Instant |  |
| improvement | String |  |
| in_app_click_rate | Double |  |
| last_modified | Instant |  |
| name | String |  |
| revenue | Double |  |
| subject | String |  |
| total_in_app_clicks | Double |  |
| total_in_app_closes | Double |  |
| total_in_app_deletes | Double |  |
| total_in_app_holdout | Double |  |
| total_in_app_opens | Double |  |
| total_in_app_send_skips | Double |  |
| total_in_app_sent | Double |  |
| total_in_apps_delivered | Double |  |
| total_inbox_impressions | Double |  |
| total_purchases | Double |  |
| total_unsubscribes | Double |  |
| type | String |  |
| unique_in_app_clicks | Double |  |
| unique_in_app_opens | Double |  |
| unique_in_app_sends | Double |  |
| unique_in_apps_delivered | Double |  |
| unique_purchases | Double |  |
| unique_unsubscribes | Double |  |

### sms_template_history

| Column | Type | Keys |
| --- | --- | --- |
| updated_at | Instant | PK |
| id | Long | PK, FK |
| campaign_id | Long | FK |
| google_analytics_campaign_name | String |  |
| image_url | String |  |
| is_default_locale | Boolean |  |
| locale | String |  |
| message | String |  |
| tracking_domain | String |  |

### bcc_email

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK, FK |
| template_id | Long | PK, FK |

### campaign_list_history

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | Long | PK, FK |
| list_id | Long | PK, FK |
| updated_at | Instant | PK, FK |

### user_device

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| _fivetran_id | String | PK, FK |
| application_name | String |  |
| endpoint_enabled | Boolean |  |
| identifier_for_vendor | String |  |
| localized_model | String |  |
| model | String |  |
| platform | String |  |
| platform_endpoint | String |  |
| system_name | String |  |
| system_version | String |  |
| token | String |  |
| user_interface_idiom | String |  |

### in_app_template_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK, FK |
| updated_at | Instant | PK, FK |
| campaign_id | String | FK |
| expiration_date_time | Instant |  |
| expiration_duration | String |  |
| html | String |  |
| in_app_display_settings | Json |  |
| inbox_metadata | Json |  |
| is_default_locale | Boolean |  |
| locale | String |  |
| payload | Json |  |
| web_in_app_display_settings | Json |  |

### channel

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| channel_type | String |  |
| message_medium | String |  |
| name | String |  |

### list_user_history

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK, FK |
| list_id | Long | PK, FK |
| updated_at | Instant | PK, FK |

### sms_link_param_history

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| value | String | PK |
| template_id | Long | PK, FK |
| updated_at | Instant | PK, FK |

### campaign_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| recurring_campaign_id | Long | FK |
| template_id | Long | FK |
| workflow_id | Long | FK |
| campaign_state | String |  |
| created_at | Instant |  |
| created_by_user_id | String |  |
| ended_at | Instant |  |
| message_medium | String |  |
| name | String |  |
| send_size | Long |  |
| start_at | Instant |  |
| type | String |  |
| updated_by_user_id | String |  |

### user_history

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| updated_at | Instant | PK |
| email | String |  |
| email_list_ids | Json |  |
| first_name | String |  |
| iterable_user_id | String |  |
| last_name | String |  |
| phone_number | String |  |
| phone_number_carrier | String |  |
| phone_number_country_code_iso | String |  |
| phone_number_details | Unknown |  |
| phone_number_line_type | String |  |
| phone_number_updated_at | String |  |
| signup_date | Instant |  |
| signup_source | String |  |
| user_id | String |  |

### campaign_suppression_list_history

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | Long | PK, FK |
| suppressed_list_id | Long | PK, FK |
| updated_at | Instant | PK, FK |

### email_link_param_history

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| value | String | PK |
| template_id | Long | PK, FK |
| updated_at | Instant | PK, FK |

### message_type

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| channel_id | Long | FK |
| created_at | Instant |  |
| frequency_cap | Json |  |
| name | String |  |
| rate_limit_per_minute | Long |  |
| subscription_policy | String |  |
| updated_at | Instant |  |

## Relationships

- event(campaign_id) → campaign_history(id)
- event(_fivetran_user_id) → user_history(_fivetran_id)
- campaign_metrics_weekly(id) → campaign_history(id)
- campaign_metrics_monthly(id) → campaign_history(id)
- push_template_history(campaign_id) → campaign_history(id)
- push_template_history(id) → template_history(updated_at)
- user_unsubscribed_message_type(_fivetran_id) → user_history(_fivetran_id)
- user_unsubscribed_message_type(message_type_id) → message_type(id)
- campaign_label_history(campaign_id) → campaign_history(id)
- campaign_label_history(updated_at) → campaign_history(id)
- cc_email(email) → user_history(email)
- cc_email(template_id) → email_template_history(updated_at)
- email_template_history(campaign_id) → campaign_history(id)
- email_template_history(id) → template_history(updated_at)
- event_extension(workflow_id) → journey(id)
- event_extension(_fivetran_id) → event(_fivetran_id)
- event_extension(_fivetran_user_id) → user_history(_fivetran_id)
- list_user(_fivetran_id) → user_history(_fivetran_id)
- list_user(list_id) → list(id)
- user_unsubscribed_channel(_fivetran_id) → user_history(_fivetran_id)
- user_unsubscribed_channel(channel_id) → channel(id)
- campaign_metrics(id) → campaign_history(id)
- template_history(message_type_id) → message_type(id)
- sms_template_history(campaign_id) → campaign_history(id)
- sms_template_history(id) → template_history(updated_at)
- bcc_email(email) → user_history(email)
- bcc_email(template_id) → email_template_history(updated_at)
- campaign_list_history(list_id) → list(id)
- campaign_list_history(campaign_id) → campaign_history(id)
- campaign_list_history(updated_at) → campaign_history(id)
- user_device(_fivetran_id) → user_history(_fivetran_id)
- in_app_template_history(updated_at) → template_history(updated_at)
- in_app_template_history(campaign_id) → campaign_history(id)
- in_app_template_history(id) → template_history(updated_at)
- list_user_history(list_id) → list(id)
- list_user_history(updated_at) → user_history(_fivetran_id)
- list_user_history(_fivetran_id) → user_history(_fivetran_id)
- sms_link_param_history(template_id) → sms_template_history(updated_at)
- sms_link_param_history(updated_at) → sms_template_history(updated_at)
- campaign_history(template_id) → template_history(updated_at)
- campaign_history(recurring_campaign_id) → campaign_history(id)
- campaign_history(workflow_id) → journey(id)
- campaign_suppression_list_history(suppressed_list_id) → list(id)
- campaign_suppression_list_history(campaign_id) → campaign_history(id)
- campaign_suppression_list_history(updated_at) → campaign_history(id)
- email_link_param_history(template_id) → email_template_history(updated_at)
- email_link_param_history(updated_at) → email_template_history(updated_at)
- message_type(channel_id) → channel(id)
