# Kustomer schema ERD

Table and field reference for the Fivetran Kustomer connector.

## Table & Field Reference

### queue

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| modified_by | String | FK |
| created_at | Instant |  |
| description | String |  |
| display_name | String |  |
| item_size | Int |  |
| name | String |  |
| org_id | String |  |
| priority | Int |  |
| restrict_transfers_by_users | Boolean |  |
| system | Boolean |  |
| updated_at | Instant |  |

### note_user_mention

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

### message

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| conversation_id | String | FK |
| created_by | String | FK |
| customer_id | String | FK |
| first_company_id | String | FK |
| modified_by | String | FK |
| redacted_by | String | FK |
| app | String |  |
| auto | Boolean |  |
| channel | String |  |
| created_at | Instant |  |
| direction | String |  |
| direction_type | String |  |
| external_id | String |  |
| first_company_name | String |  |
| first_delivered_client_type | String |  |
| first_delivered_timestamp | String |  |
| modified_at | Instant |  |
| org_id | String |  |
| preview | String |  |
| redacted | Boolean |  |
| redacted_at | Instant |  |
| response_business_time | Long |  |
| response_time | Long |  |
| sent_at | Instant |  |
| size | Int |  |
| source | String |  |
| status | String |  |
| subject | String |  |
| updated_at | Instant |  |

### company_location

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| company_id | String | PK, FK |
| address | String |  |
| address_2 | String |  |
| address_3 | String |  |
| area_code | String |  |
| city_name | String |  |
| country_code | String |  |
| country_name | String |  |
| latitude | Double |  |
| longitude | Double |  |
| name | String |  |
| region_code | String |  |
| region_name | String |  |
| type | String |  |
| zip_code | String |  |

### sla

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| created_at | Instant |  |
| current_version | Int |  |
| org_id | String |  |

### customer_shared_external_link

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| external_id | String |  |
| verified | Boolean |  |

### customer_shared_email

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| email | String |  |
| type | String |  |
| verified | Boolean |  |

### user

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| modified_by | String | FK |
| created_at | Instant |  |
| deleted | Boolean |  |
| deleted_at | Instant |  |
| display_name | String |  |
| email | String |  |
| email_signature | String |  |
| mobile | String |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| updated_at | Instant |  |
| user_type | String |  |

### message_assigned_team

| Column | Type | Keys |
| --- | --- | --- |
| message_id | String | PK, FK |
| team_id | String | PK, FK |

### snooze

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| modified_by | String | FK |
| created_at | Instant |  |
| enabled | Boolean |  |
| name | String |  |
| org_id | String |  |
| time_day_type | String |  |
| time_day_value | String |  |
| time_relative | Int |  |
| time_value | String |  |
| updated_at | Instant |  |

### note_team_mention

| Column | Type | Keys |
| --- | --- | --- |
| note_id | String | PK, FK |
| team_id | String | PK, FK |

### conversation_time_channel

| Column | Type | Keys |
| --- | --- | --- |
| channel | String | PK, FK |
| conversation_id | String | PK, FK |
| conversation_time_id | String | PK, FK |

### user_role

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| user_id | String | PK, FK |
| name | String |  |

### sla_metric

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| sla_id | String | FK |
| sla_version_id | String | FK |
| commitment | Long |  |
| enabled | Boolean |  |
| name | String |  |
| priority | Int |  |

### customer_shared_whatsapp

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| phone | String |  |
| type | String |  |
| verified | Boolean |  |

### shortcut

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| deleted_by | String | FK |
| modified_by | String | FK |
| conversation_name | String |  |
| conversation_snooze_id | String |  |
| conversation_status | String |  |
| created_at | Instant |  |
| deleted | Boolean |  |
| deleted_at | Instant |  |
| is_private | Boolean |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| updated_at | Instant |  |

### assistant

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| modified_by | String | FK |
| avatar_url | String |  |
| channel | String |  |
| created_at | Instant |  |
| description | String |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| public_id | String |  |
| public_name | String |  |
| start | String |  |
| status | String |  |
| template | String |  |
| type | String |  |
| updated_at | Instant |  |
| version | Long |  |

### conversation_tag_history

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

### conversation_assigned_team_history

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | String | PK, FK |
| team_id | String | PK, FK |

### message_attachment

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| message_id | String | FK |
| content_length | Int |  |
| content_type | String |  |
| name | String |  |
| org_id | String |  |
| redacted | Boolean |  |
| related | String |  |
| self | String |  |

### notification

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| user_id | String | FK |
| created_at | Instant |  |
| name | String |  |
| org_id | String |  |
| status | String |  |
| updated_at | Instant |  |

### conversation_channel_history

| Column | Type | Keys |
| --- | --- | --- |
| name | String | PK |
| conversation_id | String | PK, FK |

### assistant_dialog

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| assistant_id | String | PK, FK |
| name | String |  |

### card_context

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| card_id | String | PK, FK |
| name | String |  |

### brand

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| modified_by | String | FK |
| created_at | Instant |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| updated_at | Instant |  |

### conversation_channel

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| conversation_id | String | PK, FK |
| name | String |  |

### message_shortcut

| Column | Type | Keys |
| --- | --- | --- |
| message_id | String | PK, FK |
| shortcut_id | String | PK, FK |

### message_created_by_team

| Column | Type | Keys |
| --- | --- | --- |
| message_id | String | PK, FK |
| team_id | String | PK, FK |

### company_phone

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| company_id | String | PK, FK |
| phone | String |  |
| type | String |  |
| verified | Boolean |  |

### customer_shared_phone

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| phone | String |  |
| type | String |  |
| verified | Boolean |  |

### business_schedule

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| modified_by | String | FK |
| created_at | Instant |  |
| default | Boolean |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| timezone | String |  |
| updated_at | Instant |  |

### conversation_assigned_user

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

### customer_location

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| address | String |  |
| address_2 | String |  |
| address_3 | String |  |
| area_code | String |  |
| city_name | String |  |
| country_code | String |  |
| country_name | String |  |
| latitude | Double |  |
| longitude | Double |  |
| name | String |  |
| region_code | String |  |
| region_name | String |  |
| type | String |  |
| zip_code | String |  |

### work_session_channel

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| work_session_id | String | PK, FK |
| capacity_max | Long |  |
| capacity_remaining | Long |  |
| name | String |  |

### customer_active_user

| Column | Type | Keys |
| --- | --- | --- |
| customer_id | String | PK, FK |
| user_id | String | PK, FK |

### shortcut_assigned_user

| Column | Type | Keys |
| --- | --- | --- |
| shortcut_id | String | PK, FK |
| user_id | String | PK, FK |

### conversation_time_created_by_team

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | String | PK, FK |
| conversation_time_id | String | PK, FK |
| team_id | String | PK, FK |

### team

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| deleted_by | String | FK |
| modified_by | String | FK |
| created_at | Instant |  |
| deleted | Boolean |  |
| deleted_at | Instant |  |
| display_name | String |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| updated_at | Instant |  |

### sla_criteria

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| sla_id | String | FK |
| sla_version_id | String | FK |
| field | String |  |
| field_type | String |  |
| match_type | String |  |
| operator | String |  |
| value | String |  |

### company_tag

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

### message_assigned_user

| Column | Type | Keys |
| --- | --- | --- |
| message_id | String | PK, FK |
| user_id | String | PK, FK |

### customer_email

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| email | String |  |
| type | String |  |
| verified | Boolean |  |

### conversation_suggested_tag_history

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

### card

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| app_id | String |  |
| created_at | Instant |  |
| description | String |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| updated_at | Instant |  |
| url | String |  |

### customer_shared_social

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| type | String |  |
| url | String |  |
| userid | String |  |
| username | String |  |
| verified | Boolean |  |

### shortcut_tag

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

### company_social

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| company_id | String | PK, FK |
| type | String |  |
| url | String |  |
| userid | String |  |
| username | String |  |
| verified | Boolean |  |

### conversation

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| assistant_id | String | FK |
| brand_id | String | FK |
| created_by | String | FK |
| customer_id | String | FK |
| deleted_by | String | FK |
| ended_by | String | FK |
| first_company_id | String | FK |
| first_message_in_id | String | FK |
| last_message_in_message_id | String | FK |
| last_message_out_message_id | String | FK |
| modified_by | String | FK |
| queue_id | String | FK |
| sla_id | String | FK |
| assistant_emulation | Boolean |  |
| assistant_status | String |  |
| assistant_transferred_at | Instant |  |
| assistant_type | String |  |
| created_at | Instant |  |
| default_lang | String |  |
| deleted | Boolean |  |
| deleted_at | Instant |  |
| direction | String |  |
| ended | Boolean |  |
| ended_at | String |  |
| ended_reason | String |  |
| external_id | String |  |
| first_company_name | String |  |
| first_done | Json |  |
| first_message_in_channel | String |  |
| first_message_in_created_at | Instant |  |
| first_message_in_meta_recipient_email | String |  |
| first_message_in_meta_recipient_mailbox_hash | String |  |
| first_message_in_meta_to | String |  |
| first_message_in_sent_at | Instant |  |
| first_response_created_at | Instant |  |
| first_response_created_by | String |  |
| first_response_id | String |  |
| first_response_response_time | Long |  |
| first_response_sent_at | Instant |  |
| first_response_time | Long |  |
| last_activity_at | Instant |  |
| last_done | Json |  |
| last_message_at | Instant |  |
| last_message_direction | String |  |
| last_message_in_created_at | Instant |  |
| last_message_in_sent_at | Instant |  |
| last_message_out_created_at | Instant |  |
| last_message_out_sent_at | Instant |  |
| message_count | Int |  |
| modified_at | Instant |  |
| name | String |  |
| note_count | Int |  |
| open_status_at | Instant |  |
| org_id | String |  |
| outbound_message_count | Int |  |
| priority | Int |  |
| reopen_count | Int |  |
| satisfaction | Int |  |
| satisfaction_level_channel | String |  |
| satisfaction_level_created_at | Instant |  |
| satisfaction_level_first_answer | String |  |
| satisfaction_level_form | String |  |
| satisfaction_level_form_response | String |  |
| satisfaction_level_rating | Int |  |
| satisfaction_level_scheduled_for | Instant |  |
| satisfaction_level_score | Int |  |
| satisfaction_level_sent_at | Instant |  |
| satisfaction_level_sent_by | String |  |
| satisfaction_level_sent_by_teams | Json |  |
| satisfaction_level_status | String |  |
| satisfaction_level_updated_at | Instant |  |
| sentiment_confidence | Double |  |
| sentiment_polarity | Double |  |
| sla_breach_at | Instant |  |
| sla_breach_metric | String |  |
| sla_breached | Boolean |  |
| sla_matched_at | Instant |  |
| sla_metrics_first_response_breach_at | Instant |  |
| sla_metrics_longest_unresponded_message_breach_at | Instant |  |
| sla_metrics_total_conversation_open_time_breach_at | Instant |  |
| sla_metrics_total_customer_wait_time_breach_at | Instant |  |
| sla_name | String |  |
| sla_status | String |  |
| sla_summary_first_breach_at | Instant |  |
| sla_version | Int |  |
| sla_version_id | String |  |
| snooze_count | Int |  |
| snooze_status | String |  |
| snooze_status_at | Instant |  |
| snooze_time | Instant |  |
| spam | Boolean |  |
| status | String |  |
| updated_at | Instant |  |

### sla_version

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| sla_id | String | PK, FK |
| created_by | String | FK |
| created_at | Instant |  |
| description | String |  |
| hours | String |  |
| name | String |  |
| org_id | String |  |
| version | Int |  |

### customer_url

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| type | String |  |
| url | String |  |

### company

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| modified_by | String | FK |
| created_at | Instant |  |
| external_id | String |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| updated_at | Instant |  |

### company_email

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| company_id | String | PK, FK |
| email | String |  |
| type | String |  |
| verified | Boolean |  |

### custom_attribute_metadata

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| resource | String | PK |

### conversation_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| assistant_id | String | FK |
| brand_id | String | FK |
| created_by | String | FK |
| customer_id | String | FK |
| deleted_by | String | FK |
| ended_by | String | FK |
| first_company_id | String | FK |
| first_message_in_id | String | FK |
| last_message_in_message_id | String | FK |
| last_message_out_message_id | String | FK |
| modified_by | String | FK |
| queue_id | String | FK |
| sla_id | String | FK |
| assistant_emulation | Boolean |  |
| assistant_status | String |  |
| assistant_transferred_at | Instant |  |
| assistant_type | String |  |
| created_at | Instant |  |
| default_lang | String |  |
| deleted | Boolean |  |
| deleted_at | Instant |  |
| direction | String |  |
| ended | Boolean |  |
| ended_at | String |  |
| ended_reason | String |  |
| external_id | String |  |
| first_company_name | String |  |
| first_done | Json |  |
| first_message_in_channel | String |  |
| first_message_in_created_at | Instant |  |
| first_message_in_meta_recipient_email | String |  |
| first_message_in_meta_recipient_mailbox_hash | String |  |
| first_message_in_meta_to | String |  |
| first_message_in_sent_at | Instant |  |
| first_response_created_at | Instant |  |
| first_response_created_by | String |  |
| first_response_id | String |  |
| first_response_response_time | Long |  |
| first_response_sent_at | Instant |  |
| first_response_time | Long |  |
| last_activity_at | Instant |  |
| last_done | Json |  |
| last_message_at | Instant |  |
| last_message_direction | String |  |
| last_message_in_created_at | Instant |  |
| last_message_in_sent_at | Instant |  |
| last_message_out_created_at | Instant |  |
| last_message_out_sent_at | Instant |  |
| message_count | Int |  |
| modified_at | Instant |  |
| name | String |  |
| note_count | Int |  |
| open_status_at | Instant |  |
| org_id | String |  |
| outbound_message_count | Int |  |
| priority | Int |  |
| reopen_count | Int |  |
| satisfaction | Int |  |
| satisfaction_level_channel | String |  |
| satisfaction_level_created_at | Instant |  |
| satisfaction_level_first_answer | String |  |
| satisfaction_level_form | String |  |
| satisfaction_level_form_response | String |  |
| satisfaction_level_rating | Int |  |
| satisfaction_level_scheduled_for | Instant |  |
| satisfaction_level_score | Int |  |
| satisfaction_level_sent_at | Instant |  |
| satisfaction_level_sent_by | String |  |
| satisfaction_level_sent_by_teams | Json |  |
| satisfaction_level_status | String |  |
| satisfaction_level_updated_at | Instant |  |
| sentiment_confidence | Double |  |
| sentiment_polarity | Double |  |
| sla_breach_at | Instant |  |
| sla_breach_metric | String |  |
| sla_breached | Boolean |  |
| sla_matched_at | Instant |  |
| sla_metrics_first_response_breach_at | Instant |  |
| sla_metrics_longest_unresponded_message_breach_at | Instant |  |
| sla_metrics_total_conversation_open_time_breach_at | Instant |  |
| sla_metrics_total_customer_wait_time_breach_at | Instant |  |
| sla_name | String |  |
| sla_status | String |  |
| sla_summary_first_breach_at | Instant |  |
| sla_version | Int |  |
| sla_version_id | String |  |
| snooze_count | Int |  |
| snooze_status | String |  |
| snooze_status_at | Instant |  |
| snooze_time | Instant |  |
| spam | Boolean |  |
| status | String |  |
| updated_at | Instant |  |

### kobject_tag

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

### business_holiday

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| business_schedule_id | String | PK, FK |
| created_by | String | FK |
| modified_by | String | FK |
| created_at | Instant |  |
| description | String |  |
| enabled | Boolean |  |
| end_date | Instant |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| start_date | Instant |  |
| updated_at | Instant |  |

### customer_tag

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

### team_member

| Column | Type | Keys |
| --- | --- | --- |
| team_id | String | PK, FK |
| user_id | String | PK, FK |

### company_url

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| company_id | String | PK, FK |
| type | String |  |
| url | String |  |

### shortcut_assigned_team

| Column | Type | Keys |
| --- | --- | --- |
| shortcut_id | String | PK, FK |
| team_id | String | PK, FK |

### conversation_tag

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

### conversation_assigned_user_history

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

### work_item

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| accepted_by | String | FK |
| assigned_to | String | FK |
| queue_id | String | FK |
| team_id | String | FK |
| work_session_id | String | FK |
| channel | String |  |
| created_at | Instant |  |
| first_enter_queue_at | Instant |  |
| item_size | Long |  |
| last_revision_accepted_at | Instant |  |
| last_revision_entered_queue_at | Instant |  |
| last_revision_external_queue | String |  |
| last_revision_id | String |  |
| modified_at | Instant |  |
| org_id | String |  |
| paused | Boolean |  |
| priority | Long |  |
| queued_count | Long |  |
| resource_created_at | Instant |  |
| resource_direction | String |  |
| resource_id | String |  |
| resource_rev | Int |  |
| resource_type | String |  |
| rev | Int |  |
| status | String |  |
| updated_at | Instant |  |
| work_item_number | Long |  |

### team_queue

| Column | Type | Keys |
| --- | --- | --- |
| queue_id | String | PK, FK |
| team_id | String | PK, FK |

### tag

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| deleted_by | String | FK |
| modified_by | String | FK |
| color | String |  |
| created_at | Instant |  |
| deleted | Boolean |  |
| deleted_at | Instant |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| updated_at | Instant |  |

### conversation_assigned_team

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | String | PK, FK |
| team_id | String | PK, FK |

### conversation_suggested_tag

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

### customer_social

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| type | String |  |
| url | String |  |
| userid | String |  |
| username | String |  |
| verified | Boolean |  |

### work_session

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_by | String | FK |
| modified_by | String | FK |
| queue_id | String | FK |
| team_id | String | FK |
| user_id | String | FK |
| capacity_remaining | Long |  |
| capacity_status | String |  |
| changed_team | Boolean |  |
| created_at | Instant |  |
| handled_conversation_count | Long |  |
| handled_item_count | Long |  |
| has_pending_item | Boolean |  |
| has_skills | Boolean |  |
| idle_since | Instant |  |
| last_assigned_item_at | Instant |  |
| modified_at | Instant |  |
| org_id | String |  |
| paused_work_item_count | Long |  |
| rev | Int |  |
| routable | Boolean |  |
| signed_in_at | Instant |  |
| signed_out_at | Instant |  |
| status_type | String |  |
| subsystem | String |  |
| total_available_at_capacity_business_time | Long |  |
| total_available_at_capacity_status_at | Instant |  |
| total_available_at_capacity_time | Long |  |
| total_available_business_time | Long |  |
| total_available_status_at | Instant |  |
| total_available_time | Long |  |
| total_capacity | Long |  |
| total_unavailable_at_capacity_business_time | Long |  |
| total_unavailable_at_capacity_status_at | Instant |  |
| total_unavailable_at_capacity_time | Long |  |
| total_unavailable_business_time | Long |  |
| total_unavailable_idle_capacity_business_time | Long |  |
| total_unavailable_idle_capacity_status_at | Instant |  |
| total_unavailable_idle_capacity_time | Long |  |
| total_unavailable_status_at | Instant |  |
| total_unavailable_time | Long |  |
| updated_at | Instant |  |
| user_name_keyword | String |  |
| work_item_count | Long |  |

### customer_phone

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| phone | String |  |
| type | String |  |
| verified | Boolean |  |

### kobject

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| customer_id | String | FK |
| assigned_team | String |  |
| assigned_user | String |  |
| created_at | Instant |  |
| external_id | String |  |
| name | String |  |
| org_id | String |  |
| status | String |  |
| title | String |  |
| updated_at | Instant |  |

### work_session_capacity

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| work_session_id | String | PK, FK |
| capacity_limit | Long |  |
| priority | Long |  |
| remaining | Long |  |

### customer

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| company_id | String | FK |
| created_by | String | FK |
| deleted_by | String | FK |
| last_conversation_id | String | FK |
| modified_by | String | FK |
| conversation_counts_all | Int |  |
| conversation_counts_done | Int |  |
| conversation_counts_open | Int |  |
| conversation_counts_snoozed | Int |  |
| created_at | Instant |  |
| default_lang | String |  |
| deleted | Boolean |  |
| deleted_at | Instant |  |
| display_name | String |  |
| external_id | String |  |
| first_name | String |  |
| last_activity_at | Instant |  |
| last_message_at | Instant |  |
| last_message_out_sent_at | Instant |  |
| last_name | String |  |
| modified_at | Instant |  |
| name | String |  |
| org_id | String |  |
| progressive_status | String |  |
| sentiment_confidence | Double |  |
| sentiment_polarity | Double |  |
| updated_at | Instant |  |
| verified | Boolean |  |

### note

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| conversation_id | String | FK |
| created_by | String | FK |
| customer_id | String | FK |
| deleted_by | String | FK |
| modified_by | String | FK |
| body | String |  |
| created_at | Instant |  |
| deleted | Boolean |  |
| deleted_at | Instant |  |
| external_id | String |  |
| modified_at | Instant |  |
| org_id | String |  |
| updated_at | Instant |  |

### conversation_time

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| conversation_id | String | PK, FK |
| created_by | String | FK |
| customer_id | String | FK |
| created_at | Instant |  |
| handle_at | String |  |
| handle_pause_at | String |  |
| handle_pause_by | String |  |
| handle_time | String |  |
| message_at | String |  |
| message_time | String |  |
| note_at | String |  |
| note_time | String |  |
| org_id | String |  |

### assistant_dialog_node

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| assistant_dialog_id | String | PK, FK |
| assistant_id | String | PK, FK |
| type | String |  |

### customer_last_conversation_tag

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

### customer_external_link

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| external_id | String |  |
| verified | Boolean |  |

### customer_watcher

| Column | Type | Keys |
| --- | --- | --- |
| customer_id | String | PK, FK |
| user_id | String | PK, FK |

### business_schedule_hour

| Column | Type | Keys |
| --- | --- | --- |
| day | String | PK |
| index | Int | PK |
| business_schedule_id | String | PK, FK |
| end_time | Int |  |
| start_time | Int |  |

### customer_whatsapp

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| customer_id | String | PK, FK |
| phone | String |  |
| type | String |  |
| verified | Boolean |  |

## Relationships

- queue(created_by) → user(id)
- queue(modified_by) → user(id)
- note_user_mention(note_id) → note(id)
- note_user_mention(user_id) → user(id)
- message(first_company_id) → company(id)
- message(created_by) → user(id)
- message(modified_by) → user(id)
- message(customer_id) → customer(id)
- message(redacted_by) → user(id)
- message(conversation_id) → conversation(id)
- company_location(company_id) → company(id)
- sla(created_by) → user(id)
- customer_shared_external_link(customer_id) → customer(id)
- customer_shared_email(customer_id) → customer(id)
- user(created_by) → user(id)
- user(modified_by) → user(id)
- message_assigned_team(message_id) → message(id)
- message_assigned_team(team_id) → team(id)
- snooze(created_by) → user(id)
- snooze(modified_by) → user(id)
- note_team_mention(note_id) → note(id)
- note_team_mention(team_id) → team(id)
- conversation_time_channel(conversation_id) → conversation(id)
- conversation_time_channel(conversation_time_id) → conversation_time(id)
- conversation_time_channel(channel) → conversation_channel_history(conversation_id)
- user_role(user_id) → user(id)
- sla_metric(sla_id) → sla(id)
- sla_metric(sla_version_id) → sla_version(id)
- customer_shared_whatsapp(customer_id) → customer(id)
- shortcut(created_by) → user(id)
- shortcut(modified_by) → user(id)
- shortcut(deleted_by) → user(id)
- assistant(created_by) → user(id)
- assistant(modified_by) → user(id)
- conversation_tag_history(conversation_id) → conversation(id)
- conversation_tag_history(tag_id) → tag(id)
- conversation_assigned_team_history(conversation_id) → conversation(id)
- conversation_assigned_team_history(team_id) → team(id)
- message_attachment(message_id) → message(id)
- notification(user_id) → user(id)
- conversation_channel_history(conversation_id) → conversation(id)
- assistant_dialog(assistant_id) → assistant(id)
- card_context(card_id) → card(id)
- brand(created_by) → user(id)
- brand(modified_by) → user(id)
- conversation_channel(conversation_id) → conversation(id)
- message_shortcut(message_id) → message(id)
- message_shortcut(shortcut_id) → shortcut(id)
- message_created_by_team(message_id) → message(id)
- message_created_by_team(team_id) → team(id)
- company_phone(company_id) → company(id)
- customer_shared_phone(customer_id) → customer(id)
- business_schedule(created_by) → user(id)
- business_schedule(modified_by) → user(id)
- conversation_assigned_user(conversation_id) → conversation(id)
- conversation_assigned_user(user_id) → user(id)
- customer_location(customer_id) → customer(id)
- work_session_channel(work_session_id) → work_session(id)
- customer_active_user(customer_id) → customer(id)
- customer_active_user(user_id) → user(id)
- shortcut_assigned_user(shortcut_id) → shortcut(id)
- shortcut_assigned_user(user_id) → user(id)
- conversation_time_created_by_team(conversation_id) → conversation(id)
- conversation_time_created_by_team(conversation_time_id) → conversation_time(id)
- conversation_time_created_by_team(team_id) → team(id)
- team(created_by) → user(id)
- team(modified_by) → user(id)
- team(deleted_by) → user(id)
- sla_criteria(sla_id) → sla(id)
- sla_criteria(sla_version_id) → sla_version(id)
- company_tag(company_id) → company(id)
- company_tag(tag_id) → tag(id)
- message_assigned_user(message_id) → message(id)
- message_assigned_user(user_id) → user(id)
- customer_email(customer_id) → customer(id)
- conversation_suggested_tag_history(conversation_id) → conversation(id)
- conversation_suggested_tag_history(tag_id) → tag(id)
- customer_shared_social(customer_id) → customer(id)
- shortcut_tag(shortcut_id) → shortcut(id)
- shortcut_tag(tag_id) → tag(id)
- company_social(company_id) → company(id)
- conversation(first_message_in_id) → message(id)
- conversation(last_message_out_message_id) → message(id)
- conversation(last_message_in_message_id) → message(id)
- conversation(first_company_id) → company(id)
- conversation(assistant_id) → assistant(id)
- conversation(created_by) → user(id)
- conversation(modified_by) → user(id)
- conversation(customer_id) → customer(id)
- conversation(deleted_by) → user(id)
- conversation(ended_by) → user(id)
- conversation(queue_id) → queue(id)
- conversation(sla_id) → sla(id)
- conversation(brand_id) → brand(id)
- sla_version(sla_id) → sla(id)
- sla_version(created_by) → user(id)
- customer_url(customer_id) → customer(id)
- company(created_by) → user(id)
- company(modified_by) → user(id)
- company_email(company_id) → company(id)
- conversation_history(first_message_in_id) → message(id)
- conversation_history(last_message_out_message_id) → message(id)
- conversation_history(last_message_in_message_id) → message(id)
- conversation_history(first_company_id) → company(id)
- conversation_history(assistant_id) → assistant(id)
- conversation_history(created_by) → user(id)
- conversation_history(modified_by) → user(id)
- conversation_history(customer_id) → customer(id)
- conversation_history(deleted_by) → user(id)
- conversation_history(ended_by) → user(id)
- conversation_history(queue_id) → queue(id)
- conversation_history(sla_id) → sla(id)
- conversation_history(brand_id) → brand(id)
- kobject_tag(kobject_id) → kobject(id)
- kobject_tag(tag_id) → tag(id)
- business_holiday(created_by) → user(id)
- business_holiday(modified_by) → user(id)
- business_holiday(business_schedule_id) → business_schedule(id)
- customer_tag(customer_id) → customer(id)
- customer_tag(tag_id) → tag(id)
- team_member(team_id) → team(id)
- team_member(user_id) → user(id)
- company_url(company_id) → company(id)
- shortcut_assigned_team(shortcut_id) → shortcut(id)
- shortcut_assigned_team(team_id) → team(id)
- conversation_tag(conversation_id) → conversation(id)
- conversation_tag(tag_id) → tag(id)
- conversation_assigned_user_history(conversation_id) → conversation(id)
- conversation_assigned_user_history(user_id) → user(id)
- work_item(assigned_to) → user(id)
- work_item(accepted_by) → user(id)
- work_item(team_id) → team(id)
- work_item(work_session_id) → work_session(id)
- work_item(queue_id) → queue(id)
- team_queue(team_id) → team(id)
- team_queue(queue_id) → queue(id)
- tag(created_by) → user(id)
- tag(modified_by) → user(id)
- tag(deleted_by) → user(id)
- conversation_assigned_team(conversation_id) → conversation(id)
- conversation_assigned_team(team_id) → team(id)
- conversation_suggested_tag(conversation_id) → conversation(id)
- conversation_suggested_tag(tag_id) → tag(id)
- customer_social(customer_id) → customer(id)
- work_session(created_by) → user(id)
- work_session(modified_by) → user(id)
- work_session(user_id) → user(id)
- work_session(queue_id) → queue(id)
- work_session(team_id) → team(id)
- customer_phone(customer_id) → customer(id)
- kobject(customer_id) → customer(id)
- work_session_capacity(work_session_id) → work_session(id)
- customer(last_conversation_id) → conversation(id)
- customer(created_by) → user(id)
- customer(modified_by) → user(id)
- customer(company_id) → company(id)
- customer(deleted_by) → user(id)
- note(created_by) → user(id)
- note(modified_by) → user(id)
- note(customer_id) → customer(id)
- note(deleted_by) → user(id)
- note(conversation_id) → conversation(id)
- conversation_time(conversation_id) → conversation(id)
- conversation_time(created_by) → user(id)
- conversation_time(customer_id) → customer(id)
- assistant_dialog_node(assistant_id) → assistant(id)
- assistant_dialog_node(assistant_dialog_id) → assistant_dialog(id)
- customer_last_conversation_tag(customer_id) → customer(id)
- customer_last_conversation_tag(tag_id) → tag(id)
- customer_external_link(customer_id) → customer(id)
- customer_watcher(customer_id) → customer(id)
- customer_watcher(user_id) → user(id)
- business_schedule_hour(business_schedule_id) → business_schedule(id)
- customer_whatsapp(customer_id) → customer(id)
