Email marketing & campaign database schema

How a campaign sender stores its data: lists and contacts with custom fields, rule-based segments, campaigns with A/B variants, one send row per recipient, opens and clicks, bounces and suppressions, and drip automations.

Email Marketing ER diagram

Email marketing & campaign database schema n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 contacts idBIGINT emailVARCHAR first_nameVARCHAR last_nameVARCHAR statusVARCHAR attributesJSONB timezoneVARCHAR consent_sourceVARCHAR consent_atTIMESTAMP created_atTIMESTAMP custom_fields idBIGINT keyVARCHAR labelVARCHAR field_typeVARCHAR optionsJSONB is_requiredBOOLEAN created_atTIMESTAMP lists idBIGINT nameVARCHAR from_nameVARCHAR from_emailVARCHAR double_opt_inBOOLEAN archived_atTIMESTAMP created_atTIMESTAMP list_subscriptions list_idBIGINT contact_idBIGINT statusVARCHAR sourceVARCHAR subscribed_atTIMESTAMP unsubscribed_atTIMESTAMP segments idBIGINT nameVARCHAR list_idBIGINT rulesJSONB is_dynamicBOOLEAN member_countINTEGER last_evaluated_atTIMESTAMP created_atTIMESTAMP campaigns idBIGINT nameVARCHAR list_idBIGINT segment_idBIGINT statusVARCHAR send_typeVARCHAR ab_winner_metricVARCHAR ab_decision_after…INTEGER scheduled_atTIMESTAMP started_atTIMESTAMP completed_atTIMESTAMP timezoneVARCHAR created_atTIMESTAMP campaign_variants idBIGINT campaign_idBIGINT labelVARCHAR subjectVARCHAR preheaderVARCHAR from_nameVARCHAR html_bodyTEXT text_bodyTEXT traffic_percentSMALLINT is_winnerBOOLEAN sends idBIGINT campaign_idBIGINT variant_idBIGINT contact_idBIGINT statusVARCHAR provider_message_…VARCHAR queued_atTIMESTAMP sent_atTIMESTAMP delivered_atTIMESTAMP bounce_typeVARCHAR bounce_codeVARCHAR open_countINTEGER click_countINTEGER send_events idBIGINT send_idBIGINT event_typeVARCHAR occurred_atTIMESTAMP urlTEXT user_agentVARCHAR ip_addressVARCHAR suppressions idBIGINT emailVARCHAR list_idBIGINT reasonVARCHAR source_send_idBIGINT created_atTIMESTAMP automations idBIGINT nameVARCHAR trigger_typeVARCHAR trigger_configJSONB statusVARCHAR allow_re_enrolmentBOOLEAN created_atTIMESTAMP automation_steps idBIGINT automation_idBIGINT positionINTEGER step_typeVARCHAR campaign_idBIGINT wait_minutesINTEGER condition_rulesJSONB next_step_idBIGINT automation_enrolmen… idBIGINT automation_idBIGINT contact_idBIGINT current_step_idBIGINT stateVARCHAR next_run_atTIMESTAMP enrolled_atTIMESTAMP completed_atTIMESTAMP

Related database schemas