Contact Info Fact Table

Whenever a campaign is run, the brand sends multiple messages to the customers. Each row in this fact table captures the communication that is done with the customer, as a part of the campaign. It captures data such as the date and time when the customer was contacted, the time when the customer accessed the campaign email, and the channel used for communication (like SMS, Whatsapp). This fact table is linked to multiple dimension tables, which store the communication related attributes.

Databricks Table Name: contact_info

Contact Info - Entity Relationship Diagram (ERD)

Zoom in the table for more clarity. Click the table title to view its details.

Contact Infoauto_update_time_comm_details: bigintauto_update_time_contact: bigintauto_update_time_email_stats: bigintauto_update_time_subs_stats: bigintdim_campaign_delivery_status_id: bigintdim_campaign_group_id: bigintdim_campaign_id: bigintdim_campaign_message_id: bigintdim_communication_channel_id: bigintdim_contact_date_id: bigintdim_contact_time_id: bigintdim_email_open_date_id: bigintdim_email_open_time_id: bigintdim_event_date_id: bigintdim_event_time_id: bigintPKdim_event_user_id: bigintdim_event_zone_till_id: bigintdim_latest_updated_date_id: bigintdim_latest_updated_time_id: bigintdim_unsubscription_status_id: bigintmessage_body: stringPKmsg_id: bigintnsadmin_id: bigintopen_count: inttotal_link_click_count: intunsubscribed: stringyear: intPKdim_communication_type_id: bigintauto_update_time_messageMetaDetails: bigintdim_journey_meta_block_id: stringmessageEntityId: stringContact InfoCampaign Delivery StatusLKid: intstatus: stringCampaign Groupis_recurring: stringcampaign_end_date: stringgroup_version_number: stringgroup_type: stringname: stringLKid: bigintcampaign: stringcampaign_start_date: stringroi_type: stringCampaignsis_recurring: stringcampaign_end_date: stringis_migrated: stringauto_update_campaign: bigintLKcampaign_id: bigintcampaign_type: stringroi_type: stringcampaign_start_date: stringname: stringCampaign Messagecampaign_end_date: stringcampaign: stringauto_update_campaign: bigintmsg_type: stringauto_update_msg: bigintguid: stringstatus: stringLKid: bigintscheduled_type: stringcampaign_start_date: stringmsg_name: stringis_recurring: stringCommunication ChannelLKid: intchannel: stringactivity_name: stringUnsubscription StatusLKid: intstatus: stringdateLKdate_id: intday_of_month: intweek_of_year: intmonth: stringyear: intquarter: stringweek_number: intweek_start_date: stringweek_end_date: stringday_of_week: stringmonth_no: intmonth_no_of_year: intmonth_of_year: stringday_of_week_no: intquarter_no: intyearly_quarter_no: intdate: stringDateZone_tillsstore_country: stringexternal_id_1: stringstore: stringauto_update_till_parent: bigintarea: stringstore_name: stringstore_city: stringstore_state: stringtill: stringauto_update_till_store_relation: bigintis_ffc_enabled: stringLKtill_id: biginttype: stringtill_description: stringauto_update_till: bigintstore_channel: stringexternal_id: stringis_billable: stringstore_id: bigintis_active: stringauto_update_store: bigintstore_description: stringlatitude: stringtimezone: stringexternal_id_2: stringtill_name: stringzone_name: stringZone TillsTimeLKtime_id: biginttime: stringhour_of_day: intminute_of_day: intday_shift: stringday_shift_no: inthour_range: stringTimeCommunication Channelusersauto_update_merged_customer: bigintauto_update_loyalty: bigintfraud_status: stringtest_control_bucket: stringis_merged_customer: stringsubscription_status_email_bulk: stringfirst_name: stringslab_name: stringsubscription_status_wechat_bulk: stringemail: stringlast_name: stringmerged_user_id: bigintLKuser_id: bigintsubscription_status_wechat_trans: stringsubscription_status_sms_bulk: stringndnc_status: stringsubscription_status_email_trans: stringtest_control_status: stringauto_update_fraud_user: bigintis_inactive: stringsource: stringslab_number: intauto_update_users: bigintregistered_till_id: bigintauto_update_customer_enrollment: bigintslab_expiry_date: stringcustomer_external_id: stringsubscription_status_sms_trans: stringmobile: stringloyalty_type: stringauto_update_ndnc_status: bigintUsersCommunication TypeLKid: inttype: stringCampaignsCampaign Delivery StatusCampaign GroupUnsubscription StatusCampaign MessageCommunication TypeJourney Blockblock_type: stringends_at: stringmulti_entry_allowed: stringuse_tiny_url: stringou_id: intstart_type: stringjourney_meta_name: stringjourney_meta_id: stringlevel: stringlink_tracking_enabled: stringblock_name: stringend_type: stringLKblock_id: stringencrypt_url: stringjourney_meta_group_id: stringstarts_from: stringjourney_version: intsimulation_mode: stringtest_control_mode_disabled: stringjourney_meta_description: stringjourney_status: stringobjective: stringtime_compression_factor: stringjourney_meta_version_id: stringconsent_status_for_previous_version: stringauto_update_time: bigintJourney Block

Legend

PK   Primary Key

LK   Linking Key

Fact Table
Dimension Table

Contact Info Fact Table

Column Name

Data Type

Description

Linked Table

Availability for Export in the

Contacted

Template

auto_update_time

  • comm_details

bigint

Date and time when the corresponding record in the communication details table available at the source was last updated. It is in the Unix timestamp format.

Yes; Measure Name: Auto Update Time Comm Details

auto_update_time_contact

bigint

Date and time when the corresponding record in the contact table available at the source was last updated. It is in the Unix timestamp format.

Yes; Measure Name: Auto Update Time Contact

auto_update_time

  • email_stats

bigint

Date and time when the corresponding record in the email stats table available at the source was last updated. It is in the Unix timestamp format.

Yes; Measure Name: Auto Update Time Email Stats

auto_update_time

  • subs_stats

bigint

Date and time when the corresponding record in the subscription status table available at the source was last updated. It is in the Unix timestamp format.

Yes; Measure Name: Auto Update Time Subs Stats

dim_campaign

  • delivery_status_id

bigint

Unique identifier assigned to the campaign delivery status. Possible values are - Sent, Delivered, Not_delivered, and Failed.

campaign_delivery

Yes; Dimension Name: Campaign Delivery Status > Status Id

dim_campaign

  • group_id

bigint

Unique identifier assigned to the campaign group. Possible values are - Test, and Control.

campaign_group

Yes; Dimension Name: Campaign Group > Id

dim_campaign_id

bigint

Unique identifier assigned to the campaign.

campaigns

Yes; Dimension Name: Campaign > Campaign Id

dim_campaign

  • message_id

bigint

Unique identifier assigned to the message sent for the campaign.

campaign_msg

Yes; Dimension Name: Campaign Message > Id

dim_communication

  • channel_id

bigint

Indicates the channel used for communicating with the customer. Possible values are - SMS, email, voicemail, Wechat, Facebook, Viber, etc.

communication

Yes; Dimension Name: Communication Channel > Id

dim_contact_date_id

bigint

Date when the customer was contacted.

date

Yes; Dimension Name: Campaign Contact Date > Date

dim_contact_time_id

bigint

Time when the customer was contacted.

time

Yes; Dimension Name: Campaign Contact Time > Time Id

dim_email_open_date_id

bigint

Date when the email within a campaign, was accessed.

date

Yes; Dimension Name: Link Open Date > Date

dim_email_open_time_id

bigint

Time when the email within a campaign, was accessed.

time

Yes; Dimension Name: Link Open Time > Time Id

dim_event_date_id

bigint

Date when the communication with the customer was done.

date

Yes; Dimension Name: Date > Date

dim_event_time_id

bigint

Time when the communication with the customer was done.

time

Yes; Dimension Name: Time > Time Id

dim_event_user_id

bigint

Unique identifier assigned to the user by Capillary. It is the primary key for this table.

users

Yes; Dimension Name: User > User Id

dim_event_zone_till_id

bigint

Identifier assigned to the point-of-sale (POS) terminal within a store. It distinguishes one checkout location from another within the same store.

zone_tills

Yes; Dimension Name: Store Hierarchy > Till Id

dim_latest_updated

  • date_id

bigint

Date when the data corresponding to this event/row is changed in the source table.

date

Yes; Dimension Name: Latest Updated Date > Date

dim_latest_updated

  • time_id

bigint

Time when the data corresponding to this event/row is changed in the source table.

time

Yes; Dimension Name: Latest Updated Time > Time Id

dim_unsubscription

  • status_id

bigint

Unique id generated by the system for the unsubscription status. It indicates whether the customer has opted to unsubscribe or not.

unsubscription

Yes; Dimension Name: Unsubscription Status > Id

message_body

string

Contains the actual content of the message that was sent to the customers.

Yes; Measure Name: Message Body

msg_id

bigint

Represents the template id generated for each message template within a campaign. It is the primary key for this table.

Yes; Measure Name: Msg Id

nsadmin_id

bigint

Communication id corresponding to a specific communication to a customer. This represents a granular level view of a specific communication.

Yes; Measure Name: Nsadmin Id

open_count

int

Number of times the email message has been opened.

Yes; Measure Name: Open Count

total_link_click_count

int

Total number of times the links within an email have been clicked by the customer.

Yes; Measure Name: Total Link Click Count

unsubscribed

string

Captures the subscription status of the customer. If the customer has unsubscribed, it will be marked as "Yes"; if not, it will be marked as "Not yet".

Yes; Measure Name: Unsubscribed

year

int

Year of the communication.

Yes; Dimension Name: Year

dim_communication

  • type_id

bigint

Identifier for the type of communication received by the customer. It is the primary key for this table.

communication

Yes; Dimension Name: Communication Type > Id

auto_update_time

  • messageMetaDetails

bigint

Date and time when the corresponding record in the messageMetaDetails table available at the source was last updated. It is in the Unix timestamp format.

Yes; Measure Name: Auto Update Time Messagemetadetails

dim_journey

  • meta_block_id

string

Identifier of the journey block. It is the combination of journeyMetaId - journeyVersion - blockId.

journey_block

Yes; Dimension Name: Journey Block > Journey Meta Id

messageEntityId

string

Identifier of the message.

Yes; Measure Name: Messageentityid