# Vitally schema ERD

Table and field reference for the Fivetran Vitally connector.

## Table & Field Reference

### project_template

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| project_category_id | Unknown | FK |
| created_at | Unknown |  |
| description | Unknown |  |
| name | Unknown |  |
| project_name | Unknown |  |
| updated_at | Unknown |  |

### note_user

| Column | Type | Keys |
| --- | --- | --- |
| note_id | Unknown | PK, FK |
| user_id | Unknown | PK, FK |

### note_author

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK, FK |
| note_id | Unknown | PK, FK |
| license_status | Unknown |  |
| name | Unknown |  |

### note_tag

| Column | Type | Keys |
| --- | --- | --- |
| note_tag_id | Unknown | PK |
| note_id | Unknown | PK, FK |

### note

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| note_category_id | Unknown | FK |
| organization_id | Unknown | FK |
| archived_at | Unknown |  |
| created_at | Unknown |  |
| date | Unknown |  |
| external_id | Unknown |  |
| note | Unknown |  |
| subject | Unknown |  |
| updated_at | Unknown |  |
| note_trait_** |  |  |

### project_category

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

### custom_trait

| Column | Type | Keys |
| --- | --- | --- |
| field_type | Unknown | PK |
| id | Unknown | PK |
| created_at | Unknown |  |
| label | Unknown |  |
| path | Unknown |  |
| type | Unknown |  |

### custom_object_field

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| custom_object_id | Unknown | PK, FK |
| created_at | Unknown |  |
| id | Unknown |  |
| label | Unknown |  |
| path | Unknown |  |
| type | Unknown |  |

### custom_object

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| created_at | Unknown |  |
| label | Unknown |  |
| name | Unknown |  |
| sync_active | Unknown |  |
| updated_at | Unknown |  |
| write_mode | Unknown |  |

### conversation_message_to

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| conversation_id | Unknown | PK, FK |
| conversation_message_id | Unknown | PK, FK |
| id | Unknown | FK |
| type | Unknown |  |

### conversation_message_cc

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| conversation_id | Unknown | PK, FK |
| conversation_message_id | Unknown | PK, FK |
| id | Unknown | FK |
| type | Unknown |  |

### conversation_message

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | Unknown | PK |
| id | Unknown | PK |
| from_id | Unknown | FK |
| bcc | Json |  |
| created_at | Unknown |  |
| external_id | Unknown |  |
| from_type | Unknown |  |
| message | Unknown |  |
| time_stamp | Unknown |  |
| type | Unknown |  |
| updated_at | Unknown |  |

### conversation_account

| Column | Type | Keys |
| --- | --- | --- |
| account_id | Unknown | PK, FK |
| conversation_id | Unknown | PK, FK |

### conversation_user

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | Unknown | PK, FK |
| user_id | Unknown | PK, FK |

### conversation_admin

| Column | Type | Keys |
| --- | --- | --- |
| admin_id | Unknown | PK |
| conversation_id | Unknown | PK, FK |
| email | Unknown | FK |
| license_status | Unknown |  |
| name | Unknown |  |

### conversation_organization

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | Unknown | PK, FK |
| organization_id | Unknown | PK, FK |

### conversation

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| created_at | Unknown |  |
| external_id | Unknown |  |
| external_url | Unknown |  |
| source | Unknown |  |
| subject | Unknown |  |
| updated_at | Unknown |  |

### user_account

| Column | Type | Keys |
| --- | --- | --- |
| account_id | Unknown | PK, FK |
| user_id | Unknown | PK, FK |

### user_segment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| user_id | Unknown | PK, FK |
| name | Unknown |  |

### user_trait_site_competitor

| Column | Type | Keys |
| --- | --- | --- |
| site_competitor | Unknown | PK |
| user_id | Unknown | PK, FK |

### users

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| avatar | Unknown |  |
| created_at | Unknown |  |
| deactivated_at | Unknown |  |
| email | Unknown |  |
| external_id | Unknown |  |
| first_known | Unknown |  |
| join_date | Unknown |  |
| last_inbound_message_timestamp | Unknown |  |
| last_outbound_message_timestamp | Unknown |  |
| last_seen_timestamp | Unknown |  |
| name | Unknown |  |
| unsubscribed_from_conversations | Unknown |  |
| unsubscribed_from_conversations_at | Unknown |  |
| updated_at | Unknown |  |
| user_trait_** |  |  |

### nps_response_account

| Column | Type | Keys |
| --- | --- | --- |
| account_id | Unknown | PK, FK |
| nps_response_id | Unknown | PK, FK |
| user_id | Unknown | FK |

### nps_response

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| external_user_id | Unknown | FK |
| user_id | Unknown | FK |
| created_at | Unknown |  |
| dismissed_at | Unknown |  |
| external_id | Unknown |  |
| feedback | Unknown |  |
| responded_at | Unknown |  |
| score | Unknown |  |
| updated_at | Unknown |  |

### task_project

| Column | Type | Keys |
| --- | --- | --- |
| task_project_id | Unknown | PK |
| task_id | Unknown | PK, FK |
| account_id | Unknown | FK |
| organization_id | Unknown | FK |
| project_category_id | Unknown | FK |
| actual_completion_date | Unknown |  |
| actual_start_date | Unknown |  |
| archived_at | Unknown |  |
| created_at | Unknown |  |
| duration_in_days | Unknown |  |
| name | Unknown |  |
| owned_by_vitally_user_id | Unknown |  |
| project_status_id | Unknown |  |
| target_completion_date | Unknown |  |
| target_start_date | Unknown |  |
| updated_at | Unknown |  |
| task_project_trait_** |  |  |

### task_tag

| Column | Type | Keys |
| --- | --- | --- |
| task_tag_id | Unknown | PK |
| task_id | Unknown | PK, FK |

### task

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | FK |
| assigned_to_user_id | Unknown | FK |
| completed_by_user_id | Unknown | FK |
| organization_id | Unknown | FK |
| task_category_id | Unknown | FK |
| archived_at | Unknown |  |
| completed_at | Unknown |  |
| created_at | Unknown |  |
| description | Unknown |  |
| due_date | Unknown |  |
| external_id | Unknown |  |
| name | Unknown |  |
| updated_at | Unknown |  |
| user_license_status | Unknown |  |
| task_trait_** |  |  |

### organization_segment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| organization_id | Unknown | PK, FK |
| name | Unknown |  |

### organization

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_owner_id | Unknown | FK |
| churned_at | Unknown |  |
| created_at | Unknown |  |
| csm_id | Unknown |  |
| external_id | Unknown |  |
| mrr | Unknown |  |
| name | Unknown |  |
| next_renewal_date | Unknown |  |
| segments | Json |  |
| trial_end_date | Unknown |  |
| updated_at | Unknown |  |
| users_count | Unknown |  |
| organization_trait_** |  |  |

### note_category

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

### task_category

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

### account_segment

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

### account_key_role_breakout

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_key_role_id | Unknown | PK, FK |
| key_role_account_id | Unknown | PK, FK |
| created_at | Unknown |  |
| label | Unknown |  |

### account_key_role

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_id | Unknown | PK, FK |
| assigned_at | Unknown |  |
| created_at | Unknown |  |
| vitally_user | Unknown |  |
| vitally_user_license_status | Unknown |  |

### account

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| account_owner_id | Unknown | FK |
| organization_id | Unknown | FK |
| account_executive_id | Unknown |  |
| churned_at | Unknown |  |
| created_at | Unknown |  |
| csm_id | Unknown |  |
| external_id | Unknown |  |
| first_seen_timestamp | Unknown |  |
| health_score | Unknown |  |
| last_inbound_message_timestamp | Unknown |  |
| last_outbound_message_timestamp | Unknown |  |
| last_seen_timestamp | Unknown |  |
| mrr | Unknown |  |
| name | Unknown |  |
| next_renewal_date | Unknown |  |
| nps_detractor_count | Unknown |  |
| nps_passive_count | Unknown |  |
| nps_promoter_count | Unknown |  |
| nps_score | Unknown |  |
| trial_end_date | Unknown |  |
| updated_at | Unknown |  |
| users_count | Unknown |  |
| account_trait_** |  |  |

## Relationships

- project_template(project_category_id) → project_category(id)
- note_user(user_id) → users(id)
- note_user(note_id) → note(id)
- note_author(id) → users(id)
- note_author(note_id) → note(id)
- note_tag(note_id) → note(id)
- note(note_category_id) → note_category(id)
- note(organization_id) → organization(id)
- note(account_id) → account(id)
- custom_object_field(custom_object_id) → custom_object(id)
- conversation_message_to(id) → users(id)
- conversation_message_to(conversation_message_id) → conversation_message(id)
- conversation_message_to(conversation_id) → conversation_message(conversation_id)
- conversation_message_cc(id) → users(id)
- conversation_message_cc(conversation_message_id) → conversation_message(id)
- conversation_message_cc(conversation_id) → conversation_message(conversation_id)
- conversation_message(from_id) → users(id)
- conversation_account(account_id) → account(id)
- conversation_account(conversation_id) → conversation(id)
- conversation_user(user_id) → users(id)
- conversation_user(conversation_id) → conversation(id)
- conversation_admin(email) → users(email)
- conversation_admin(conversation_id) → conversation(id)
- conversation_organization(organization_id) → organization(id)
- conversation_organization(conversation_id) → conversation(id)
- user_account(account_id) → account(id)
- user_account(user_id) → users(id)
- user_segment(user_id) → users(id)
- user_trait_site_competitor(user_id) → users(id)
- nps_response_account(nps_response_id) → nps_response(id)
- nps_response_account(user_id) → users(id)
- nps_response_account(account_id) → account(id)
- nps_response(user_id) → users(id)
- nps_response(external_user_id) → users(external_id)
- task_project(organization_id) → organization(id)
- task_project(account_id) → account(id)
- task_project(project_category_id) → project_category(id)
- task_project(task_id) → task(id)
- task_tag(task_id) → task(id)
- task(completed_by_user_id) → users(id)
- task(organization_id) → organization(id)
- task(task_category_id) → task_category(id)
- task(assigned_to_user_id) → users(id)
- task(account_id) → account(id)
- organization_segment(organization_id) → organization(id)
- organization(account_owner_id) → users(id)
- account_segment(account_id) → account(id)
- account_key_role_breakout(account_key_role_id) → account_key_role(id)
- account_key_role_breakout(key_role_account_id) → account_key_role(account_id)
- account_key_role(account_id) → account(id)
- account(account_owner_id) → users(id)
- account(organization_id) → organization(id)
