# Reply.io schema ERD

Table and field reference for the Fivetran Reply.io connector.

## Table & Field Reference

### contact

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| email | String | PK, FK |
| adding_date | Unknown |  |
| city | String |  |
| company | String |  |
| company_size | String |  |
| country | String |  |
| custom_field | Json |  |
| first_name | String |  |
| industry | String |  |
| last_name | String |  |
| linked_in_profile | String |  |
| linked_in_recruiter_url | String |  |
| notes | String |  |
| phone | String |  |
| phone_status | String |  |
| sales_navigation_url | String |  |
| state | String |  |
| time_zone_id | String |  |
| title | String |  |

### contact_statistic_campaign_email

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | Long | PK, FK |
| step_num | Long | PK, FK |
| contact_statistic_id | Long | FK |
| bounced | Boolean |  |
| date | Instant |  |
| opened | Boolean |  |
| replied | Boolean |  |

### contact_statistic_campaign

| Column | Type | Keys |
| --- | --- | --- |
| contact_statistic_id | Long | PK, FK |
| id | Long | PK, FK |
| inbox_state | String |  |
| person_status | String |  |
| reply_date | Instant |  |
| reply_text | String |  |
| status | String |  |

### contact_statistic

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| email | String | FK |
| is_blocked | Boolean |  |
| is_opted_out | Boolean |  |

### email_account

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK |
| id | Long | PK |
| sender_name | String |  |
| signature | String |  |

### contact_per_campaign

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | Long | PK, FK |
| id | Long | PK, FK |

### email_template_attachment

| Column | Type | Keys |
| --- | --- | --- |
| attachment_id | Unknown | PK |
| campaign_step_template_id | Long | PK, FK |
| campaign_id | Long | FK |

### campaign_step_template

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| campaign_id | Long | FK |
| campaign_step_id | Long | FK |
| body | String |  |
| cc_list | String |  |
| email_template_id | String |  |
| email_template_name | String |  |
| subject | String |  |

### campaign_step

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| campaign_id | Long | FK |
| in_minutes_count | Long |  |
| number | Long |  |

### template

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| body | String |  |
| category_id | Long |  |
| name | String |  |
| subject | String |  |
| type | Unknown |  |

### campaign_schedule

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| is_default | Boolean |  |
| name | String |  |
| timezone_id | String |  |

### campaign_time_range

| Column | Type | Keys |
| --- | --- | --- |
| campaign_schedule_id | Unknown | PK |
| type | Unknown | PK |
| week_day | Unknown | PK |
| from_time_hour | Long |  |
| from_time_minute | Long |  |
| to_time_hour | Long |  |
| to_time_minute | Long |  |

### campaign_timing

| Column | Type | Keys |
| --- | --- | --- |
| campaign_schedule_id | Unknown | PK |
| type | Unknown | PK |
| week_day | String | PK |
| is_active | Boolean |  |

### campaign

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| email | String | FK |
| bounces_count | Long |  |
| created | Unknown |  |
| deliveries_count | Long |  |
| name | String |  |
| opens_count | Long |  |
| opt_outs_count | Long |  |
| out_of_office_count | Long |  |
| owner_email | String |  |
| people_active | Long |  |
| people_count | Long |  |
| people_finished | Long |  |
| people_paused | Long |  |
| replies_count | Long |  |

### email_sent

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK, FK |
| id | Long | PK, FK |
| email_account_id | Unknown | FK |
| sent_email_id | Unknown | FK |
| email_from | Unknown |  |
| sent_email_date | Unknown |  |
| sent_email_message_id | Unknown |  |
| sent_email_variant | Unknown |  |
| sent_message_url | Unknown |  |

### email_replied

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK, FK |
| id | Long | PK, FK |
| email_account_id | Unknown | FK |
| sent_email_id | Unknown | FK |
| reason | Unknown |  |
| reply_date | Unknown |  |
| reply_message_id | Unknown |  |
| reply_message_url | Unknown |  |

### contact_called

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK, FK |
| id | Long | PK, FK |
| disposition | Unknown |  |
| duration | Unknown |  |
| from_number | Unknown |  |
| notes | Unknown |  |
| recording_url | Unknown |  |
| resolution | Unknown |  |

### email_opened

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK, FK |
| id | Long | PK, FK |
| email_account_id | Unknown | FK |
| sent_email_id | Unknown | FK |
| email_open_date | Unknown |  |
| opens_count | Unknown |  |
| sent_email_message_id | Unknown |  |

### contact_opted_out

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK, FK |
| id | Long | PK, FK |
| prospect_opt_out_date | Unknown |  |

### contact_finished

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK, FK |
| id | Long | PK, FK |
| finish_reason | Unknown |  |
| finished_date | Unknown |  |

## Relationships

- contact(email) → email_account(email)
- contact_statistic_campaign_email(step_num) → campaign_step(number)
- contact_statistic_campaign_email(campaign_id) → contact_statistic_campaign(id)
- contact_statistic_campaign_email(contact_statistic_id) → contact_statistic_campaign(contact_statistic_id)
- contact_statistic_campaign(id) → campaign(id)
- contact_statistic_campaign(contact_statistic_id) → contact_statistic(id)
- contact_statistic(email) → contact(email)
- contact_per_campaign(id) → contact(id)
- contact_per_campaign(campaign_id) → campaign(id)
- email_template_attachment(campaign_step_template_id) → campaign_step_template(id)
- email_template_attachment(campaign_id) → campaign_step(campaign_id)
- campaign_step_template(campaign_id) → campaign_step(campaign_id)
- campaign_step_template(campaign_step_id) → campaign_step(id)
- campaign_step(campaign_id) → campaign(id)
- campaign(email) → email_account(email)
- email_sent(sent_email_id) → email_account(id)
- email_sent(id) → contact(id)
- email_sent(email) → contact(email)
- email_sent(email_account_id) → email_account(id)
- email_replied(id) → contact(id)
- email_replied(email) → contact(email)
- email_replied(sent_email_id) → email_account(id)
- email_replied(email_account_id) → email_account(id)
- contact_called(id) → contact(id)
- contact_called(email) → contact(email)
- email_opened(id) → contact(id)
- email_opened(email) → contact(email)
- email_opened(sent_email_id) → email_account(id)
- email_opened(email_account_id) → email_account(id)
- contact_opted_out(id) → contact(id)
- contact_opted_out(email) → contact(email)
- contact_finished(id) → contact(id)
- contact_finished(email) → contact(email)
