# Help Scout schema ERD

Table and field reference for the Fivetran Help Scout connector.

## Table & Field Reference

### customer_social_profile_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| customer_id | Long | PK, FK |
| customer_updated_at | Instant | PK, FK |
| type | String |  |
| value | String |  |

### customer_email_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| customer_id | Long | PK, FK |
| customer_updated_at | Instant | PK, FK |
| type | String |  |
| value | String |  |

### customer_phone_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| customer_id | Long | PK, FK |
| customer_updated_at | Instant | PK, FK |
| type | String |  |
| value | String |  |

### customer_chat_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| customer_id | Long | PK, FK |
| customer_updated_at | Instant | PK, FK |
| type | String |  |
| value | String |  |

### customer_website_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| customer_id | Long | PK, FK |
| customer_updated_at | Instant | PK, FK |
| value | String |  |

### customer_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| address_city | String |  |
| address_country | String |  |
| address_postal_code | String |  |
| address_state | String |  |
| age | String |  |
| background | String |  |
| created_at | Instant |  |
| first_name | String |  |
| gender | String |  |
| job_title | String |  |
| last_name | String |  |
| location | String |  |
| organization | String |  |
| photo_type | String |  |
| photo_url | String |  |
| custom_** |  |  |

### team_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| created_at | Instant |  |
| email | String |  |
| first_name | String |  |
| last_name | String |  |
| photo_url | String |  |
| role | String |  |
| timezone | String |  |

### conversation_tag_history

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | Long | PK, FK |
| conversation_updated_at | Instant | PK, FK |
| tag_id | Long | PK, FK |

### conversation_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| folder_id | Long | FK |
| mailbox_id | Long | FK |
| closed_at | Instant |  |
| closed_by | Long |  |
| created_at | Instant |  |
| customer_waiting_since_friendly | String |  |
| customer_waiting_since_latest_reply_from | String |  |
| customer_waiting_since_time | Instant |  |
| number | Long |  |
| preview | String |  |
| primary_customer_id | Long |  |
| source_type | String |  |
| source_via | String |  |
| state | String |  |
| status | String |  |
| subject | String |  |
| threads | Long |  |
| type | String |  |
| custom_** |  |  |

### mailbox_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| created_at | Instant |  |
| email | String |  |
| name | String |  |
| slug | String |  |

### doc_report_popular_search

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| doc_report_fivetran_id | Unknown | PK, FK |
| count | Unknown |  |
| doc_report_end_date | Unknown |  |
| doc_report_start_date | Unknown |  |
| id | Unknown |  |
| result | Unknown |  |

### doc_report_failed_search

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| doc_report_fivetran_id | Unknown | PK, FK |
| count | Unknown |  |
| doc_report_end_date | Unknown |  |
| doc_report_start_date | Unknown |  |
| id | Unknown |  |

### doc_report_top_article

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| doc_report_fivetran_id | Unknown | PK, FK |
| collection_id | Unknown |  |
| count | Unknown |  |
| doc_report_end_date | Unknown |  |
| doc_report_start_date | Unknown |  |
| id | Unknown |  |
| name | Unknown |  |
| site_id | Unknown |  |

### doc_report_top_category

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| doc_report_fivetran_id | Unknown | PK, FK |
| article | Unknown |  |
| count | Unknown |  |
| doc_report_end_date | Unknown |  |
| doc_report_start_date | Unknown |  |
| id | Unknown |  |
| name | Unknown |  |
| site_id | Unknown |  |

### doc_report

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| browse_action | Unknown |  |
| doc_viewed_per_visit | Unknown |  |
| end_date | Unknown |  |
| failed_result | Unknown |  |
| found_an_answer_result | Unknown |  |
| search_action | Unknown |  |
| sent_an_email_result | Unknown |  |
| start_date | Unknown |  |
| visitor | Unknown |  |

### tag_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| color | String |  |
| created_at | Instant |  |
| name | String |  |
| slug | Unknown |  |
| ticket_count | Int |  |

### mailbox_folder_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| mailbox_id | Long | PK, FK |
| active_count | Long |  |
| name | String |  |
| total_count | Long |  |
| type | String |  |
| user_id | Long |  |

### team_user_history

| Column | Type | Keys |
| --- | --- | --- |
| team_id | Long | PK, FK |
| team_updated_at | Instant | PK, FK |
| user_id | Long | PK, FK |

### mailbox_workflow_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| mailbox_id | Long | PK, FK |
| created_at | Instant |  |
| name | String |  |
| orders | Long |  |
| status | String |  |
| type | String |  |

### user_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| updated_at | Instant | PK |
| created_at | Instant |  |
| email | String |  |
| first_name | String |  |
| last_name | String |  |
| photo_url | String |  |
| role | String |  |
| timezone | String |  |

### conversation_thread_attachment_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| conversation_id | Long | PK, FK |
| conversation_thread_id | Long | PK, FK |
| conversation_updated_at | Instant | PK, FK |
| filename | String |  |
| hash | String |  |
| height | Long |  |
| mime_type | String |  |
| size | Long |  |
| url | String |  |
| width | Long |  |

### conversation_thread_bcc_history

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK |
| conversation_id | Long | PK, FK |
| conversation_thread_id | Long | PK, FK |
| conversation_updated_at | Instant | PK, FK |

### conversation_thread_to_history

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK |
| conversation_id | Long | PK, FK |
| conversation_thread_id | Long | PK, FK |
| conversation_updated_at | Instant | PK, FK |

### conversation_thread_cc_history

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK |
| conversation_id | Long | PK, FK |
| conversation_thread_id | Long | PK, FK |
| conversation_updated_at | Instant | PK, FK |

### conversation_thread_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| conversation_id | Long | PK, FK |
| conversation_updated_at | Instant | PK, FK |
| created_by_customer_id | Long | FK |
| created_by_user_id | Long | FK |
| action_text | String |  |
| action_type | String |  |
| assigned_to_id | Long |  |
| body | String |  |
| created_at | Instant |  |
| created_by_type | String |  |
| customer_id | Long |  |
| opened_at | Instant |  |
| saved_reply_id | Long |  |
| source_type | String |  |
| source_via | String |  |
| state | String |  |
| status | String |  |
| type | String |  |

### happiness_rating

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | Long | PK |
| rating_created_at | Instant | PK |
| rating_customer_id | Long | PK |
| number | Long |  |
| rating_comment | String |  |
| rating_customer_name | String |  |
| rating_id | Long |  |
| rating_user_id | Long |  |
| rating_user_name | String |  |
| thread_created_at | Instant |  |
| thread_id | Long |  |
| type | String |  |

## Relationships

- customer_social_profile_history(customer_id) → customer_history(id)
- customer_social_profile_history(customer_updated_at) → customer_history(updated_at)
- customer_email_history(customer_id) → customer_history(id)
- customer_email_history(customer_updated_at) → customer_history(updated_at)
- customer_phone_history(customer_id) → customer_history(id)
- customer_phone_history(customer_updated_at) → customer_history(updated_at)
- customer_chat_history(customer_id) → customer_history(id)
- customer_chat_history(customer_updated_at) → customer_history(updated_at)
- customer_website_history(customer_id) → customer_history(id)
- customer_website_history(customer_updated_at) → customer_history(updated_at)
- conversation_tag_history(tag_id) → tag_history(id)
- conversation_tag_history(conversation_id) → conversation_history(id)
- conversation_tag_history(conversation_updated_at) → conversation_history(updated_at)
- conversation_history(folder_id) → mailbox_folder_history(id)
- conversation_history(mailbox_id) → mailbox_history(id)
- doc_report_popular_search(doc_report_fivetran_id) → doc_report(_fivetran_id)
- doc_report_failed_search(doc_report_fivetran_id) → doc_report(_fivetran_id)
- doc_report_top_article(doc_report_fivetran_id) → doc_report(_fivetran_id)
- doc_report_top_category(doc_report_fivetran_id) → doc_report(_fivetran_id)
- mailbox_folder_history(mailbox_id) → mailbox_history(id)
- team_user_history(user_id) → user_history(id)
- team_user_history(team_id) → team_history(id)
- team_user_history(team_updated_at) → team_history(updated_at)
- mailbox_workflow_history(mailbox_id) → mailbox_history(id)
- conversation_thread_attachment_history(conversation_id) → conversation_thread_history(conversation_id)
- conversation_thread_attachment_history(conversation_updated_at) → conversation_thread_history(conversation_updated_at)
- conversation_thread_attachment_history(conversation_thread_id) → conversation_thread_history(id)
- conversation_thread_bcc_history(conversation_id) → conversation_thread_history(conversation_id)
- conversation_thread_bcc_history(conversation_updated_at) → conversation_thread_history(conversation_updated_at)
- conversation_thread_bcc_history(conversation_thread_id) → conversation_thread_history(id)
- conversation_thread_to_history(conversation_id) → conversation_thread_history(conversation_id)
- conversation_thread_to_history(conversation_updated_at) → conversation_thread_history(conversation_updated_at)
- conversation_thread_to_history(conversation_thread_id) → conversation_thread_history(id)
- conversation_thread_cc_history(conversation_id) → conversation_thread_history(conversation_id)
- conversation_thread_cc_history(conversation_updated_at) → conversation_thread_history(conversation_updated_at)
- conversation_thread_cc_history(conversation_thread_id) → conversation_thread_history(id)
- conversation_thread_history(created_by_user_id) → user_history(id)
- conversation_thread_history(created_by_customer_id) → customer_history(id)
- conversation_thread_history(conversation_id) → conversation_history(id)
- conversation_thread_history(conversation_updated_at) → conversation_history(updated_at)
