# Outreach schema ERD

Table and field reference for the Fivetran Outreach connector.

## Table & Field Reference

### account

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_owner_id | Long | FK |
| relationship_updater_id | Long | FK |
| buyer_intent_score | Float |  |
| company_type | String |  |
| created_at | Instant |  |
| custom_id | String |  |
| description | String |  |
| domain | String |  |
| external_source | String |  |
| followers | Int |  |
| founded_at | Instant |  |
| industry | String |  |
| linked_in_employees | Int |  |
| linked_in_url | String |  |
| locality | String |  |
| name | String |  |
| named | Boolean |  |
| natural_name | String |  |
| number_of_employees | Int |  |
| sharing_team_id | String |  |
| touched_at | Instant |  |
| type | String |  |
| updated_at | Instant |  |
| website_url | String |  |

### template_cc_recipient

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK |
| template_id | Long | PK, FK |

### active_step_task

| Column | Type | Keys |
| --- | --- | --- |
| sequence_state_id | Long | PK, FK |
| task_id | Long | PK, FK |

### recipient

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| created_at | Instant |  |
| email_hash | String |  |
| recipient_type | String |  |
| type | String |  |
| updated_at | Instant |  |
| value | String |  |

### email_address

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_prospect_id | Long | FK |
| created_at | Instant |  |
| email | String |  |
| email_type | String |  |
| order | Int |  |
| status | String |  |
| status_changed_at | Instant |  |
| type | String |  |
| unsubscribed_at | Instant |  |
| updated_at | Instant |  |

### duty

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| duty_type | String |  |
| symbolic_name | String |  |
| type | String |  |
| updated_at | Instant |  |

### users

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_mailbox_id | Long | FK |
| relationship_profile_id | Long | FK |
| relationship_role_id | Long | FK |
| relationship_updater_id | Long | FK |
| accounts_view_id | Int |  |
| activity_notifications_disabled | Boolean |  |
| bounce_warning_email_enabled | Boolean |  |
| bridge_phone | String |  |
| bridge_phone_extension | String |  |
| calls_view_id | Int |  |
| controlled_tab_default | String |  |
| created_at | Instant |  |
| current_sign_in_at | Instant |  |
| daily_digest_email_enabled | Boolean |  |
| default_ruleset_id | Int |  |
| email | String |  |
| enable_voice_recordings | Boolean |  |
| first_name | String |  |
| inbound_bridge_phone | String |  |
| inbound_bridge_phone_extension | String |  |
| inbound_call_behavior | String |  |
| inbound_phone_type | String |  |
| inbound_voicemail_custom_message_text | String |  |
| inbound_voicemail_message_text_voice | String |  |
| inbound_voicemail_prompt_type | String |  |
| kaia_recordings_view_id | Int |  |
| keep_bridge_phone_connected | Boolean |  |
| last_name | String |  |
| last_sign_in_at | Instant |  |
| locked | Boolean |  |
| mailbox_error_email_enabled | Boolean |  |
| meeting_engagement_notification_enabled | Boolean |  |
| name | String |  |
| notifications_enabled | Boolean |  |
| oce_click_to_dial_everywhere | Boolean |  |
| oce_gmail_toolbar | Boolean |  |
| oce_gmail_tracking_state | String |  |
| oce_salesforce_email_decorating | Boolean |  |
| oce_salesforce_phone_decorating | Boolean |  |
| oce_salesforce_phoned_decorating | Boolean |  |
| oce_universal_task_flow | Boolean |  |
| oce_window_mode | Boolean |  |
| opportunities_view_id | Int |  |
| password_expires_at | Instant |  |
| phone_country_code | String |  |
| phone_number | String |  |
| phone_type | String |  |
| plugin_alert_notification_enabled | Boolean |  |
| preferred_voice_region | String |  |
| prefers_local_presence | Boolean |  |
| primary_timezone | String |  |
| prospects_view_id | Int |  |
| reports_team_perf_view_id | Int |  |
| reports_view_id | Int |  |
| scim_external_id | String |  |
| scim_source | String |  |
| secondary_timezone | String |  |
| sender_notifications_excluded | Boolean |  |
| tasks_view_id | Int |  |
| teams_view_id | Int |  |
| tertiary_timezone | String |  |
| texting_email_notifications | Boolean |  |
| title | String |  |
| type | String |  |
| unknown_reply_email_enabled | Boolean |  |
| updated_at | Instant |  |
| user_guid | String |  |
| username | String |  |
| users_view_id | Int |  |
| voicemail_notification_enabled | Boolean |  |
| weekly_digest_email_enabled | Boolean |  |

### mailing

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_follow_up_sequence_id | Long | FK |
| relationship_mailbox_id | Long | FK |
| relationship_opportunity_id | Long | FK |
| relationship_prospect_id | Long | FK |
| relationship_sequence_id | Long | FK |
| relationship_sequence_state_id | Long | FK |
| relationship_sequence_step_id | Long | FK |
| relationship_task_id | Long | FK |
| relationship_template_id | Long | FK |
| relationship_user_id | Long | FK |
| body_html | String |  |
| bounced_at | Instant |  |
| click_count | Int |  |
| clicked_at | Instant |  |
| created_at | Instant |  |
| delivered_at | Instant |  |
| error_backtrace | String |  |
| error_reason | String |  |
| follow_up_task_scheduled_at | Instant |  |
| follow_up_task_type | String |  |
| mailbox_address | String |  |
| mailing_type | String |  |
| marked_as_spam_at | Instant |  |
| message_id | String |  |
| notify_thread_condition | String |  |
| notify_thread_scheduled_at | Instant |  |
| notify_thread_status | String |  |
| open_count | Int |  |
| opened_at | Instant |  |
| override_safety_settings | Boolean |  |
| replied_at | Instant |  |
| retry_at | Instant |  |
| retry_count | Int |  |
| retry_interval | Int |  |
| scheduled_at | Instant |  |
| state | String |  |
| state_changed_at | Instant |  |
| subject | String |  |
| track_links | Boolean |  |
| track_opens | Boolean |  |
| type | String |  |
| unsubscribed_at | Instant |  |
| updated_at | Instant |  |

### template_tag

| Column | Type | Keys |
| --- | --- | --- |
| tag_name | String | PK |
| template_id | Long | PK, FK |

### prospect

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_account_id | Long | FK |
| relationship_creator_id | Long | FK |
| relationship_owner_id | Long | FK |
| relationship_persona_id | Long | FK |
| relationship_stage_id | Long | FK |
| relationship_updater_id | Long | FK |
| added_at | Instant |  |
| address_city | String |  |
| address_country | String |  |
| address_state | String |  |
| address_street | String |  |
| address_street_2 | String |  |
| address_zip | String |  |
| angel_list_url | String |  |
| available_at | Instant |  |
| call_opted_out | Boolean |  |
| calls_opt_status | String |  |
| calls_opted_at | Instant |  |
| campaign_name | String |  |
| click_count | Int |  |
| company | String |  |
| created_at | Instant |  |
| date_of_birth | Instant |  |
| degree | String |  |
| email_opted_out | Boolean |  |
| emails_opt_status | String |  |
| emails_opted_at | Instant |  |
| engaged_at | Instant |  |
| engaged_score | Float |  |
| event_name | String |  |
| external_id | String |  |
| external_owner | String |  |
| external_source | String |  |
| facebook_url | String |  |
| first_name | String |  |
| gender | String |  |
| github_url | String |  |
| github_username | String |  |
| google_plus_url | String |  |
| graduation_date | Instant |  |
| job_start_date | Instant |  |
| last_name | String |  |
| linked_in_connections | Int |  |
| linked_in_employees | Int |  |
| linked_in_id | String |  |
| linked_in_slug | String |  |
| linked_in_url | String |  |
| middle_name | String |  |
| name | String |  |
| nickname | String |  |
| occupation | String |  |
| open_count | Int |  |
| opted_out | Boolean |  |
| opted_out_at | Instant |  |
| personal_note_1 | String |  |
| personal_note_2 | String |  |
| preferred_contact | String |  |
| quora_url | String |  |
| region | String |  |
| reply_count | Int |  |
| school | String |  |
| score | Float |  |
| sharing_team_id | String |  |
| source | String |  |
| specialties | String |  |
| stack_overflow_id | String |  |
| stack_overflow_url | String |  |
| time_zone | String |  |
| time_zone_iana | String |  |
| time_zone_inferred | String |  |
| title | String |  |
| touched_at | Instant |  |
| trashed_at | Instant |  |
| twitter_url | String |  |
| twitter_username | String |  |
| type | String |  |
| updated_at | Instant |  |
| website_url_1 | String |  |
| website_url_2 | String |  |
| website_url_3 | String |  |

### data_connection

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| parent_id | Long | PK |
| parent_type | String | PK |
| type | String | PK |
| connection | String |  |
| url | String |  |

### prospect_work_phone

| Column | Type | Keys |
| --- | --- | --- |
| phone_number | String | PK |
| prospect_id | Long | PK, FK |

### sequence_state

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_account_id | Long | FK |
| relationship_creator_id | Long | FK |
| relationship_mailbox_id | Long | FK |
| relationship_opportunity_id | Long | FK |
| relationship_prospect_id | Long | FK |
| relationship_sequence_id | Long | FK |
| relationship_sequence_step_id | Long | FK |
| active_at | Instant |  |
| bounce_count | Int |  |
| call_completed_at | Instant |  |
| click_count | Int |  |
| created_at | Instant |  |
| deliver_count | Int |  |
| error_reason | String |  |
| failure_count | Int |  |
| negative_reply_count | Int |  |
| neutral_reply_count | Int |  |
| open_count | Int |  |
| opt_out_count | Int |  |
| pause_reason | String |  |
| positive_reply_count | Int |  |
| replied_at | Instant |  |
| reply_count | Int |  |
| schedule_count | Int |  |
| state | String |  |
| state_changed_at | Instant |  |
| type | String |  |
| updated_at | Instant |  |

### sequence_step

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_call_purpose_id | Long | FK |
| relationship_creator_id | Long | FK |
| relationship_sequence_id | Long | FK |
| relationship_task_priority_id | Long | FK |
| relationship_updater_id | Long | FK |
| bounce_count | Int |  |
| click_count | Int |  |
| created_at | Instant |  |
| date | Instant |  |
| deliver_count | Int |  |
| display_name | String |  |
| failure_count | Int |  |
| interval | Int |  |
| negative_reply_count | Int |  |
| neutral_reply_count | Int |  |
| open_count | Int |  |
| opt_out_count | Int |  |
| order | Int |  |
| positive_reply_count | Int |  |
| reply_count | Int |  |
| schedule_count | Int |  |
| step_type | String |  |
| task_autoskip_delay | Int |  |
| task_note | String |  |
| type | String |  |
| updated_at | Instant |  |

### prospect_email

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK |
| prospect_id | Long | PK, FK |

### task_priority

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| color | Long |  |
| created_at | Instant |  |
| name | String |  |
| type | String |  |
| updated_at | Instant |  |
| weight | Int |  |

### template_to_recipient

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK |
| template_id | Long | PK, FK |

### account_tag

| Column | Type | Keys |
| --- | --- | --- |
| tag_name | String | PK |
| account_id | Long | PK, FK |

### sequence_template

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_sequence_step_id | Long | FK |
| relationship_template_id | Long | FK |
| relationship_updater_id | Long | FK |
| bounce_count | Int |  |
| click_count | Int |  |
| created_at | Instant |  |
| deliver_count | Int |  |
| enabled | Boolean |  |
| enabled_at | Instant |  |
| failure_count | Int |  |
| is_reply | Boolean |  |
| negative_reply_count | Int |  |
| neutral_reply_count | Int |  |
| open_count | Int |  |
| opt_out_count | Int |  |
| positive_reply_count | Int |  |
| reply_count | Int |  |
| schedule_count | Int |  |
| type | String |  |
| updated_at | Instant |  |

### mailing_recipient

| Column | Type | Keys |
| --- | --- | --- |
| mailing_id | Long | PK, FK |
| recipient_id | Long | PK, FK |

### user_duty

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| user_id | Long | PK, FK |
| duty_type | String |  |
| name | String |  |

### user_email_recipients

| Column | Type | Keys |
| --- | --- | --- |
| recipient_id | Long | PK, FK |
| user_id | Long | PK, FK |

### user_team

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

### template_bcc_recipient

| Column | Type | Keys |
| --- | --- | --- |
| email | String | PK |
| template_id | Long | PK, FK |

### sequence_tag

| Column | Type | Keys |
| --- | --- | --- |
| tag_name | String | PK |
| sequence_id | Long | PK, FK |

### compliance_request

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_requester_id | Long | FK |
| batch_compliance_request_uuid | String |  |
| created_at | Instant |  |
| object_type | String |  |
| pii | Json |  |
| request_object_id | String |  |
| request_type | String |  |
| requester_id | Int |  |
| state | String |  |
| type | String |  |
| updated_at | Instant |  |
| uuid | String |  |

### call_purpose

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| created_at | Instant |  |
| name | String |  |
| order | Int |  |
| type | String |  |
| updated_at | Instant |  |

### prospect_voip_phone

| Column | Type | Keys |
| --- | --- | --- |
| phone_number | String | PK |
| prospect_id | Long | PK, FK |

### ruleset

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_bounced_stage_id | Long | FK |
| relationship_call_task_priority_from_clicks_id | Long | FK |
| relationship_call_task_priority_from_opens_id | Long | FK |
| relationship_call_task_priority_id | Long | FK |
| relationship_completed_stage_id | Long | FK |
| relationship_delivered_stage_id | Long | FK |
| relationship_finished_stage_id | Long | FK |
| relationship_opted_out_stage_id | Long | FK |
| relationship_owner_id | Long | FK |
| relationship_replied_stage_id | Long | FK |
| relationship_started_stage_id | Long | FK |
| apply_completed_stage_in | Int |  |
| auto_resume_ooto_prospects | Boolean |  |
| auto_resume_ooto_prospects_expires_in | Int |  |
| auto_resume_ooto_prospects_in | Int |  |
| call_opt_out_action | String |  |
| clicks_needed_before_call_task_created | Int |  |
| created_at | Instant |  |
| email_opt_out_action | String |  |
| include_unsubscribe_links | Boolean |  |
| meeting_booked_action | String |  |
| minimum_prospect_touched_interval | Int |  |
| name | String |  |
| ooto_auto_extraction_enabled | Boolean |  |
| opens_needed_before_call_task_created | Int |  |
| permit_duplicate_prospects | String |  |
| sequence_exclusivity | String |  |
| sms_opt_out_action | String |  |
| sms_received_action | String |  |
| step_overrides_enabled | Boolean |  |
| type | String |  |
| updated_at | Instant |  |

### profile

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| created_at | Instant |  |
| is_admin | Boolean |  |
| name | String |  |
| special_id | String |  |
| type | String |  |
| updated_at | Instant |  |

### content_category_membership

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_content_category_id | Long | FK |
| relationship_creator_id | Long | FK |
| created_at | Instant |  |
| relationship_content_id | Long |  |
| relationship_content_type | String |  |
| type | String |  |
| updated_at | Instant |  |

### phone_number

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_prospect_id | Long | FK |
| country_code | String |  |
| created_at | Instant |  |
| extension | String |  |
| number | String |  |
| order | Long |  |
| phone_type | String |  |
| raw_number | String |  |
| status | String |  |
| status_changed_at | Instant |  |
| type | String |  |
| updated_at | Instant |  |

### mailbox

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_updater_id | Long | FK |
| relationship_user_id | Long | FK |
| auth_id | Int |  |
| created_at | Instant |  |
| editable | Boolean |  |
| email | String |  |
| email_hash | String |  |
| email_provider | String |  |
| email_signature | String |  |
| ews_endpoint | String |  |
| ews_ssl_verify_mode | Int |  |
| exchange_version | String |  |
| imap_host | String |  |
| imap_port | Int |  |
| imap_ssl | Boolean |  |
| max_emails_per_day | Int |  |
| max_mailings_per_day | Int |  |
| max_mailings_per_week | Int |  |
| opt_out_message | String |  |
| opt_out_signature | String |  |
| password | String |  |
| prospect_email_exclusions | String |  |
| provider_id | Int |  |
| provider_type | String |  |
| send_disabled | Boolean |  |
| send_errored_at | Instant |  |
| send_max_retries | Int |  |
| send_method | String |  |
| send_period | Int |  |
| send_requires_sync | Boolean |  |
| send_success_at | Instant |  |
| send_threshold | Int |  |
| sendgrid_api_key | String |  |
| sendgrid_webhook_url | String |  |
| smtp_host | String |  |
| smtp_password | String |  |
| smtp_port | Int |  |
| smtp_ssl | Boolean |  |
| smtp_username | String |  |
| sync_active_frequency | Int |  |
| sync_disabled | Boolean |  |
| sync_errored_at | Instant |  |
| sync_finished_at | Instant |  |
| sync_method | String |  |
| sync_outreach_folder | Boolean |  |
| sync_passive_frequency | Int |  |
| sync_success_at | Instant |  |
| type | String |  |
| updated_at | Instant |  |
| user_id | Int |  |
| username | String |  |
| validate_send | Boolean |  |
| validate_sync | Boolean |  |

### sequence

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_owner_id | Long | FK |
| relationship_ruleset_id | Long | FK |
| relationship_updater_id | Long | FK |
| automation_percentage | Double |  |
| bounce_count | Int |  |
| click_count | Int |  |
| created_at | Instant |  |
| deliver_count | Int |  |
| description | String |  |
| duration_in_days | Int |  |
| enabled | Boolean |  |
| enabled_at | Instant |  |
| failure_count | Int |  |
| finish_on_reply | Boolean |  |
| last_used_at | Instant |  |
| locked | Boolean |  |
| locked_at | Instant |  |
| max_activations | Int |  |
| name | String |  |
| negative_reply_count | Int |  |
| neutral_reply_count | Int |  |
| num_contacted_prospects | Int |  |
| num_replied_prospects | Int |  |
| open_count | Int |  |
| opt_out_count | Int |  |
| positive_reply_count | Int |  |
| primary_reply_action | String |  |
| primary_reply_pause_duration | Int |  |
| reply_count | Int |  |
| schedule_count | Int |  |
| schedule_interval_type | String |  |
| secondary_reply_action | String |  |
| secondary_reply_pause_duration | Int |  |
| sequence_step_count | Int |  |
| sequence_type | String |  |
| share_type | String |  |
| throttle_capacity | Int |  |
| throttle_max_adds_per_day | Int |  |
| throttle_paused | Boolean |  |
| throttle_paused_at | Instant |  |
| transactional | Boolean |  |
| type | String |  |
| updated_at | Instant |  |

### content_category

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| allow_sequences | Boolean |  |
| allow_snippets | Boolean |  |
| allow_templates | Boolean |  |
| color | String |  |
| created_at | Instant |  |
| name | String |  |
| type | String |  |
| updated_at | Instant |  |

### persona

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| created_at | Instant |  |
| description | String |  |
| name | String |  |
| type | String |  |
| updated_at | Instant |  |

### prospect_mobile_phone

| Column | Type | Keys |
| --- | --- | --- |
| phone_number | String | PK |
| prospect_id | Long | PK, FK |

### opportunity_prospect_role

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_opportunity_id | Long | FK |
| relationship_prospect_id | Long | FK |
| created_at | Instant |  |
| primary | Boolean |  |
| role | String |  |
| type | String |  |
| updated_at | Instant |  |

### stage

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_updater_id | Long | FK |
| color | String |  |
| created_at | Instant |  |
| name | String |  |
| order | Int |  |
| type | String |  |
| updated_at | Instant |  |

### custom_field

| Column | Type | Keys |
| --- | --- | --- |
| id | String |  |
| properties | Json |  |
| type | String |  |

### prospect_other_phone

| Column | Type | Keys |
| --- | --- | --- |
| phone_number | String | PK |
| prospect_id | Long | PK, FK |

### task

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_account_id | Long | FK |
| relationship_call_id | Long | FK |
| relationship_completer_id | Long | FK |
| relationship_creator_id | Long | FK |
| relationship_mailing_id | Long | FK |
| relationship_opportunity_id | Long | FK |
| relationship_owner_id | Long | FK |
| relationship_prospect_id | Long | FK |
| relationship_sequence_id | Long | FK |
| relationship_sequence_state_id | Long | FK |
| relationship_sequence_step_id | Long | FK |
| relationship_sequence_template_id | Long | FK |
| relationship_task_priority_id | Long | FK |
| relationship_template_id | Long | FK |
| action | String |  |
| added_at | Instant |  |
| compiled_sequence_template_html | String |  |
| completed | Boolean |  |
| completed_at | Instant |  |
| created_at | Instant |  |
| due_at | Instant |  |
| note | String |  |
| relationship_subject_id | Long |  |
| relationship_subject_type | String |  |
| scheduled_at | Instant |  |
| state | String |  |
| state_changed_at | Instant |  |
| task_type | String |  |
| type | String |  |
| updated_at | Instant |  |

### opportunity_stage

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| color | String |  |
| created_at | Instant |  |
| is_closed | Boolean |  |
| name | String |  |
| order | Int |  |
| type | String |  |
| updated_at | Instant |  |

### prospect_home_phone

| Column | Type | Keys |
| --- | --- | --- |
| phone_number | String | PK |
| prospect_id | Long | PK, FK |

### snippet_tag

| Column | Type | Keys |
| --- | --- | --- |
| tag_name | String | PK |
| snippet_id | Long | PK, FK |

### call_disposition

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| created_at | Instant |  |
| name | String |  |
| order | Int |  |
| outcome | String |  |
| type | String |  |
| updated_at | Instant |  |

### call_tag

| Column | Type | Keys |
| --- | --- | --- |
| tag_name | String | PK |
| call_id | Long | PK, FK |

### favorite

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_user_id | Long | FK |
| created_at | Instant |  |
| target_type | String |  |
| type | String |  |
| updated_at | Instant |  |

### role

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_parent_role_id | Long | FK |
| created_at | Instant |  |
| name | String |  |
| type | String |  |
| updated_at | Instant |  |

### mail_alias

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_mailbox_id | Long | FK |
| can_send | Boolean |  |
| created_at | Instant |  |
| email | String |  |
| email_hash | String |  |
| type | String |  |
| updated_at | Instant |  |

### template

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_owner_id | Long | FK |
| relationship_updater_id | Long | FK |
| archived | Boolean |  |
| archived_at | Instant |  |
| body_html | String |  |
| body_text | String |  |
| bounce_count | Int |  |
| click_count | Int |  |
| created_at | Instant |  |
| deliver_count | Int |  |
| failure_count | Int |  |
| last_used_at | Instant |  |
| name | String |  |
| negative_reply_count | Int |  |
| neutral_reply_count | Int |  |
| open_count | Int |  |
| opt_out_count | Int |  |
| positive_reply_count | Int |  |
| reply_count | Int |  |
| schedule_count | Int |  |
| share_type | String |  |
| subject | String |  |
| track_links | Boolean |  |
| track_opens | Boolean |  |
| type | String |  |
| updated_at | Instant |  |

### opportunity_tag

| Column | Type | Keys |
| --- | --- | --- |
| tag_name | String | PK |
| opportunity_id | Long | PK, FK |

### event

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_account_id | Long | FK |
| relationship_call_id | Long | FK |
| relationship_mailing_id | Long | FK |
| relationship_opportunity_id | Long | FK |
| relationship_prospect_id | Long | FK |
| relationship_task_id | Long | FK |
| relationship_user_id | Long | FK |
| body | String |  |
| created_at | Instant |  |
| event_at | Instant |  |
| external_url | String |  |
| name | String |  |
| payload | Json |  |
| request_city | String |  |
| request_device | String |  |
| request_host | String |  |
| request_proxied | Boolean |  |
| request_region | String |  |
| type | String |  |
| updated_at | Instant |  |

### snippet

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_owner_id | Long | FK |
| relationship_updater_id | Long | FK |
| body_html | String |  |
| body_text | String |  |
| created_at | Instant |  |
| name | String |  |
| share_type | String |  |
| type | String |  |
| updated_at | Instant |  |

### content_category_ownership

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_content_category_id | Long | FK |
| relationship_creator_id | Long | FK |
| relationship_owner_id | Long | FK |
| created_at | Instant |  |
| type | String |  |
| updated_at | Instant |  |

### prospect_tag

| Column | Type | Keys |
| --- | --- | --- |
| tag_name | String | PK |
| prospect_id | Long | PK, FK |

### prospect_favorite

| Column | Type | Keys |
| --- | --- | --- |
| favorite_id | Long | PK, FK |
| prospect_id | Long | PK, FK |

### call

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_call_disposition_id | Long | FK |
| relationship_call_purpose_id | Long | FK |
| relationship_opportunity_id | Long | FK |
| relationship_phone_number_id | Long | FK |
| relationship_prospect_id | Long | FK |
| relationship_sequence_id | Long | FK |
| relationship_sequence_state_id | Long | FK |
| relationship_sequence_step_id | Long | FK |
| relationship_task_id | Long | FK |
| relationship_user_id | Long | FK |
| answered_at | Instant |  |
| completed_at | Instant |  |
| created_at | Instant |  |
| dialed_at | Instant |  |
| direction | String |  |
| external_vendor | String |  |
| from | String |  |
| note | String |  |
| outcome | String |  |
| recording_url | String |  |
| returned_at | Instant |  |
| sequence_action | String |  |
| should_record_call | Boolean |  |
| state | String |  |
| state_changed_at | Instant |  |
| to | String |  |
| type | String |  |
| uid | String |  |
| updated_at | Instant |  |
| user_call_type | String |  |
| vendor_call_id | String |  |
| voicemail_recording_url | String |  |

### opportunity

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_account_id | Long | FK |
| relationship_creator_id | Long | FK |
| relationship_opportunity_stage_id | Long | FK |
| relationship_owner_id | Long | FK |
| relationship_stage_id | Long | FK |
| relationship_updater_id | Long | FK |
| amount | Int |  |
| close_date | Instant |  |
| created_at | Instant |  |
| currency_type | String |  |
| description | String |  |
| external_created_at | Instant |  |
| map_link | String |  |
| map_next_steps | String |  |
| map_status | String |  |
| name | String |  |
| next_step | String |  |
| opportunity_type | String |  |
| probability | Int |  |
| prospecting_rep_id | String |  |
| sharing_team_id | String |  |
| touched_at | Instant |  |
| type | String |  |
| updated_at | Instant |  |

### mailing_reference

| Column | Type | Keys |
| --- | --- | --- |
| reference | String | PK |
| mailing_id | Long | PK, FK |

### active_step_mailing

| Column | Type | Keys |
| --- | --- | --- |
| mailing_id | Long | PK, FK |
| sequence_state_id | Long | PK, FK |

### team

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| relationship_creator_id | Long | FK |
| relationship_updater_id | Long | FK |
| color | String |  |
| created_at | Instant |  |
| name | String |  |
| scim_external_id | String |  |
| scim_source | String |  |
| type | String |  |
| updated_at | Instant |  |

## Relationships

- account(relationship_creator_id) → users(id)
- account(relationship_owner_id) → users(id)
- account(relationship_updater_id) → users(id)
- template_cc_recipient(template_id) → template(id)
- active_step_task(sequence_state_id) → sequence_state(id)
- active_step_task(task_id) → task(id)
- email_address(relationship_prospect_id) → prospect(id)
- users(relationship_mailbox_id) → mailbox(id)
- users(relationship_creator_id) → users(id)
- users(relationship_profile_id) → profile(id)
- users(relationship_updater_id) → users(id)
- users(relationship_role_id) → role(id)
- mailing(relationship_follow_up_sequence_id) → sequence(id)
- mailing(relationship_mailbox_id) → mailbox(id)
- mailing(relationship_opportunity_id) → opportunity(id)
- mailing(relationship_prospect_id) → prospect(id)
- mailing(relationship_sequence_id) → sequence(id)
- mailing(relationship_sequence_state_id) → sequence_state(id)
- mailing(relationship_sequence_step_id) → sequence_step(id)
- mailing(relationship_task_id) → task(id)
- mailing(relationship_template_id) → template(id)
- mailing(relationship_user_id) → users(id)
- template_tag(template_id) → template(id)
- prospect(relationship_creator_id) → users(id)
- prospect(relationship_owner_id) → users(id)
- prospect(relationship_account_id) → account(id)
- prospect(relationship_stage_id) → stage(id)
- prospect(relationship_persona_id) → persona(id)
- prospect(relationship_updater_id) → users(id)
- prospect_work_phone(prospect_id) → prospect(id)
- sequence_state(relationship_creator_id) → users(id)
- sequence_state(relationship_account_id) → account(id)
- sequence_state(relationship_opportunity_id) → opportunity(id)
- sequence_state(relationship_sequence_id) → sequence(id)
- sequence_state(relationship_sequence_step_id) → sequence_step(id)
- sequence_state(relationship_prospect_id) → prospect(id)
- sequence_state(relationship_mailbox_id) → mailbox(id)
- sequence_step(relationship_creator_id) → users(id)
- sequence_step(relationship_sequence_id) → sequence(id)
- sequence_step(relationship_call_purpose_id) → call_purpose(id)
- sequence_step(relationship_updater_id) → users(id)
- sequence_step(relationship_task_priority_id) → task_priority(id)
- prospect_email(prospect_id) → prospect(id)
- template_to_recipient(template_id) → template(id)
- account_tag(account_id) → account(id)
- sequence_template(relationship_creator_id) → users(id)
- sequence_template(relationship_updater_id) → users(id)
- sequence_template(relationship_template_id) → template(id)
- sequence_template(relationship_sequence_step_id) → sequence_step(id)
- mailing_recipient(mailing_id) → mailing(id)
- mailing_recipient(recipient_id) → recipient(id)
- user_duty(user_id) → users(id)
- user_email_recipients(user_id) → users(id)
- user_email_recipients(recipient_id) → recipient(id)
- user_team(user_id) → users(id)
- user_team(team_id) → team(id)
- template_bcc_recipient(template_id) → template(id)
- sequence_tag(sequence_id) → sequence(id)
- compliance_request(relationship_requester_id) → users(id)
- call_purpose(relationship_creator_id) → users(id)
- prospect_voip_phone(prospect_id) → prospect(id)
- ruleset(relationship_bounced_stage_id) → stage(id)
- ruleset(relationship_completed_stage_id) → stage(id)
- ruleset(relationship_delivered_stage_id) → stage(id)
- ruleset(relationship_finished_stage_id) → stage(id)
- ruleset(relationship_opted_out_stage_id) → stage(id)
- ruleset(relationship_replied_stage_id) → stage(id)
- ruleset(relationship_started_stage_id) → stage(id)
- ruleset(relationship_owner_id) → users(id)
- ruleset(relationship_call_task_priority_from_clicks_id) → task_priority(id)
- ruleset(relationship_call_task_priority_from_opens_id) → task_priority(id)
- ruleset(relationship_call_task_priority_id) → task_priority(id)
- content_category_membership(relationship_content_category_id) → content_category(id)
- content_category_membership(relationship_creator_id) → users(id)
- phone_number(relationship_prospect_id) → prospect(id)
- mailbox(relationship_creator_id) → users(id)
- mailbox(relationship_updater_id) → users(id)
- mailbox(relationship_user_id) → users(id)
- sequence(relationship_creator_id) → users(id)
- sequence(relationship_owner_id) → users(id)
- sequence(relationship_updater_id) → users(id)
- sequence(relationship_ruleset_id) → ruleset(id)
- content_category(relationship_creator_id) → users(id)
- prospect_mobile_phone(prospect_id) → prospect(id)
- opportunity_prospect_role(relationship_opportunity_id) → opportunity(id)
- opportunity_prospect_role(relationship_prospect_id) → prospect(id)
- stage(relationship_creator_id) → users(id)
- stage(relationship_updater_id) → users(id)
- prospect_other_phone(prospect_id) → prospect(id)
- task(relationship_creator_id) → users(id)
- task(relationship_owner_id) → users(id)
- task(relationship_completer_id) → users(id)
- task(relationship_account_id) → account(id)
- task(relationship_mailing_id) → mailing(id)
- task(relationship_call_id) → call(id)
- task(relationship_opportunity_id) → opportunity(id)
- task(relationship_prospect_id) → prospect(id)
- task(relationship_sequence_id) → sequence(id)
- task(relationship_sequence_state_id) → sequence_state(id)
- task(relationship_sequence_step_id) → sequence_step(id)
- task(relationship_sequence_template_id) → sequence_template(id)
- task(relationship_task_priority_id) → task_priority(id)
- task(relationship_template_id) → template(id)
- opportunity_stage(relationship_creator_id) → users(id)
- prospect_home_phone(prospect_id) → prospect(id)
- snippet_tag(snippet_id) → snippet(id)
- call_disposition(relationship_creator_id) → users(id)
- call_tag(call_id) → call(id)
- favorite(relationship_creator_id) → users(id)
- favorite(relationship_user_id) → users(id)
- role(relationship_parent_role_id) → role(id)
- mail_alias(relationship_mailbox_id) → mailbox(id)
- template(relationship_creator_id) → users(id)
- template(relationship_owner_id) → users(id)
- template(relationship_updater_id) → users(id)
- opportunity_tag(opportunity_id) → opportunity(id)
- event(relationship_mailing_id) → mailing(id)
- event(relationship_prospect_id) → prospect(id)
- event(relationship_user_id) → users(id)
- event(relationship_account_id) → account(id)
- event(relationship_call_id) → call(id)
- event(relationship_opportunity_id) → opportunity(id)
- event(relationship_task_id) → task(id)
- snippet(relationship_creator_id) → users(id)
- snippet(relationship_updater_id) → users(id)
- snippet(relationship_owner_id) → users(id)
- content_category_ownership(relationship_content_category_id) → content_category(id)
- content_category_ownership(relationship_creator_id) → users(id)
- content_category_ownership(relationship_owner_id) → users(id)
- prospect_tag(prospect_id) → prospect(id)
- prospect_favorite(prospect_id) → prospect(id)
- prospect_favorite(favorite_id) → favorite(id)
- call(relationship_call_disposition_id) → call_disposition(id)
- call(relationship_call_purpose_id) → call_purpose(id)
- call(relationship_opportunity_id) → opportunity(id)
- call(relationship_phone_number_id) → phone_number(id)
- call(relationship_prospect_id) → prospect(id)
- call(relationship_sequence_id) → sequence(id)
- call(relationship_sequence_state_id) → sequence_state(id)
- call(relationship_sequence_step_id) → sequence_step(id)
- call(relationship_task_id) → task(id)
- call(relationship_user_id) → users(id)
- opportunity(relationship_account_id) → account(id)
- opportunity(relationship_creator_id) → users(id)
- opportunity(relationship_opportunity_stage_id) → opportunity_stage(id)
- opportunity(relationship_owner_id) → users(id)
- opportunity(relationship_stage_id) → stage(id)
- opportunity(relationship_updater_id) → users(id)
- mailing_reference(mailing_id) → mailing(id)
- active_step_mailing(sequence_state_id) → sequence_state(id)
- active_step_mailing(mailing_id) → mailing(id)
- team(relationship_creator_id) → users(id)
- team(relationship_updater_id) → users(id)
