# Dixa schema ERD

Table and field reference for the Fivetran Dixa connector.

## Table & Field Reference

### agent

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| avatar_url | String |  |
| created_at | Instant |  |
| display_name | String |  |
| email | String |  |
| first_name | String |  |
| last_name | String |  |
| middle_name | Json |  |
| phone_number | String |  |

### agent_presence_active_channel

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| agent_id | String | PK, FK |
| request_time | LocalDateTime | PK, FK |
| user_id | Unknown | PK, FK |
| active_channel | Unknown |  |

### agent_presence

| Column | Type | Keys |
| --- | --- | --- |
| request_time | LocalDateTime | PK |
| user_id | Unknown | PK |
| agent_id | String | PK, FK |
| connection_status | Unknown |  |
| last_seen | Instant |  |
| presence_status | Unknown |  |

### cc_email

| Column | Type | Keys |
| --- | --- | --- |
| email_id | String | PK |
| id | String | PK, FK |

### bcc_email

| Column | Type | Keys |
| --- | --- | --- |
| email_id | String | PK |
| id | String | PK, FK |

### email_recipient

| Column | Type | Keys |
| --- | --- | --- |
| email_id | String | PK |
| id | String | PK, FK |

### attached_file

| Column | Type | Keys |
| --- | --- | --- |
| file_name | String | PK |
| id | String | PK, FK |

### conversation_message

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| author_email | String | FK |
| conversation_id | Long | FK |
| author_name | String |  |
| chat_input_answer | String |  |
| chat_input_question | String |  |
| chat_menu_text | String |  |
| created_at | Instant |  |
| direction | String |  |
| duration | Long |  |
| from_phone_number | String |  |
| froms | String |  |
| initial_channel | String |  |
| is_automated_message | Boolean |  |
| recording_url | String |  |
| text | String |  |
| to_phone_number | String |  |
| voicemail_url | String |  |

### activity_log

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| author_id | String | FK |
| conversation_id | Long | FK |
| activity_timestamp | Instant |  |
| activity_type | String |  |
| type | String |  |
| attribute_** |  |  |

### conversation_internal_note

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| author_id | String | FK |
| conversation_id | Long | FK |
| created_at | Instant |  |
| message | String |  |

### conversation_tag

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | Long | PK, FK |
| tag_id | String | PK, FK |
| is_deactivated | Boolean |  |

### conversation_rating

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| conversation_id | Long | FK |
| cancelled_timestamp | Instant |  |
| created_timestamp | Instant |  |
| languages | String |  |
| message | String |  |
| modified_timestamp | Instant |  |
| offered_timestamp | Instant |  |
| rated_timestamp | Instant |  |
| scheduled_for_timestamp | Instant |  |
| scheduled_timestamp | Instant |  |
| score | Int |  |
| status | String |  |
| type | String |  |
| unscheduled_timestamp | Instant |  |

### conversation_custom_field_value

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| conversation_custom_field_id | Unknown | PK, FK |
| conversation_id | Long | PK, FK |
| value | Unknown |  |

### conversation_custom_field

| Column | Type | Keys |
| --- | --- | --- |
| conversation_id | Long | PK, FK |
| id | Unknown | PK, FK |
| data_type | Unknown |  |

### conversation

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK, FK |
| assignee_id | String | FK |
| queue_id | String | FK |
| requester_id | String | FK |
| anonymized_at | Instant |  |
| assigned_at | Instant |  |
| assignee_email | String |  |
| assignee_name | String |  |
| assignee_phone_number | String |  |
| closed_at | Instant |  |
| created_at | Instant |  |
| direction | String |  |
| dixa_email_integration_id | String |  |
| dixa_email_integration_sender_name | String |  |
| facebook_page_id | String |  |
| facebook_page_name | String |  |
| forwarding_email | String |  |
| from_provisioned_phone_number_id | String |  |
| from_provisioned_phone_number_name | String |  |
| handling_duration | Long |  |
| initial_channel | String |  |
| last_message_created_at | Instant |  |
| originating_country | String |  |
| queue_name | String |  |
| queued_at | Instant |  |
| requester_email | String |  |
| requester_name | String |  |
| requester_phone_number | String |  |
| status | String |  |
| subject | String |  |
| to_provisioned_phone_number_id | String |  |
| to_provisioned_phone_number_name | String |  |
| total_duration | Long |  |
| transfer_time | Instant |  |
| transferee_name | String |  |
| transferee_number | String |  |
| updated_at | Instant |  |
| widget_id | String |  |
| widget_name | String |  |

### team_member

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

### team

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

### custom_attribute_nested_option

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| custom_attribute_id | Unknown | FK |
| custom_attribute_input_option_id | Unknown | FK |
| is_deactivated | Unknown |  |
| label | Unknown |  |
| nested_option | Json |  |
| value | Unknown |  |

### custom_attribute_input_option

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| custom_attribute_id | Unknown | FK |
| is_deactivated | Unknown |  |
| label | Unknown |  |
| value | Unknown |  |

### custom_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| created_at | Unknown |  |
| description | Unknown |  |
| entity_type | Unknown |  |
| identifier | Unknown |  |
| input_definition_text | Unknown |  |
| is_archived | Unknown |  |
| is_deactivated | Unknown |  |
| is_required | Unknown |  |
| label | Unknown |  |
| updated_at | Unknown |  |

### tags

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| color | String |  |
| name | String |  |
| state | String |  |

### queue_member

| Column | Type | Keys |
| --- | --- | --- |
| agent_id | String | PK, FK |
| queue_id | String | PK, FK |
| priority | Int |  |

### end_user

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| avatar_url | String |  |
| created_at | Instant |  |
| display_name | String |  |
| email | String |  |
| first_name | String |  |
| last_name | String |  |
| middle_name | Json |  |
| phone_number | String |  |

### email_queue

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

### facebook_messenger_queue

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

### widget_chat_queue

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

### voicemail_queue

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

### contact_form_queue

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

### whatsapp_queue

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

### callback_queue

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

### pstn_phone_queue

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

### messenger_queue

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

### queue

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| do_not_offer_timeouts_callback | Int |  |
| do_not_offer_timeouts_contact_form | Int |  |
| do_not_offer_timeouts_email | Int |  |
| do_not_offer_timeouts_facebook_messenger | Int |  |
| do_not_offer_timeouts_messenger | Int |  |
| do_not_offer_timeouts_pstn_phone | Int |  |
| do_not_offer_timeouts_voicemail | Int |  |
| do_not_offer_timeouts_whatsapp | Int |  |
| do_not_offer_timeouts_widget_chat | Int |  |
| is_default | Boolean |  |
| is_do_not_offer_enabled | Boolean |  |
| is_preferred_agent_enabled | Boolean |  |
| member_list_type | String |  |
| name | String |  |
| offer_abandoned_conversations | Boolean |  |
| offer_timeout | Int |  |
| offering_algorithm | String |  |
| organization_id | String |  |
| personal_agent_offline_timeout | Int |  |
| preferred_agent_offline_timeout | Int |  |
| preferred_agent_timeouts_callback | Int |  |
| preferred_agent_timeouts_contact_form | Int |  |
| preferred_agent_timeouts_email | Int |  |
| preferred_agent_timeouts_facebook_messenger | Int |  |
| preferred_agent_timeouts_messenger | Int |  |
| preferred_agent_timeouts_pstn_phone | Int |  |
| preferred_agent_timeouts_voicemail | Int |  |
| preferred_agent_timeouts_whatsapp | Int |  |
| preferred_agent_timeouts_widget_chat | Int |  |
| priority | Int |  |
| queue_thresholds_available_agents | Int |  |
| queue_thresholds_longest_wait | Int |  |
| queue_thresholds_sla_percentage | Int |  |
| queue_thresholds_sla_time_limit | Int |  |
| queue_thresholds_waiting_conversations | Int |  |
| sla_calculation_method | String |  |
| twilio_queue_sid | String |  |
| wrapup_timeout | Int |  |

## Relationships

- agent_presence_active_channel(user_id) → agent_presence(user_id)
- agent_presence_active_channel(request_time) → agent_presence(request_time)
- agent_presence_active_channel(agent_id) → agent_presence(agent_id)
- agent_presence(agent_id) → agent(id)
- cc_email(id) → conversation_message(id)
- bcc_email(id) → conversation_message(id)
- email_recipient(id) → conversation_message(id)
- attached_file(id) → conversation_message(id)
- conversation_message(conversation_id) → conversation(id)
- conversation_message(author_email) → agent(id)
- activity_log(conversation_id) → conversation(id)
- activity_log(author_id) → agent(id)
- conversation_internal_note(conversation_id) → conversation(id)
- conversation_internal_note(author_id) → agent(id)
- conversation_tag(tag_id) → tags(id)
- conversation_tag(conversation_id) → conversation(id)
- conversation_rating(conversation_id) → conversation(id)
- conversation_custom_field_value(conversation_custom_field_id) → conversation_custom_field(id)
- conversation_custom_field_value(conversation_id) → conversation_custom_field(conversation_id)
- conversation_custom_field(id) → custom_attribute(id)
- conversation_custom_field(conversation_id) → conversation(id)
- conversation(id) → widget_chat_queue(id)
- conversation(queue_id) → queue(id)
- conversation(assignee_id) → agent(id)
- conversation(requester_id) → end_user(id)
- team_member(agent_id) → agent(id)
- team_member(team_id) → team(id)
- custom_attribute_nested_option(custom_attribute_id) → custom_attribute_input_option(custom_attribute_id)
- custom_attribute_nested_option(custom_attribute_input_option_id) → custom_attribute_input_option(id)
- custom_attribute_input_option(custom_attribute_id) → custom_attribute(id)
- queue_member(agent_id) → agent(id)
- queue_member(queue_id) → queue(id)
- email_queue(queue_id) → queue(id)
- facebook_messenger_queue(queue_id) → queue(id)
- widget_chat_queue(queue_id) → queue(id)
- voicemail_queue(queue_id) → queue(id)
- contact_form_queue(queue_id) → queue(id)
- whatsapp_queue(queue_id) → queue(id)
- callback_queue(queue_id) → queue(id)
- pstn_phone_queue(queue_id) → queue(id)
- messenger_queue(queue_id) → queue(id)
