DocsOMailerDatabase Schema
Getting Started

Database Schema

OMailerorravo.com/docs/omailer/database-schema

Database Schema

All tables use {$wpdb->prefix}om_ prefix. Access table names via OM_DB::table( 'name' ).

Core Tables

om_subscribers

ColumnTypeNotes
idBIGINT UNSIGNED PKAuto-increment
emailVARCHAR(255) UNIQUERequired
first_nameVARCHAR(100)
last_nameVARCHAR(100)
statusENUMsubscribed, unsubscribed, bounced, pending
sourceVARCHAR(100)manual, import, shortcode, api, oforms, oonboard, woocommerce
ip_addressVARCHAR(45)IPv4 or IPv6
confirmed_atDATETIMEDouble opt-in confirmation time
created_atDATETIME
updated_atDATETIMEAuto-updated
confirmation_tokenVARCHAR(64)Double opt-in token
engagement_scoreTINYINT UNSIGNED0–100, decays daily
last_engaged_atDATETIMELast open or click
cold_sinceDATETIMEWhen score dropped below cold threshold
lead_scoreINTCumulative lead score points
lifecycle_stageVARCHAR(60)lead, subscriber, engaged, customer, advocate, churned
optimal_send_hourTINYINT UNSIGNED0–23, calculated from open history
consent_timestampDATETIMEGDPR consent time
consent_ipVARCHAR(45)
consent_sourceVARCHAR(100)
consent_textTEXTConsent language shown at signup

om_campaigns

ColumnTypeNotes
idBIGINT UNSIGNED PK
subjectVARCHAR(255)
preview_textVARCHAR(255)Pre-header
from_nameVARCHAR(100)
from_emailVARCHAR(100)
html_contentLONGTEXTRendered HTML
json_designLONGTEXTBuilder block JSON
statusENUMdraft, scheduled, sending, sent, paused
list_idBIGINT UNSIGNEDNULL = all subscribers
scheduled_atDATETIME
total_sentINT UNSIGNED
total_openedINT UNSIGNEDUnique opens
total_clickedINT UNSIGNEDUnique clicks
total_bouncedINT UNSIGNED
ab_parent_idBIGINT UNSIGNEDA/B test parent
ab_split_pctTINYINT% of list for this variant
ab_winner_metricENUMopen_rate, click_rate
ab_eval_hoursSMALLINTEvaluation window
ab_statusENUMnone, control, variant, winner, loser
send_modeENUMimmediate, smart, scheduled
revenue_attributedDECIMAL(10,2)WooCommerce revenue

Additional Tables

TablePurpose
om_listsNamed mailing lists
om_list_subscriberJunction: subscribers ↔ lists
om_sendsPer-subscriber send record (status, open/click)
om_eventsGranular event log (open, click, bounce, unsubscribe, complaint)
om_tagsTag definitions (name, slug)
om_subscriber_tagsJunction: subscribers ↔ tags
om_custom_fieldsCustom field definitions
om_subscriber_metaCustom field values per subscriber
om_automationsAutomation definitions (trigger, status)
om_automation_stepsOrdered steps per automation
om_automation_runsSubscriber progress through automations
om_consent_logGDPR consent and erasure log
om_lead_score_rulesLead scoring rules (event type → points)
om_segmentsSegment definitions (conditions JSON)
om_suppressedGlobal suppression list
om_wc_cartsWooCommerce abandoned cart snapshots
om_wc_revenueWooCommerce revenue attribution
om_webhooksOutbound webhook definitions
om_webhook_logWebhook delivery log
om_rss_feedsRSS feed monitor config
om_lifecycle_stagesLifecycle stage definitions
Database Schema — OMailer Docs — Orravo