Skip to content

Core Concepts & Data Model

Campaign uses a hybrid storage model: editorial records live in hidden Entries blueprints, while high-volume subscriber, delivery, link, tracking, and suppression records live in portable Entries Managed SQL Tables (CampaignTableManager).

Seven Hidden Entries Blueprints (CampaignBlueprints)

Section titled “Seven Hidden Entries Blueprints (CampaignBlueprints)”
Blueprint Kind Purpose
campaign-settings single Global brand defaults, sender identity, throttling, tracking, webhook secrets, and integration flags (CampaignSettings).
campaign-types collection Reusable email archetypes defining default authoring mode, sender overrides, CSS inlining, plaintext generation, and PHP template paths.
campaign-campaigns collection (CampaignEntry) Individual email campaigns with localized subject, preheader, body, UTM parameters, and attachments.
campaign-lists collection (MailingListEntry) Audience lists with Double Opt-In settings, public signup visibility, and ProcessWire user role synchronization.
campaign-segments collection (SegmentEntry) Dynamic audience segments with ALL / ANY match logic and optional list scoping.
campaign-segment-rule repeater block Individual condition rules nested inside campaign-segments.
campaign-sendouts collection (SendoutEntry) Dispatch jobs (regular, scheduled, automated, recurring, singular) with recipient counters and state tracking.

Five Portable Managed SQL Tables (CampaignTableManager)

Section titled “Five Portable Managed SQL Tables (CampaignTableManager)”

Registered lazily under owner => 'Campaign', exportPolicy => 'schema_only' (mirrored in profile-export.json), and idStrategy => 'bigint', portable across MySQL/MariaDB, SQLite, and PostgreSQL:

Table Name SQL Table Purpose
campaign_subscriptions entries_tbl_campaign_subscriptions Per-contact, per-list subscription status (subscribed, pending, unsubscribed, bounced, complained), opt-in metadata, and timestamps.
campaign_sendout_recipients entries_tbl_campaign_sendout_recipients Per-sendout recipient delivery queue, retry counters, provider message IDs, and dispatch outcomes.
campaign_links entries_tbl_campaign_links Tracked destination URLs rewritten into /_campaign/c/{token} redirect links.
campaign_events (appendOnly: true) entries_tbl_campaign_events Immutable engagement and webhook ledger (sent, delivered, open, click, bounce, complaint, unsubscribe) with transactional dedupe_hash deduplication.
campaign_suppressions entries_tbl_campaign_suppressions Global suppression list blocking hard bounces, escalated soft bounces, spam complaints, global unsubscribes, and manual blocks across all sendouts.
stateDiagram-v2
    [*] --> draft
    draft --> scheduled: Schedule future timestamp
    draft --> queued: Send now
    draft --> active: Activate Automated / Recurring
    scheduled --> queued: Due time reached
    queued --> sending: Batch worker picks up
    sending --> sent: All batches completed
    sending --> failed: Unrecoverable error
    active --> paused: Pause automation
    paused --> active: Resume automation
    scheduled --> cancelled: Cancel sendout

Sender identity, reply-to addresses, UTM tags, and tracking flags resolve from most specific to most general:

  1. Sendout (campaign-sendouts) overrides
  2. Campaign (campaign-campaigns) overrides
  3. Campaign Type (campaign-types) defaults
  4. Global Settings (campaign-settings / CampaignSettings) fallback

Next steps