# ChurnZero schema ERD

Table and field reference for the Fivetran ChurnZero connector.

## Table & Field Reference

### contact_custom

| Column | Type | Keys |
| --- | --- | --- |
| name | Unknown | PK |
| contact_id | Unknown | PK, FK |
| value | Unknown |  |

### contact

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| crm_id | Unknown |  |
| email | Unknown |  |
| external_id | Unknown |  |
| first_name | Unknown |  |
| full_name | Unknown |  |
| last_name | Unknown |  |
| marketing_email_unsubscribed | Unknown |  |
| name | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| tags | Json |  |

### journey_progress

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| journey_id | Unknown | FK |
| journey_instance_id | Unknown | FK |
| begin_date | Unknown |  |
| days_in | Unknown |  |
| days_left | Unknown |  |
| days_over | Unknown |  |
| end_date | Unknown |  |
| evaluation_day | Unknown |  |
| failure_comment | Unknown |  |
| failure_reason | Unknown |  |
| is_completed | Unknown |  |
| is_failed | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| status | Unknown |  |

### task_status

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| is_closed | Unknown |  |
| is_default | Unknown |  |
| name | Unknown |  |

### event_type

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### task_priority

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| is_default | Unknown |  |
| is_high_priority | Unknown |  |
| name | Unknown |  |

### event

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| contact_id | Unknown | FK |
| type_id | Unknown | FK |
| date | Unknown |  |
| description | Unknown |  |
| quantity | Unknown |  |

### journey

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| description | Unknown |  |
| expected_duration | Unknown |  |
| is_active | Unknown |  |
| is_shared_externally | Unknown |  |
| name | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| progress_bottom | Unknown |  |
| progress_top | Unknown |  |
| status | Unknown |  |

### churn_score_factor_calculation

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| churn_score_factor_id | Unknown | FK |
| churn_score_id | Unknown | FK |
| day | Unknown |  |
| score | Unknown |  |

### account_custom

| Column | Type | Keys |
| --- | --- | --- |
| name | Unknown | PK |
| account_id | Unknown | PK, FK |
| value | Unknown |  |

### account

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| parent_account_id | Unknown | FK |
| primary_churn_score_id | Unknown | FK |
| user_account_id | Unknown | FK |
| billing_address_city | Unknown |  |
| billing_address_country | Unknown |  |
| billing_address_line_1 | Unknown |  |
| billing_address_line_2 | Unknown |  |
| billing_address_state | Unknown |  |
| billing_address_zip | Unknown |  |
| contacts_count | Unknown |  |
| crm_id | Unknown |  |
| end_date | Unknown |  |
| external_id | Unknown |  |
| is_active | Unknown |  |
| license_count | Unknown |  |
| name | Unknown |  |
| next_renewal_date | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| parent_next_renewal_date | Unknown |  |
| parent_total_contract_amount | Unknown |  |
| primary_churn_score_value | Unknown |  |
| start_date | Unknown |  |
| tags | Json |  |
| tenure_in_days | Unknown |  |
| total_contract_amount | Unknown |  |
| usage_frequency | Unknown |  |

### journey_milestone_progress

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| journey_id | Unknown | FK |
| journey_instance_id | Unknown | FK |
| journey_milestone_id | Unknown | FK |
| begin_date | Unknown |  |
| days_in | Unknown |  |
| days_left | Unknown |  |
| days_over | Unknown |  |
| end_date | Unknown |  |
| evaluation_day | Unknown |  |
| is_completed | Unknown |  |
| is_failed | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| status | Unknown |  |

### journey_milestone_task

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| journey_milestone_id | Unknown | FK |
| is_conditional | Unknown |  |
| is_externally_visible | Unknown |  |
| is_optional | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| subject | Unknown |  |

### journey_milestone_step_progress

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| journey_id | Unknown | FK |
| journey_instance_id | Unknown | FK |
| journey_milestone_achievement_id | Unknown | FK |
| journey_milestone_id | Unknown | FK |
| journey_milestone_task_id | Unknown | FK |
| task_id | Unknown | FK |
| task_status_id | Unknown | FK |
| is_completed | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |

### survey_response

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| contact_id | Unknown | FK |
| survey_id | Unknown | FK |
| comment | Unknown |  |
| date | Unknown |  |
| follow_up_answer_type | Unknown |  |
| follow_up_question | Unknown |  |
| follow_up_response | Unknown |  |
| next_reminder_date | Unknown |  |
| score | Unknown |  |
| source | Unknown |  |

### journey_milestone

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| journey_id | Unknown | FK |
| description | Unknown |  |
| expected_duration | Unknown |  |
| name | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| progress_bottom | Unknown |  |
| progress_top | Unknown |  |

### user_account

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| avatar_url | Unknown |  |
| can_log_in | Unknown |  |
| crm_id | Unknown |  |
| email | Unknown |  |
| first_name | Unknown |  |
| has_account | Unknown |  |
| is_active | Unknown |  |
| last_name | Unknown |  |
| mobile_phone | Unknown |  |
| name | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| office_phone | Unknown |  |
| title | Unknown |  |
| user_name | Unknown |  |

### churn_score_factor

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| churn_score_id | Unknown | FK |
| name | Unknown |  |
| type | Unknown |  |

### task

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| contact_id | Unknown | FK |
| priority_id | Unknown | FK |
| status_id | Unknown | FK |
| user_account_id | Unknown | FK |
| close_date | Unknown |  |
| comment | Unknown |  |
| crm_id | Unknown |  |
| due_date | Unknown |  |
| is_closed | Unknown |  |
| is_high_priority | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| subject | Unknown |  |
| type | Unknown |  |

### segment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| user_account_id | Unknown | FK |
| entity | Unknown |  |
| is_global | Unknown |  |
| name | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |

### journey_milestone_achievement

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| journey_milestone_id | Unknown | FK |
| is_conditional | Unknown |  |
| is_externally_visible | Unknown |  |
| is_optional | Unknown |  |
| name | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |

### segment_column_set

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| user_account_id | Unknown | FK |
| entity | Unknown |  |
| name | Unknown |  |
| object_created_date | Unknown |  |
| object_last_modified_date | Unknown |  |
| share_type | Unknown |  |

### survey_segment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK, FK |
| survey_id | Unknown | PK, FK |

### survey_follow_up

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| survey_id | Unknown | PK, FK |
| answer_type | Unknown |  |
| question | Unknown |  |

### survey

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| campaign_status | Unknown |  |
| campaign_type | Unknown |  |
| drip_over_month | Unknown |  |
| is_active | Unknown |  |
| name | Unknown |  |
| question | Unknown |  |
| recurring_every_month | Unknown |  |
| settings_answer_type | Unknown |  |
| settings_choice_count | Unknown |  |
| type | Unknown |  |

### churn_score

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| grading_bottom | Unknown |  |
| grading_top | Unknown |  |
| name | Unknown |  |

### churn_score_calculation

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| churn_score_id | Unknown | FK |
| day | Unknown |  |
| is_active | Unknown |  |
| is_primary | Unknown |  |
| score | Unknown |  |

### journey_instance

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| journey_id | Unknown | FK |
| start_date | Unknown |  |

## Relationships

- contact_custom(contact_id) → contact(id)
- contact(account_id) → account(id)
- journey_progress(journey_instance_id) → journey_instance(id)
- journey_progress(journey_id) → journey(id)
- journey_progress(account_id) → account(id)
- event(account_id) → account(id)
- event(contact_id) → contact(id)
- event(type_id) → event_type(id)
- churn_score_factor_calculation(account_id) → account(id)
- churn_score_factor_calculation(churn_score_factor_id) → churn_score_factor(id)
- churn_score_factor_calculation(churn_score_id) → churn_score(id)
- account_custom(account_id) → account(id)
- account(primary_churn_score_id) → churn_score(id)
- account(user_account_id) → user_account(id)
- account(parent_account_id) → account(id)
- journey_milestone_progress(journey_instance_id) → journey_instance(id)
- journey_milestone_progress(journey_milestone_id) → journey_milestone(id)
- journey_milestone_progress(journey_id) → journey(id)
- journey_milestone_progress(account_id) → account(id)
- journey_milestone_task(journey_milestone_id) → journey_milestone(id)
- journey_milestone_step_progress(task_id) → task(id)
- journey_milestone_step_progress(journey_instance_id) → journey_instance(id)
- journey_milestone_step_progress(journey_milestone_achievement_id) → journey_milestone_achievement(id)
- journey_milestone_step_progress(task_status_id) → task_status(id)
- journey_milestone_step_progress(journey_milestone_id) → journey_milestone(id)
- journey_milestone_step_progress(journey_milestone_task_id) → journey_milestone_task(id)
- journey_milestone_step_progress(journey_id) → journey(id)
- journey_milestone_step_progress(account_id) → account(id)
- survey_response(account_id) → account(id)
- survey_response(survey_id) → survey(id)
- survey_response(contact_id) → contact(id)
- journey_milestone(journey_id) → journey(id)
- churn_score_factor(churn_score_id) → churn_score(id)
- task(status_id) → task_status(id)
- task(user_account_id) → user_account(id)
- task(account_id) → account(id)
- task(contact_id) → contact(id)
- task(priority_id) → task_priority(id)
- segment(user_account_id) → user_account(id)
- journey_milestone_achievement(journey_milestone_id) → journey_milestone(id)
- segment_column_set(user_account_id) → user_account(id)
- survey_segment(id) → segment(id)
- survey_segment(survey_id) → survey(id)
- survey_follow_up(survey_id) → survey(id)
- churn_score_calculation(account_id) → account(id)
- churn_score_calculation(churn_score_id) → churn_score(id)
- journey_instance(account_id) → account(id)
- journey_instance(journey_id) → journey(id)
