# Salesforce Marketing Cloud schema ERD

Table and field reference for the Fivetran Salesforce Marketing Cloud connector.

## Table & Field Reference

### list_subscriber

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| list_id | Int | PK, FK |
| subscriber_key | String | FK |
| created_date | LocalDateTime |  |
| modified_date | LocalDateTime |  |
| status | String |  |

### business_unit_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| modified_date | LocalDateTime | PK |
| account_type | String |  |
| address | String |  |
| brand_id | Int |  |
| business_name | String |  |
| city | String |  |
| client_enterprise_id | Long |  |
| client_partner_client_key | String |  |
| country | String |  |
| created_date | LocalDateTime |  |
| customer_id | Long |  |
| customer_key | String |  |
| dbid | Int |  |
| deleted_date | LocalDateTime |  |
| description | String |  |
| edition_id | Int |  |
| email | String |  |
| fax | String |  |
| from_name | String |  |
| inherit_address | Boolean |  |
| is_active | Int |  |
| is_test_account | Boolean |  |
| is_trial_account | Boolean |  |
| language_locale_code | String |  |
| locale_code | String |  |
| master_unsubscribe_behavior | String |  |
| name | String |  |
| object_state | String |  |
| parent_id | Int |  |
| parent_name | String |  |
| partner_key | String |  |
| phone | String |  |
| private_label_id | Int |  |
| reporting_parent_id | Int |  |
| state | String |  |
| subscription_accounts_purchased | Int |  |
| subscription_adv_accounts_purchased | Int |  |
| subscription_begin_date | LocalDateTime |  |
| subscription_bu_accounts_purchased | Int |  |
| subscription_contract_modifier | String |  |
| subscription_contract_number | String |  |
| subscription_doto_accounts_purchased | Int |  |
| subscription_emails_purchased | Long |  |
| subscription_end_date | LocalDateTime |  |
| subscription_has_purchased_emails | Boolean |  |
| subscription_id | String |  |
| subscription_lp_accounts_purchased | Int |  |
| subscription_notes | String |  |
| subscription_period | String |  |
| timezone_id | Int |  |
| timezone_name | String |  |
| zip | String |  |

### ott_registration

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| application_id | String |  |
| channel_name | String |  |
| created_date | LocalDate |  |
| default_response | String |  |
| default_response_last_updated | LocalDate |  |
| is_active | Boolean |  |
| is_customer_secret_set | Boolean |  |
| is_test_channel | Boolean |  |
| is_transactional | Boolean |  |
| modified_date | LocalDate |  |
| ott_platform_name | String |  |
| phone_number_id | String |  |
| provider_name | String |  |
| waba_id | String |  |

### campaign

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_code | String |  |
| color | String |  |
| created_date | LocalDateTime |  |
| description | String |  |
| favorite | Boolean |  |
| modified_date | LocalDateTime |  |
| name | String |  |

### push_message

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| app_name | String | FK |
| campaign | String | FK |
| android_media_url | String |  |
| format | Int |  |
| geofence_name | String |  |
| ios_media_url | String |  |
| media_alt | String |  |
| message_content | String |  |
| message_name | String |  |
| page_name | String |  |
| template | String |  |

### subscriber

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| created_date | LocalDateTime |  |
| email_address | String |  |
| email_type_preference | String |  |
| status | String |  |
| subscriber_key | String |  |
| unsubscribed_date | LocalDateTime |  |

### push_application

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| apns_enabled | Boolean |  |
| created_date | Instant |  |
| description | String |  |
| device_endpoint | String |  |
| gcm_enabled | Boolean |  |
| key | String |  |
| modified_date | Instant |  |
| name | String |  |
| configuration_** |  |  |

### sms_subscription_log

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| created_date | LocalDateTime |  |
| log_date | LocalDateTime |  |
| mobile_number | String |  |
| modified_date | LocalDateTime |  |
| opt_in_date | LocalDateTime |  |
| opt_in_method_id | Long |  |
| opt_in_status_id | Long |  |
| opt_out_date | LocalDateTime |  |
| opt_out_method_id | Long |  |
| opt_out_status_id | Long |  |
| source | Long |  |
| subscriber_key | String |  |
| subscription_definition_id | String |  |

### campaign_asset

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| campaign_id | String | FK |
| email_asset_id | Int | FK |
| email_id | Int | FK |
| list_id | Int | FK |
| triggered_send_id | String | FK |
| created_date | LocalDateTime |  |
| item_id | Int |  |
| object_id | String |  |
| type | String |  |

### sms_message_tracking

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| action_date_time | LocalDateTime |  |
| activity_id | String |  |
| campaign_id | Long |  |
| code_id | String |  |
| conversation_id | String |  |
| conversation_state_id | String |  |
| create_date_time | LocalDateTime |  |
| delivered | Boolean |  |
| description | String |  |
| enterprise_id | Long |  |
| from_name | String |  |
| inbound | Boolean |  |
| invalidation_code | Long |  |
| is_test | Boolean |  |
| is_valid | Boolean |  |
| journey_definition_id | String |  |
| keyword_id | String |  |
| member_id | Long |  |
| message_id | Long |  |
| message_text | String |  |
| mobile | String |  |
| mobile_message_recurrence_id | Long |  |
| modified_date_time | LocalDateTime |  |
| name | String |  |
| ordinal | Long |  |
| outbound | Boolean |  |
| response_to_mobile_message_tracking_id | Long |  |
| send_group_id | Long |  |
| send_id | Long |  |
| send_job_id | Long |  |
| send_person_id | Long |  |
| send_segment_id | Long |  |
| send_split_id | Long |  |
| sent | Boolean |  |
| shared_keyword | String |  |
| short_code | String |  |
| sms_batch_id | Long |  |
| sms_job_id | String |  |
| sms_standard_status_code_id | Long |  |
| subscriber_id | Long |  |
| subscriber_key | String |  |
| undelivered | Boolean |  |

### chat_potential_unsubs

| Column | Type | Keys |
| --- | --- | --- |
| contact_key | String | PK |
| eid | Long | PK |
| mid | Long | PK |
| channel_id | String | PK, FK |
| first_date | LocalDateTime |  |
| last_date | LocalDateTime |  |
| mobile_number | String |  |
| potential_bounce_count | Long |  |

### account_history

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| modified_date | LocalDateTime | PK |
| account_type | String |  |
| address | String |  |
| brand_id | Int |  |
| business_name | String |  |
| city | String |  |
| client_client_id | Int |  |
| client_enterprise_id | Long |  |
| client_partner_client_key | String |  |
| country | String |  |
| created_date | LocalDateTime |  |
| customer_id | Long |  |
| customer_key | String |  |
| dbid | Int |  |
| deleted_date | LocalDateTime |  |
| edition_id | Int |  |
| email | String |  |
| fax | String |  |
| from_name | String |  |
| inherit_address | Boolean |  |
| is_active | Int |  |
| is_test_account | Boolean |  |
| is_trial_account | Boolean |  |
| language_locale_code | String |  |
| locale_code | String |  |
| name | String |  |
| object_state | String |  |
| parent_id | Int |  |
| parent_name | String |  |
| partner_key | String |  |
| phone | String |  |
| private_label_id | Int |  |
| reporting_parent_id | Int |  |
| roles | String |  |
| state | String |  |
| subscription_accounts_purchased | Int |  |
| subscription_adv_accounts_purchased | Int |  |
| subscription_begin_date | LocalDateTime |  |
| subscription_bu_accounts_purchased | Int |  |
| subscription_contract_modifier | String |  |
| subscription_contract_number | String |  |
| subscription_doto_accounts_purchased | Int |  |
| subscription_emails_purchased | Long |  |
| subscription_end_date | LocalDateTime |  |
| subscription_has_purchased_emails | Boolean |  |
| subscription_id | String |  |
| subscription_lp_accounts_purchased | Int |  |
| subscription_notes | String |  |
| subscription_number_of_emails | Long |  |
| subscription_period | String |  |
| timezone_id | Int |  |
| timezone_name | String |  |
| zip | String |  |

### link

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

### activity

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| journey_id | String | PK, FK |
| journey_version | Int | PK, FK |
| triggered_send_id | String | FK |
| arguments | Json |  |
| configuration_arguments | Json |  |
| description | String |  |
| id | String |  |
| meta_data | Json |  |
| name | String |  |
| outcomes | Json |  |
| schema | Json |  |
| triggered_send_key | String |  |
| type | String |  |

### chat_inbound_message_log

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| channel_id | String | FK |
| date_created | LocalDateTime |  |
| message_data | String |  |
| mobile_number | String |  |

### journey

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| version | Int | PK |
| category_id | Int |  |
| channel | String |  |
| created_date | LocalDateTime |  |
| defaults | Json |  |
| definition_id | String |  |
| definition_type | String |  |
| description | String |  |
| entry_mode | String |  |
| execution_mode | String |  |
| exits | Json |  |
| goals | Json |  |
| key | String |  |
| last_published_date | LocalDateTime |  |
| meta_data | Json |  |
| modified_date | LocalDateTime |  |
| name | String |  |
| notifiers | Json |  |
| scheduled_status | String |  |
| stats | Json |  |
| status | String |  |
| tags | Json |  |
| triggers | Json |  |
| workflow_api_version | String |  |

### event

| Column | Type | Keys |
| --- | --- | --- |
| event_type | String | PK |
| id | String | PK |
| opt_in_subscriber_key | String | FK |
| send_id | Int | FK |
| subscriber_key | String | FK |
| triggered_send_id | String | FK |
| unsubscribed_list_id | Int | FK |
| batch_id | Int |  |
| bounce_category | String |  |
| bounce_type | String |  |
| created_date | LocalDateTime |  |
| event_date | LocalDateTime |  |
| modified_date | LocalDateTime |  |
| question | String |  |
| smtp_code | Int |  |
| smtp_reason | String |  |
| url | String |  |

### chat_tracking

| Column | Type | Keys |
| --- | --- | --- |
| send_identifier | String | PK |
| status | String | PK |
| activity_id | String | FK |
| channel_id | String | FK |
| journey_definition_id | String | FK |
| activity_name | String |  |
| asset_id | Long |  |
| contact_key | String |  |
| eid | Long |  |
| event_date | LocalDateTime |  |
| message_type_id | Long |  |
| mid | Long |  |
| mobile_number | String |  |
| reason | String |  |
| tracking_type | String |  |

### email

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| character_set | String |  |
| created_date | LocalDateTime |  |
| modified_date | LocalDateTime |  |
| name | String |  |
| pre_header | String |  |
| subject | String |  |
| text_body | String |  |

### triggered_send

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| email_id | Int | FK |
| list_id | Int | FK |
| auto_add_subscribers | Boolean |  |
| auto_update_subscribers | Boolean |  |
| bcc_email | String |  |
| created_date | LocalDateTime |  |
| description | String |  |
| dynamic_email_subject | String |  |
| email_subject | String |  |
| from_address | String |  |
| from_name | String |  |
| is_multipart | Boolean |  |
| is_wrapped | Boolean |  |
| modified_date | LocalDateTime |  |
| name | String |  |
| priority | String |  |
| send_limit | String |  |
| send_window_close | String |  |
| send_window_open | String |  |
| triggered_send_status | String |  |

### mobile_push_detail_report

| Column | Type | Keys |
| --- | --- | --- |
| contact_key | String | PK |
| device_id | String | PK |
| request_id | String | PK |
| message_id | Int | FK |
| date_time_send | LocalDateTime |  |
| inbox_message_downloaded | LocalDateTime |  |
| inbox_message_opened | LocalDateTime |  |
| message_opened | String |  |
| open_date | LocalDateTime |  |
| platform | String |  |
| platform_version | String |  |
| push_job_id | String |  |
| service_response | String |  |
| status | String |  |
| system_token | String |  |
| time_in_app | Int |  |

### link_send

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| link_id | Int | FK |
| send_id | Int | FK |
| alias | String |  |
| total_clicks | Int |  |
| unique_clicks | Int |  |

### list

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| created_date | LocalDateTime |  |
| description | String |  |
| modified_date | LocalDateTime |  |
| name | String |  |
| type | String |  |

### send

| Column | Type | Keys |
| --- | --- | --- |
| id | Int | PK |
| email_id | Int | FK |
| bcc_email | String |  |
| created_date | LocalDateTime |  |
| duplicates | Int |  |
| email_name | String |  |
| existing_undeliverables | Int |  |
| existing_unsubscribes | Int |  |
| forwarded_emails | Int |  |
| from_address | String |  |
| from_name | String |  |
| hard_bounces | Int |  |
| invalid_addresses | Int |  |
| is_always_on | Boolean |  |
| is_multipart | Boolean |  |
| missing_addresses | Int |  |
| modified_date | LocalDateTime |  |
| number_delivered | Int |  |
| number_errored | Int |  |
| number_excluded | Int |  |
| number_sent | Int |  |
| number_targeted | Int |  |
| other_bounces | Int |  |
| preview_url | String |  |
| send_date | LocalDateTime |  |
| soft_bounces | Int |  |
| status | String |  |
| subject | String |  |
| unique_clicks | Int |  |
| unique_opens | Int |  |
| unsubscribes | Int |  |

## Relationships

- list_subscriber(subscriber_key) → subscriber(id)
- list_subscriber(list_id) → list(id)
- push_message(app_name) → push_application(id)
- push_message(campaign) → campaign(id)
- campaign_asset(email_id) → email(id)
- campaign_asset(email_asset_id) → email(id)
- campaign_asset(list_id) → list(id)
- campaign_asset(triggered_send_id) → triggered_send(id)
- campaign_asset(campaign_id) → campaign(id)
- chat_potential_unsubs(channel_id) → ott_registration(id)
- activity(journey_id) → journey(id)
- activity(triggered_send_id) → triggered_send(id)
- activity(journey_version) → journey(id)
- chat_inbound_message_log(channel_id) → ott_registration(id)
- event(send_id) → send(id)
- event(subscriber_key) → subscriber(id)
- event(triggered_send_id) → triggered_send(id)
- event(opt_in_subscriber_key) → subscriber(id)
- event(unsubscribed_list_id) → list(id)
- chat_tracking(channel_id) → ott_registration(id)
- chat_tracking(journey_definition_id) → journey(id)
- chat_tracking(activity_id) → activity(key)
- triggered_send(list_id) → list(id)
- triggered_send(email_id) → email(id)
- mobile_push_detail_report(message_id) → push_message(id)
- link_send(send_id) → send(id)
- link_send(link_id) → link(id)
- send(email_id) → email(id)
