Campaign
The Campaign module provides a framework for creating multi-channel messaging campaigns within Drupal. It allows for modeling one-time or automated campaigns with multiple message types and A/B testing capabilities, while also tracking recipient engagement.
Campaign is a foundation for building multi-channel messaging campaigns. It models the campaign itself — what is sent, to whom, and when — on Drupal's Entity API, and delegates actual transmission to channel-specific delivery integrations. Every component is fieldable and extensible.
What it provides today
- The entity model: revisionable, fieldable campaign and campaign message entity types, each bundleable. The core is channel-neutral: channel-specific fields (subject and sender identity for email, body text for SMS) live on message bundles, so new channels are a plugin plus a bundle — never a schema change. Email and SMS message types ship ready to use.
- Four plugin types as extension points: Channel (the contact-point and body contract a channel needs — Email and SMS included), Recipient (sources resolve to recipient objects carrying named contact points and personalization fields, not bare addresses), Composition (the authoring UI for a message body), and Scheduling (when a campaign — or later, an individual message — sends).
- Audiences: campaigns compose recipient include and exclude sets; the audience resolves to union minus exclusions, de-duplicated per contact point, with validation that every message's channel is actually addressable and that "Sent to" personalization patterns can be satisfied by the configured sources. Sources included: a literal email list, a single direct recipient, and an Entity Segment integration that activates when that module is installed.
- Message authoring: a plain body editor, an SMS editor with live GSM-7/UCS-2 character and message-part counting, and two GrapesJS drag-and-drop email editors — newsletter (inlined-CSS HTML) and MJML (compiled to responsive email HTML in the browser). The GrapesJS editors activate when the site installs the libraries and hide gracefully otherwise.
- Direct sends: a one-off message to a single recipient is a first-class flow — a lightweight campaign type with a one-page Quick send form and a builder service as the programmatic entry point — so ad hoc and bulk sending share one pipeline, one history, one audit trail.
- Accountability built in: full revision history on campaigns and messages, a forward-only lifecycle (draft → scheduled → sending → sent), sent campaigns lock against editing so history provably matches what went out, and each message gets a shareable web permalink that cannot be discovered by guessing ids.
Roadmap
Each of these is planned as its own issue on top of the contracts above:
- Message delivery via channel-specific integrations (the module models campaigns; transmission is deliberately delegated).
- Open and click tracking (the per-campaign settings exist today).
- A/B testing with variant splits and automatic winner selection.
- Multi-step automations with triggers and conditions (the scheduling contract already anticipates per-message and relative timing).
- Per-recipient engagement events and campaign-level rollups.
- Further recipient sources (CRM contacts via Views Bulk Operations), composition integrations (Easy Email, Mosaico and friends), and a postal channel.
Status and requirements
Drupal ^11.1. No hard contrib dependencies; Entity Segment and the GrapesJS libraries are optional. Pre-release: the data model and extension surface are in place, and no delivery integration exists yet — the module does not send anything today. Development happens through issue forks and merge requests against 1.0.x.
AI usage
This module was developed with lots of help from strikethroo 3.14 using Claude Fable 5.