# Salesforce schema ERD

Table and field reference for the Fivetran Salesforce connector.

## Table & Field Reference

### event_relation

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| event_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| relation_id | String |  |
| responded_date | Instant |  |
| response | String |  |
| status | String |  |
| system_modstamp | Instant |  |

### lead_status

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| api_name | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_converted | Boolean |  |
| is_default | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| master_label | String |  |
| sort_order | Long |  |
| system_modstamp | Instant |  |

### asset

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| contact_id | String | FK |
| city | String |  |
| country | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| geocode_accuracy | String |  |
| install_date | LocalDate |  |
| is_competitor_product | Boolean |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| latitude | Double |  |
| longitude | Double |  |
| name | String |  |
| parent_id | String |  |
| postal_code | String |  |
| price | Double |  |
| product_2_id | String |  |
| purchase_date | LocalDate |  |
| quantity | Double |  |
| root_asset_id | String |  |
| serial_number | String |  |
| state | String |  |
| status | String |  |
| stock_keeping_unit | String |  |
| street | String |  |
| system_modstamp | Instant |  |
| usage_end_date | LocalDate |  |

### entitlement_contact

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| contact_id | String | FK |
| entitlement_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| name | String |  |
| system_modstamp | Instant |  |

### case_status

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| api_name | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_closed | Boolean |  |
| is_default | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| master_label | String |  |
| sort_order | Long |  |
| system_modstamp | Instant |  |

### contact

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| department | String |  |
| email | String |  |
| email_bounced_date | Instant |  |
| email_bounced_reason | String |  |
| fax | String |  |
| first_name | String |  |
| is_deleted | Boolean |  |
| is_email_bounced | Boolean |  |
| jigsaw | String |  |
| jigsaw_contact_id | String |  |
| last_activity_date | LocalDate |  |
| last_curequest_date | Instant |  |
| last_cuupdate_date | Instant |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_name | String |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| mailing_city | String |  |
| mailing_country | String |  |
| mailing_geocode_accuracy | String |  |
| mailing_latitude | Double |  |
| mailing_longitude | Double |  |
| mailing_postal_code | String |  |
| mailing_state | String |  |
| mailing_street | String |  |
| master_record_id | String |  |
| mobile_phone | String |  |
| name | String |  |
| owner_id | String |  |
| phone | String |  |
| photo_url | String |  |
| reports_to_id | String |  |
| salutation | String |  |
| system_modstamp | Instant |  |
| title | String |  |

### case_milestone

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| case_id | String | FK |
| business_hours_id | String |  |
| completion_date | Instant |  |
| created_by_id | String |  |
| created_date | Instant |  |
| elapsed_time_in_days | Double |  |
| elapsed_time_in_hrs | Double |  |
| elapsed_time_in_mins | Long |  |
| is_completed | Boolean |  |
| is_deleted | String |  |
| is_violated | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| milestone_type_id | String |  |
| start_date | Instant |  |
| system_modstamp | Instant |  |
| target_date | Instant |  |
| target_response_in_days | Double |  |
| target_response_in_hrs | Double |  |
| target_response_in_mins | Long |  |
| time_remaining_in_days | Double |  |
| time_remaining_in_hrs | String |  |
| time_remaining_in_mins | String |  |
| time_since_target_in_days | Double |  |
| time_since_target_in_hrs | String |  |
| time_since_target_in_mins | String |  |

### campaign

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| actual_cost | Double |  |
| amount_all_opportunities | Double |  |
| amount_won_opportunities | Double |  |
| budgeted_cost | Double |  |
| campaign_member_record_type_id | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| end_date | LocalDate |  |
| expected_response | Double |  |
| expected_revenue | Double |  |
| is_active | Boolean |  |
| is_deleted | String |  |
| last_activity_date | LocalDate |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| name | String |  |
| number_of_contacts | Long |  |
| number_of_converted_leads | Long |  |
| number_of_leads | Long |  |
| number_of_opportunities | Long |  |
| number_of_responses | Long |  |
| number_of_won_opportunities | Long |  |
| number_sent | Double |  |
| owner_id | String |  |
| parent_id | String |  |
| start_date | LocalDate |  |
| status | String |  |
| system_modstamp | Instant |  |
| type | String |  |

### opportunity

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| stage_id | String | FK |
| amount | Double |  |
| campaign_id | String |  |
| close_date | LocalDate |  |
| contact_id | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| fiscal | String |  |
| fiscal_quarter | Long |  |
| fiscal_year | Long |  |
| forecast_category | String |  |
| forecast_category_name | String |  |
| has_open_activity | Boolean |  |
| has_opportunity_line_item | Boolean |  |
| has_overdue_task | Boolean |  |
| is_closed | Boolean |  |
| is_deleted | Boolean |  |
| is_won | Boolean |  |
| last_activity_date | LocalDate |  |
| last_amount_changed_history_id | String |  |
| last_close_date_changed_history_id | String |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_stage_change_date | Instant |  |
| last_viewed_date | Instant |  |
| lead_source | String |  |
| name | String |  |
| next_step | String |  |
| owner_id | String |  |
| pricebook_2_id | String |  |
| probability | Double |  |
| push_count | Long |  |
| stage_name | String |  |
| system_modstamp | Instant |  |
| type | String |  |

### case_article

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| case_id | String | FK |
| knowledge_article_id | String | FK |
| article_language | String |  |
| article_version_number | Long |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| is_shared_by_email | Boolean |  |
| knowledge_article_version_id | String |  |
| system_modstamp | Instant |  |

### content_version

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| checksum | String |  |
| content_body_id | String |  |
| content_document_id | String |  |
| content_location | String |  |
| content_modified_by_id | String |  |
| content_modified_date | Instant |  |
| content_size | Long |  |
| content_url | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| external_data_source_id | String |  |
| external_document_info_1 | String |  |
| external_document_info_2 | String |  |
| featured_content_boost | Long |  |
| featured_content_date | LocalDate |  |
| file_extension | String |  |
| file_type | String |  |
| first_publish_location_id | String |  |
| is_asset_enabled | Boolean |  |
| is_deleted | Boolean |  |
| is_latest | Boolean |  |
| is_major_version | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| negative_rating_count | Long |  |
| origin | String |  |
| owner_id | String |  |
| path_on_client | String |  |
| positive_rating_count | Long |  |
| publish_status | String |  |
| rating_count | Long |  |
| reason_for_change | String |  |
| sharing_option | String |  |
| sharing_privacy | String |  |
| system_modstamp | Instant |  |
| tag_csv | String |  |
| text_preview | String |  |
| title | String |  |
| version_data_url | String |  |
| version_number | String |  |

### fivetran_api_call

| Column | Type | Keys |
| --- | --- | --- |
| start | Instant | PK |
| method | String |  |
| update_id | String |  |
| uri | String |  |

### opportunity_contact_role

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| contact_id | String | FK |
| opportunity_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| is_primary | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| role | String |  |
| system_modstamp | Instant |  |

### case_solution

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| case_id | String | FK |
| solution_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| system_modstamp | Instant |  |

### user_profile_feed

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

### lead

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| status_id | String | FK |
| city | String |  |
| company | String |  |
| converted_account_id | String |  |
| converted_contact_id | String |  |
| converted_date | LocalDate |  |
| converted_opportunity_id | String |  |
| country | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| email | String |  |
| email_bounced_date | Instant |  |
| email_bounced_reason | String |  |
| first_name | String |  |
| industry | String |  |
| is_converted | Boolean |  |
| is_deleted | Boolean |  |
| is_unread_by_owner | Boolean |  |
| jigsaw_contact_id | String |  |
| last_activity_date | LocalDate |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_name | String |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| latitude | Double |  |
| lead_source | String |  |
| longitude | Double |  |
| master_record_id | String |  |
| name | String |  |
| number_of_employees | Long |  |
| owner_id | String |  |
| phone | String |  |
| photo_url | String |  |
| salutation | String |  |
| state | String |  |
| status | String |  |
| street | String |  |
| system_modstamp | Instant |  |
| title | String |  |
| website | String |  |

### partner

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| role_id | String | FK |
| account_from_id | String |  |
| account_to_id | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| is_primary | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| opportunity_id | String |  |
| reverse_partner_id | String |  |
| role | String |  |
| system_modstamp | Instant |  |

### knowledge_article_vote_stat

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| knowledge_article_id | String | FK |
| channel | String |  |
| is_deleted | Boolean |  |
| normalized_score | Double |  |
| parent_id | String |  |

### task_status

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| api_name | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_closed | Boolean |  |
| is_default | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| master_label | String |  |
| sort_order | Long |  |
| system_modstamp | Instant |  |

### case_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| case_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| data_type | String |  |
| field | String |  |
| is_deleted | Boolean |  |
| new_value | String |  |
| old_value | String |  |

### task

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| asset_id | String | FK |
| campaign_id | String | FK |
| case_id | String | FK |
| contact_id | String | FK |
| contract_id | String | FK |
| lead_id | String | FK |
| opportunity_id | String | FK |
| priority_id | String | FK |
| status_id | String | FK |
| call_disposition | String |  |
| call_duration_in_seconds | Long |  |
| call_object | String |  |
| call_type | String |  |
| completed_date_time | Instant |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| is_closed | Boolean |  |
| is_deleted | Boolean |  |
| is_high_priority | Boolean |  |
| is_recurrence | Boolean |  |
| is_reminder_set | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| owner_id | String |  |
| priority | String |  |
| recurrence_activity_id | String |  |
| recurrence_day_of_month | Long |  |
| recurrence_day_of_week_mask | Long |  |
| recurrence_end_date_only | LocalDate |  |
| recurrence_interval | Long |  |
| recurrence_month_of_year | String |  |
| recurrence_regenerated_type | String |  |
| recurrence_start_date_only | LocalDate |  |
| recurrence_type | String |  |
| reminder_date_time | Instant |  |
| status | String |  |
| subject | String |  |
| system_modstamp | Instant |  |
| task_subtype | String |  |

### news_feed

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| best_comment_id | String |  |
| body | String |  |
| comment_count | Long |  |
| created_by_id | String |  |
| created_date | String |  |
| inserted_by_id | String |  |
| is_deleted | String |  |
| is_rich_text | Boolean |  |
| last_modified_date | Instant |  |
| like_count | Long |  |
| link_url | String |  |
| network_scope | String |  |
| parent_id | String |  |
| related_record_id | String |  |
| system_modstamp | String |  |
| title | String |  |
| type | String |  |
| visibility | String |  |

### feed_comment

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| feed_post_id | String | FK |
| comment_body | String |  |
| comment_type | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| feed_item_id | String |  |
| has_entity_links | Boolean |  |
| inserted_by_id | String |  |
| is_deleted | Boolean |  |
| is_rich_text | Boolean |  |
| is_verified | Boolean |  |
| last_edit_by_id | String |  |
| last_edit_date | Instant |  |
| parent_id | String |  |
| related_record_id | String |  |
| revision | Long |  |
| status | String |  |
| system_modstamp | Instant |  |
| thread_children_count | Long |  |
| thread_last_updated_date | Instant |  |
| thread_level | Long |  |
| thread_parent_id | String |  |

### fivetran_query

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| done | Instant |  |
| merge_mode | String |  |
| modified_field | String |  |
| modified_since_inclusive | Instant |  |
| query | String |  |
| rows_updated_or_inserted | Long |  |
| source_api | String |  |
| source_object | String |  |
| start | Instant |  |

### account

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_source | String |  |
| annual_revenue | Double |  |
| billing_city | String |  |
| billing_country | String |  |
| billing_geocode_accuracy | String |  |
| billing_latitude | Double |  |
| billing_longitude | Double |  |
| billing_postal_code | String |  |
| billing_state | String |  |
| billing_street | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| industry | String |  |
| is_deleted | Boolean |  |
| jigsaw | String |  |
| jigsaw_company_id | String |  |
| last_activity_date | LocalDate |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| master_record_id | String |  |
| name | String |  |
| number_of_employees | Long |  |
| owner_id | String |  |
| parent_id | String |  |
| phone | String |  |
| photo_url | String |  |
| shipping_city | String |  |
| shipping_country | String |  |
| shipping_geocode_accuracy | String |  |
| shipping_latitude | Double |  |
| shipping_longitude | Double |  |
| shipping_postal_code | String |  |
| shipping_state | String |  |
| shipping_street | String |  |
| sic_desc | String |  |
| system_modstamp | Instant |  |
| type | String |  |
| website | String |  |

### account_contact_role

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| contact_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| is_primary | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| role | String |  |
| system_modstamp | Instant |  |

### email_message

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| case_id | String | FK |
| activity_id | String |  |
| attachment_ids | String |  |
| automation_type | String |  |
| bcc_address | String |  |
| cc_address | String |  |
| client_thread_identifier | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| email_template_id | String |  |
| first_opened_date | Instant |  |
| from_address | String |  |
| from_id | String |  |
| from_name | String |  |
| has_attachment | Boolean |  |
| headers | String |  |
| html_body | String |  |
| incoming | Boolean |  |
| is_bounced | Boolean |  |
| is_client_managed | Boolean |  |
| is_deleted | Boolean |  |
| is_externally_visible | Boolean |  |
| is_opened | Boolean |  |
| is_tracked | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_opened_date | Instant |  |
| message_date | Instant |  |
| message_identifier | String |  |
| name | String |  |
| parent_id | String |  |
| related_to_id | String |  |
| reply_to_email_message_id | String |  |
| status | String |  |
| subject | String |  |
| system_modstamp | Instant |  |
| text_body | String |  |
| thread_identifier | String |  |
| to_address | String |  |
| validated_from_address | String |  |

### directory

| Column | Type | Keys |
| --- | --- | --- |
| relative_path | String | FK |
| etag | String |  |
| file_url | String |  |
| last_modified | Instant |  |
| md_5 | String |  |
| size | Long |  |

### quote

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| opportunity_id | String | FK |
| account_id | String |  |
| billing_city | String |  |
| billing_country | String |  |
| billing_geocode_accuracy | String |  |
| billing_latitude | Double |  |
| billing_longitude | Double |  |
| billing_name | String |  |
| billing_postal_code | String |  |
| billing_state | String |  |
| billing_street | String |  |
| can_create_quote_line_items | Boolean |  |
| contact_id | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| discount | Double |  |
| email | String |  |
| expiration_date | LocalDate |  |
| fax | String |  |
| grand_total | Double |  |
| is_deleted | Boolean |  |
| is_syncing | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| name | String |  |
| owner_id | String |  |
| phone | String |  |
| pricebook_2_id | String |  |
| quote_number | String |  |
| shipping_city | String |  |
| shipping_country | String |  |
| shipping_name | String |  |
| shipping_postal_code | String |  |
| shipping_state | String |  |
| shipping_street | String |  |
| status | String |  |
| system_modstamp | Instant |  |
| tax | Double |  |

### opportunity_stage

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| created_date | Instant |  |
| is_active | Boolean |  |
| is_closed | Boolean |  |
| is_won | Boolean |  |
| last_modified_date | Instant |  |
| master_label | String |  |
| sort_order | Long |  |
| system_modstamp | Instant |  |

### event

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| asset_id | String | FK |
| campaign_id | String | FK |
| case_id | String | FK |
| contact_id | String | FK |
| contract_id | String | FK |
| lead_id | String | FK |
| opportunity_id | String | FK |
| activity_date | LocalDate |  |
| activity_date_time | Instant |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| duration_in_minutes | Long |  |
| end_date | LocalDate |  |
| end_date_time | Instant |  |
| event_subtype | String |  |
| group_event_type | String |  |
| is_child | Boolean |  |
| is_deleted | Boolean |  |
| is_group_event | Boolean |  |
| is_private | Boolean |  |
| is_recurrence | Boolean |  |
| is_recurrence_2 | Boolean |  |
| is_recurrence_2_exception | Boolean |  |
| is_recurrence_2_exclusion | Boolean |  |
| is_reminder_set | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| owner_id | String |  |
| recurrence_2_pattern_start_date | Instant |  |
| recurrence_2_pattern_time_zone | String |  |
| recurrence_2_pattern_version | String |  |
| recurrence_activity_id | String |  |
| recurrence_end_date_only | LocalDate |  |
| recurrence_type | String |  |
| reminder_date_time | Instant |  |
| show_as | String |  |
| start_date_time | Instant |  |
| subject | String |  |
| system_modstamp | Instant |  |

### entitlement

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| asset_id | String | FK |
| contact_id | String | FK |
| service_contract_id | String | FK |
| business_hours_id | String |  |
| cases_per_entitlement | Long |  |
| contract_line_item_id | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| end_date | LocalDate |  |
| is_deleted | Boolean |  |
| is_per_incident | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| name | String |  |
| remaining_cases | Long |  |
| sla_process_id | String |  |
| start_date | LocalDate |  |
| status | String |  |
| system_modstamp | Instant |  |
| type | String |  |

### feed_post

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| news_feed_id | String | FK |

### solution

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| status_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| is_html | Boolean |  |
| is_published | Boolean |  |
| is_published_in_public_kb | Boolean |  |
| is_reviewed | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| owner_id | String |  |
| solution_name | String |  |
| solution_note | String |  |
| solution_number | String |  |
| status | String |  |
| system_modstamp | Instant |  |
| times_used | Long |  |

### contract_line_item

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| contract_id | String | FK |
| service_contract_id | String | FK |
| asset_id | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| discount | Double |  |
| end_date | LocalDate |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| line_item_number | String |  |
| list_price | Double |  |
| parent_contract_line_item_id | String |  |
| pricebook_entry_id | String |  |
| product_2_id | String |  |
| quantity | Double |  |
| root_contract_line_item_id | String |  |
| start_date | LocalDate |  |
| status | String |  |
| subtotal | Double |  |
| system_modstamp | Instant |  |
| total_price | Double |  |
| unit_price | Double |  |

### case

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| asset_id | String | FK |
| contact_id | String | FK |
| status_id | String | FK |
| case_number | String |  |
| closed_date | Instant |  |
| comments | String |  |
| contact_email | String |  |
| contact_fax | String |  |
| contact_mobile | String |  |
| contact_phone | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| is_closed | Boolean |  |
| is_deleted | Boolean |  |
| is_escalated | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| master_record_id | String |  |
| origin | String |  |
| owner_id | String |  |
| parent_id | String |  |
| priority | String |  |
| reason | String |  |
| status | String |  |
| subject | String |  |
| supplied_company | String |  |
| supplied_email | String |  |
| supplied_name | String |  |
| supplied_phone | String |  |
| system_modstamp | Instant |  |
| type | String |  |

### contract

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| opportunity_id | String | FK |
| activated_by_id | String |  |
| activated_date | Instant |  |
| billing_city | String |  |
| billing_country | String |  |
| billing_geocode_accuracy | String |  |
| billing_latitude | Double |  |
| billing_longitude | Double |  |
| billing_postal_code | String |  |
| billing_state | String |  |
| billing_street | String |  |
| company_signed_date | LocalDate |  |
| company_signed_id | String |  |
| contract_number | String |  |
| contract_term | Long |  |
| created_by_id | String |  |
| created_date | Instant |  |
| customer_signed_date | LocalDate |  |
| customer_signed_id | String |  |
| customer_signed_title | String |  |
| description | String |  |
| end_date | LocalDate |  |
| is_deleted | Boolean |  |
| last_activity_date | LocalDate |  |
| last_approved_date | Instant |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| owner_expiration_notice | String |  |
| owner_id | String |  |
| shipping_city | String |  |
| shipping_country | String |  |
| shipping_postal_code | String |  |
| shipping_state | String |  |
| special_terms | String |  |
| start_date | LocalDate |  |
| status | String |  |
| status_code | String |  |
| system_modstamp | Instant |  |

### knowledge_article_version

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| knowledge_article_id | String | FK |
| archived_by_id | String |  |
| archived_date | Instant |  |
| article_archived_by_id | String |  |
| article_archived_date | Instant |  |
| article_case_attach_count | Long |  |
| article_created_by_id | String |  |
| article_created_date | Instant |  |
| article_number | String |  |
| article_total_view_count | Long |  |
| assigned_by_id | String |  |
| assigned_to_id | String |  |
| assignment_date | Instant |  |
| assignment_due_date | Instant |  |
| assignment_note | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| first_published_date | Instant |  |
| is_deleted | Boolean |  |
| is_latest_version | Boolean |  |
| is_visible_in_app | Boolean |  |
| is_visible_in_csp | Boolean |  |
| is_visible_in_pkb | Boolean |  |
| is_visible_in_prm | Boolean |  |
| language | String |  |
| large_language_model | String |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_published_date | Instant |  |
| migrated_to_from_article_version | String |  |
| next_review_date | Instant |  |
| owner_id | String |  |
| publish_status | String |  |
| source_id | String |  |
| summary | String |  |
| system_modstamp | Instant |  |
| title | String |  |
| url_name | String |  |
| version_number | Long |  |

### opportunity_competitor

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| opportunity_id | String | FK |
| partner_id | String | FK |
| competitor_name | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| strengths | String |  |
| system_modstamp | Instant |  |
| weaknesses | String |  |

### partner_role

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| api_name | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| master_label | String |  |
| reverse_role | String |  |
| sort_order | Long |  |
| system_modstamp | Instant |  |

### knowledge_article_view_stat

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| knowledge_article_id | String | FK |
| channel | String |  |
| is_deleted | String |  |
| normalized_score | Double |  |
| parent_id | String |  |
| view_count | Long |  |

### solution_status

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| api_name | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_default | Boolean |  |
| is_reviewed | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| master_label | String |  |
| sort_order | Long |  |
| system_modstamp | String |  |

### campaign_member

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_id | String | FK |
| contact_id | String | FK |
| lead_id | String | FK |
| city | String |  |
| company_or_account | String |  |
| country | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| description | String |  |
| do_not_call | Boolean |  |
| email | String |  |
| fax | String |  |
| first_name | String |  |
| first_responded_date | LocalDate |  |
| has_opted_out_of_email | Boolean |  |
| has_opted_out_of_fax | Boolean |  |
| has_responded | Boolean |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_name | String |  |
| lead_or_contact_id | String |  |
| lead_or_contact_owner_id | String |  |
| lead_source | String |  |
| mobile_phone | String |  |
| name | String |  |
| phone | String |  |
| postal_code | String |  |
| salutation | String |  |
| state | String |  |
| status | String |  |
| street | String |  |
| system_modstamp | Instant |  |
| title | String |  |
| type | String |  |

### task_priority

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| api_name | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_default | Boolean |  |
| is_high_priority | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| master_label | String |  |
| sort_order | Long |  |
| system_modstamp | Instant |  |

### service_contract

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| activation_date | Instant |  |
| approval_status | String |  |
| billing_city | String |  |
| billing_country | String |  |
| billing_geocode_accuracy | String |  |
| billing_latitude | Double |  |
| billing_longitude | Double |  |
| billing_postal_code | String |  |
| billing_state | String |  |
| billing_street | String |  |
| contact_id | String |  |
| contract_number | String |  |
| created_by_id | String |  |
| created_date | String |  |
| description | String |  |
| discount | Double |  |
| end_date | LocalDate |  |
| grand_total | Double |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| name | String |  |
| owner_id | String |  |
| pricebook_2_id | String |  |
| shipping_city | String |  |
| shipping_country | String |  |
| shipping_geocode_accuracy | String |  |
| shipping_handling | Double |  |
| shipping_latitude | Double |  |
| shipping_longitude | Double |  |
| shipping_postal_code | String |  |
| shipping_state | String |  |
| shipping_street | String |  |
| start_date | LocalDate |  |
| status | String |  |
| system_modstamp | Instant |  |
| tax | Double |  |
| term | String |  |

### case_comment

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| case_id | String | FK |
| comment_body | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| is_published | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| parent_id | String |  |
| system_modstamp | Instant |  |

### knowledge_article

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| archived_by_id | String |  |
| archived_date | Instant |  |
| article_number | String |  |
| case_association_count | Long |  |
| created_by_id | String |  |
| created_date | Instant |  |
| first_published_date | Instant |  |
| is_deleted | Boolean |  |
| is_generated_by_llm | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_published_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| migrated_to_from_article | String |  |
| system_modstamp | Instant |  |
| total_view_count | Long |  |

### order

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| account_id | String | FK |
| contract_id | String | FK |
| quote_id | String | FK |
| activated_by_id | String |  |
| activated_date | Instant |  |
| billing_city | String |  |
| billing_country | String |  |
| billing_geocode_accuracy | String |  |
| billing_latitude | Double |  |
| billing_longitude | String |  |
| billing_postal_code | String |  |
| billing_state | String |  |
| billing_street | String |  |
| company_authorized_by_id | String |  |
| created_by_id | String |  |
| created_date | Instant |  |
| customer_authorized_by_id | String |  |
| description | String |  |
| effective_date | LocalDate |  |
| end_date | LocalDate |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| last_referenced_date | Instant |  |
| last_viewed_date | Instant |  |
| order_number | String |  |
| owner_id | String |  |
| pricebook_2_id | String |  |
| shipping_city | String |  |
| shipping_country | String |  |
| shipping_geocode_accuracy | String |  |
| shipping_latitude | Double |  |
| shipping_longitude | Double |  |
| shipping_postal_code | String |  |
| shipping_state | String |  |
| shipping_street | String |  |
| status | String |  |
| status_code | String |  |
| system_modstamp | String |  |
| total_amount | Double |  |
| type | String |  |

### vote

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| knowledge_article_id | String | FK |
| created_by_id | String |  |
| created_date | Instant |  |
| is_deleted | Boolean |  |
| last_modified_by_id | String |  |
| last_modified_date | Instant |  |
| parent_id | String |  |
| system_modstamp | Instant |  |
| type | String |  |

## Relationships

- event_relation(event_id) → event(id)
- asset(account_id) → account(id)
- asset(contact_id) → contact(id)
- entitlement_contact(contact_id) → contact(id)
- entitlement_contact(entitlement_id) → entitlement(id)
- contact(account_id) → account(id)
- case_milestone(case_id) → case(id)
- opportunity(account_id) → account(id)
- opportunity(stage_id) → opportunity_stage(id)
- case_article(case_id) → case(id)
- case_article(knowledge_article_id) → knowledge_article(id)
- opportunity_contact_role(contact_id) → contact(id)
- opportunity_contact_role(opportunity_id) → opportunity(id)
- case_solution(case_id) → case(id)
- case_solution(solution_id) → solution(id)
- lead(status_id) → lead_status(id)
- partner(account_id) → account(id)
- partner(role_id) → partner_role(id)
- knowledge_article_vote_stat(knowledge_article_id) → knowledge_article(id)
- case_history(case_id) → case(id)
- task(account_id) → account(id)
- task(asset_id) → asset(id)
- task(campaign_id) → campaign(id)
- task(case_id) → case(id)
- task(contact_id) → contact(id)
- task(contract_id) → contract(id)
- task(lead_id) → lead(id)
- task(opportunity_id) → opportunity(id)
- task(priority_id) → task_priority(id)
- task(status_id) → task_status(id)
- feed_comment(feed_post_id) → feed_post(id)
- account_contact_role(account_id) → account(id)
- account_contact_role(contact_id) → contact(id)
- email_message(case_id) → case(id)
- directory(relative_path) → content_version(id)
- quote(opportunity_id) → opportunity(id)
- event(account_id) → account(id)
- event(asset_id) → asset(id)
- event(campaign_id) → campaign(id)
- event(case_id) → case(id)
- event(contact_id) → contact(id)
- event(contract_id) → contract(id)
- event(lead_id) → lead(id)
- event(opportunity_id) → opportunity(id)
- entitlement(account_id) → account(id)
- entitlement(service_contract_id) → service_contract(id)
- entitlement(asset_id) → asset(id)
- entitlement(contact_id) → contact(id)
- feed_post(news_feed_id) → news_feed(id)
- solution(status_id) → solution_status(id)
- contract_line_item(service_contract_id) → service_contract(id)
- contract_line_item(contract_id) → contract(id)
- case(account_id) → account(id)
- case(contact_id) → contact(id)
- case(asset_id) → asset(id)
- case(status_id) → case_status(id)
- contract(account_id) → account(id)
- contract(opportunity_id) → opportunity(id)
- knowledge_article_version(knowledge_article_id) → knowledge_article(id)
- opportunity_competitor(opportunity_id) → opportunity(id)
- opportunity_competitor(partner_id) → partner(id)
- knowledge_article_view_stat(knowledge_article_id) → knowledge_article(id)
- campaign_member(contact_id) → contact(id)
- campaign_member(campaign_id) → campaign(id)
- campaign_member(lead_id) → lead(id)
- service_contract(account_id) → account(id)
- case_comment(case_id) → case(id)
- order(account_id) → account(id)
- order(contract_id) → contract(id)
- order(quote_id) → quote(id)
- vote(knowledge_article_id) → knowledge_article(id)
