# Mailchimp schema ERD

Table and field reference for the Fivetran Mailchimp connector.

## Table & Field Reference

### segment

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| list_id | String | FK |
| created_at | Instant |  |
| member_count | Int |  |
| name | String |  |
| type | String |  |
| updated_at | Instant |  |

### product_variant

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| product_id | String | PK, FK |
| store_id | String | PK, FK |
| backorders | String |  |
| created_at | Instant |  |
| image_url | String |  |
| inventory_quantity | Int |  |
| price | Double |  |
| sku | String |  |
| title | String |  |
| updated_at | Instant |  |
| url | String |  |
| visibility | String |  |

### list

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| beamer_address | String |  |
| date_created | Instant |  |
| email_type_option | Boolean |  |
| list_rating | Double |  |
| name | String |  |
| notify_on_subscribe | String |  |
| notify_on_unsubscribe | String |  |
| permission_reminder | String |  |
| subscribe_url_long | String |  |
| subscribe_url_short | String |  |
| use_archive_bar | Boolean |  |
| visibility | String |  |
| contact_** |  |  |
| default_** |  |  |

### segment_member

| Column | Type | Keys |
| --- | --- | --- |
| member_id | String | PK, FK |
| segment_id | String | PK, FK |
| list_id | String | FK |

### automation_email

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| automation_id | String | FK |
| archive_url | String |  |
| authenticate | Boolean |  |
| auto_footer | Boolean |  |
| auto_tweet | Boolean |  |
| clicktale | String |  |
| content_type | String |  |
| create_time | Instant |  |
| drag_and_drop | Boolean |  |
| fb_comments | Boolean |  |
| folder_id | String |  |
| from_name | String |  |
| google_analytics | String |  |
| inline_css | Boolean |  |
| position | Int |  |
| reply_to | String |  |
| send_time | Instant |  |
| start_time | Instant |  |
| status | String |  |
| subject_line | String |  |
| template_id | Int |  |
| timewarp | Boolean |  |
| title | String |  |
| to_name | String |  |
| track_ecomm_360 | Boolean |  |
| track_goals | Boolean |  |
| track_html_clicks | Boolean |  |
| track_opens | Boolean |  |
| track_text_clicks | Boolean |  |
| use_conversation | Boolean |  |
| delay_** |  |  |
| report_summary_** |  |  |

### automation_recipient_activity

| Column | Type | Keys |
| --- | --- | --- |
| action | String | PK |
| timestamp | Instant | PK |
| automation_email_id | String | PK, FK |
| member_id | String | PK, FK |
| list_id | String | FK |
| bounce_type | String |  |
| ip | String |  |
| url | String |  |

### orders

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| store_id | String | PK, FK |
| campaign_id | String | FK |
| customer_id | String | FK |
| cancelled_at | Instant |  |
| currency_code | String |  |
| discount_total | Double |  |
| financial_status | String |  |
| fulfillment_status | String |  |
| landing_site | String |  |
| order_total | Double |  |
| order_url | String |  |
| processed_at | Instant |  |
| shipping_total | Double |  |
| tax_total | Double |  |
| tracking_carrier | String |  |
| tracking_code | String |  |
| tracking_number | String |  |
| tracking_url | String |  |
| updated_at | Instant |  |
| billing_address_** |  |  |
| outreach_** |  |  |
| shipping_address_** |  |  |

### promo_code

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| promo_rule | String | PK, FK |
| store_id | String | PK, FK |
| code | String |  |
| created_at | Instant |  |
| enabled | Boolean |  |
| redemption_url | String |  |
| updated_at | Instant |  |
| usage_count | Int |  |

### customer

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| store_id | String | PK, FK |
| address_1 | String |  |
| address_2 | String |  |
| city | String |  |
| company | String |  |
| country | String |  |
| country_code | String |  |
| created_at | Instant |  |
| email_address | String |  |
| first_name | String |  |
| last_name | String |  |
| opt_in_status | Boolean |  |
| orders_count | Int |  |
| postal_code | String |  |
| province | String |  |
| province_code | String |  |
| total_spent | Double |  |
| updated_at | Instant |  |

### tags

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

### campaign_recipient

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| member_id | String | PK, FK |
| list_id | String | FK |
| combination_id | String |  |
| status | String |  |

### store

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| abandoned_browse_automation_id | String | FK |
| abandoned_cart_automation_id | String | FK |
| list_id | String | FK |
| abandoned_browse_automation_is_supported | Boolean |  |
| abandoned_cart_automation_is_supported | Boolean |  |
| address_1 | String |  |
| address_2 | String |  |
| city | String |  |
| connected_site_foreign_id | String |  |
| country | String |  |
| country_code | String |  |
| created_at | Instant |  |
| currency_code | String |  |
| domain | String |  |
| email_address | String |  |
| is_syncing | Boolean |  |
| latitude | Double |  |
| list_is_active | Boolean |  |
| longitude | Double |  |
| money_format | String |  |
| name | String |  |
| phone | String |  |
| platform | String |  |
| postal_code | String |  |
| primary_locale | String |  |
| province | String |  |
| province_code | String |  |
| timezone | String |  |
| updated_at | Instant |  |

### campaign

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| list_id | String | FK |
| segment_id | String | FK |
| winning_campaign_id | String | FK |
| winning_combination_id | String | FK |
| archive_url | String |  |
| authenticate | Boolean |  |
| auto_footer | Boolean |  |
| auto_tweet | Boolean |  |
| clicktale | String |  |
| content_type | String |  |
| create_time | Instant |  |
| drag_and_drop | Boolean |  |
| fb_comments | Boolean |  |
| folder_id | String |  |
| from_name | String |  |
| google_analytics | String |  |
| inline_css | Boolean |  |
| long_archive_url | String |  |
| reply_to | String |  |
| segment_text | String |  |
| send_time | Instant |  |
| status | String |  |
| subject_line | String |  |
| template_id | Int |  |
| test_size | Int |  |
| timewarp | Boolean |  |
| title | String |  |
| to_name | String |  |
| track_ecomm_360 | Boolean |  |
| track_goals | Boolean |  |
| track_html_clicks | Boolean |  |
| track_opens | Boolean |  |
| track_text_clicks | Boolean |  |
| type | String |  |
| use_conversation | Boolean |  |
| wait_time | Int |  |
| winner_criteria | String |  |
| report_summary_** |  |  |

### order_promo_code

| Column | Type | Keys |
| --- | --- | --- |
| promo_code | String | PK |
| order_id | String | PK, FK |
| store_id | String | PK, FK |
| promo_code_amount_discounted | String |  |
| promo_code_type | String |  |

### unsubscribe

| Column | Type | Keys |
| --- | --- | --- |
| list_id | String | PK, FK |
| member_id | String | PK, FK |
| campaign_id | String | FK |
| reason | String |  |
| timestamp | Instant |  |

### campaign_recipient_activity

| Column | Type | Keys |
| --- | --- | --- |
| action | String | PK |
| timestamp | Instant | PK |
| campaign_id | String | PK, FK |
| member_id | String | PK, FK |
| list_id | String | FK |
| bounce_type | String |  |
| combination_id | String |  |
| ip | String |  |
| url | String |  |

### automation

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| list_id | String | FK |
| segment_id | String | FK |
| create_time | Instant |  |
| segment_text | String |  |
| start_time | Instant |  |
| status | String |  |
| title | String |  |
| trigger_settings | Json |  |

### campaign_variate_combination_unsubscribe

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| combination_id | String | PK, FK |
| list_id | String | PK, FK |
| member_id | String | PK, FK |
| reason | String |  |
| unsubscribed_at | Instant |  |

### order_line

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| order_id | String | PK, FK |
| store_id | String | PK, FK |
| product_id | String | FK |
| product_variant_id | String | FK |
| discount | Double |  |
| price | Double |  |
| quantity | Int |  |

### interest

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| category_id | String | FK |
| list_id | String | FK |
| display_order | Int |  |
| name | String |  |
| subscriber_count | String |  |

### cart

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| store_id | String | PK, FK |
| campaign_id | String | FK |
| customer_id | String | FK |
| checkout_url | String |  |
| created_at | Instant |  |
| currency_code | String |  |
| order_total | Double |  |
| tax_total | Double |  |
| updated_at | Instant |  |

### member

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| list_id | String | PK, FK |
| country_code | String |  |
| dstoff | Double |  |
| email_address | String |  |
| email_client | String |  |
| email_type | String |  |
| gmtoff | Double |  |
| ip_opt | String |  |
| ip_signup | String |  |
| language | String |  |
| last_changed | Instant |  |
| latitude | Double |  |
| longitude | Double |  |
| member_rating | Int |  |
| source | String |  |
| status | String |  |
| timestamp_opt | Instant |  |
| timestamp_signup | Instant |  |
| timezone | String |  |
| unique_email_id | String |  |
| unsubscribe_reason | String |  |
| vip | Boolean |  |
| web_id | Int |  |

### product

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| store_id | String | PK, FK |
| currency_code | String |  |
| description | String |  |
| handle | String |  |
| image_url | String |  |
| published_at | Instant |  |
| title | String |  |
| type | String |  |
| url | String |  |
| vendor | String |  |

### interest_member

| Column | Type | Keys |
| --- | --- | --- |
| interest_id | String | PK, FK |
| member_id | String | PK, FK |

### cart_line

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| cart_id | String | PK, FK |
| store_id | String | PK, FK |
| product_id | String | FK |
| product_variant_id | String | FK |
| price | Double |  |
| quantity | Int |  |

### automation_recipient

| Column | Type | Keys |
| --- | --- | --- |
| automation_email_id | String | PK, FK |
| member_id | String | PK, FK |
| list_id | String | FK |
| status | String |  |

### campaign_report

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK, FK |
| list_id | String | FK |
| abuse_reports | Int |  |
| bounces_hard_bounces | Int |  |
| bounces_soft_bounces | Int |  |
| bounces_syntax_errors | Int |  |
| campaign_title | String |  |
| emails_sent | Int |  |
| forwards_forwards_count | Int |  |
| forwards_forwards_opens | Int |  |
| list_is_active | Boolean |  |
| list_name | String |  |
| preview_text | String |  |
| send_time | Instant |  |
| subject_line | String |  |
| type | String |  |
| unsubscribed | Int |  |
| clicks_** |  |  |
| opens_** |  |  |

### interest_category

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| list_id | String | FK |
| display_order | Int |  |
| title | String |  |
| type | String |  |

### tag_member

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

### campaign_variate_combination

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_id | String | FK |
| content_description | String |  |
| from_name | String |  |
| recipients | Int |  |
| reply_to | String |  |
| send_time | Instant |  |
| subject_line | String |  |

### promo_rule

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| store_id | String | PK, FK |
| amount | Double |  |
| created_at | Instant |  |
| description | String |  |
| enabled | Boolean |  |
| ends_at | Instant |  |
| starts_at | Instant |  |
| target | String |  |
| title | String |  |
| type | String |  |
| updated_at | Instant |  |

### campaign_click_report

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_id | String | PK, FK |
| ab_split_a_click_percentage | Double |  |
| ab_split_a_total_clicks | Int |  |
| ab_split_a_unique_click_percentage | Double |  |
| ab_split_a_unique_clicks | Int |  |
| ab_split_b_click_percentage | Double |  |
| ab_split_b_total_clicks | Int |  |
| ab_split_b_unique_click_percentage | Double |  |
| ab_split_b_unique_clicks | Int |  |
| click_percentage | Double |  |
| last_click | Instant |  |
| total_clicks | Int |  |
| unique_click_percentage | Double |  |
| unique_clicks | Int |  |
| url | String |  |

## Relationships

- segment(list_id) → list(id)
- product_variant(product_id) → product(id)
- product_variant(store_id) → store(id)
- segment_member(segment_id) → segment(id)
- segment_member(list_id) → list(id)
- segment_member(member_id) → member(id)
- automation_email(automation_id) → automation(id)
- automation_recipient_activity(member_id) → member(id)
- automation_recipient_activity(list_id) → list(id)
- automation_recipient_activity(automation_email_id) → automation_email(id)
- orders(store_id) → store(id)
- orders(customer_id) → customer(id)
- orders(campaign_id) → campaign(id)
- promo_code(promo_rule) → promo_rule(id)
- promo_code(store_id) → store(id)
- customer(store_id) → store(id)
- tags(list_id) → list(id)
- campaign_recipient(member_id) → member(id)
- campaign_recipient(list_id) → list(id)
- campaign_recipient(campaign_id) → campaign(id)
- store(list_id) → list(id)
- store(abandoned_cart_automation_id) → automation(id)
- store(abandoned_browse_automation_id) → automation(id)
- campaign(list_id) → list(id)
- campaign(segment_id) → segment(id)
- campaign(winning_combination_id) → campaign_variate_combination(id)
- campaign(winning_campaign_id) → campaign(id)
- order_promo_code(order_id) → orders(id)
- order_promo_code(store_id) → store(id)
- unsubscribe(list_id) → list(id)
- unsubscribe(campaign_id) → campaign(id)
- unsubscribe(member_id) → member(id)
- campaign_recipient_activity(member_id) → member(id)
- campaign_recipient_activity(list_id) → list(id)
- campaign_recipient_activity(campaign_id) → campaign(id)
- automation(list_id) → list(id)
- automation(segment_id) → segment(id)
- campaign_variate_combination_unsubscribe(list_id) → list(id)
- campaign_variate_combination_unsubscribe(campaign_id) → campaign(id)
- campaign_variate_combination_unsubscribe(combination_id) → campaign_variate_combination(id)
- campaign_variate_combination_unsubscribe(member_id) → member(id)
- order_line(order_id) → orders(id)
- order_line(store_id) → store(id)
- order_line(product_id) → product(id)
- order_line(product_variant_id) → product_variant(id)
- interest(category_id) → interest_category(id)
- interest(list_id) → list(id)
- cart(store_id) → store(id)
- cart(customer_id) → customer(id)
- cart(campaign_id) → campaign(id)
- member(list_id) → list(id)
- product(store_id) → store(id)
- interest_member(interest_id) → interest(id)
- interest_member(member_id) → member(id)
- cart_line(cart_id) → cart(id)
- cart_line(store_id) → store(id)
- cart_line(product_id) → product(id)
- cart_line(product_variant_id) → product_variant(id)
- automation_recipient(member_id) → member(id)
- automation_recipient(list_id) → list(id)
- automation_recipient(automation_email_id) → automation_email(id)
- campaign_report(id) → campaign(id)
- campaign_report(list_id) → list(id)
- interest_category(list_id) → list(id)
- tag_member(tag_id) → tags(id)
- tag_member(member_id) → member(id)
- campaign_variate_combination(campaign_id) → campaign(id)
- promo_rule(store_id) → store(id)
- campaign_click_report(campaign_id) → campaign(id)
