Skip to content

Ecosystem Integrations

Campaign follows strict layered module boundaries. It always integrates with Contacts as its canonical audience directory and automatically activates five optional sibling integrations inside src/Integration/<Module>/ whenever those modules are installed and enabled under Setup > Campaigns > Settings > Ecosystem Integrations.

flowchart TB
  Campaign["Campaign"] --> Contacts["Contacts (Required / Always Active)"]
  Campaign -.-> Forms["Forms (Optional)"]
  Campaign -.-> Account["Account (Optional)"]
  Campaign -.-> Blocks["Blocks (Optional)"]
  Campaign -.-> Ai["Ai (Optional)"]
  Campaign -.-> Headless["Headless (Optional)"]

Campaign declares contactsParticipant => true and registers a dedicated Contacts participant adapter:

  • Unified Identity: Every subscriber row in campaign_subscriptions references a contact_uuid owned by Contacts. Contact profile edits (name, language, country, tags, domain_meta) are immediately visible to CampaignRenderer merge variables and SegmentEvaluator rules.
  • Contact Merge Cascade: When two duplicate contacts are merged in Contacts, Campaign automatically reassigns contact_uuid across campaign_subscriptions, campaign_sendout_recipients, campaign_events, and campaign_suppressions without losing consent history or duplicating list memberships.
  • GDPR Subject Export: When an operator exports a contact’s personal data from Contacts, Campaign contributes all list subscriptions, Double Opt-In timestamps, sendout deliveries, and tracking events for that subject.
  • GDPR Anonymization Cascade: When a contact is anonymized or erased in Contacts, Campaign scrubs the email address and PII across all four recipient/event/suppression tables automatically.

When Forms is installed and enable_forms_integration is active:

  • Opt-In Action: Form builders can attach a “Subscribe to Mailing List” post-submission action mapped to any mailing_list relation resource, with optional consent checkbox gating and Double Opt-In support.
  • Automation Trigger: Form submissions automatically notify AutomationEngine for form_submitted automated sendouts, letting you send targeted follow-up emails right after a quote inquiry or brochure download.

When Account is installed and enable_account_integration is active:

  • User Registration Trigger: New member registrations trigger user_registered automated sendouts automatically.
  • Account Preference Management: Logged-in Account portal users can view and toggle their is_public mailing list subscriptions directly inside their profile notification settings without needing a separate email token link.

When Blocks is installed and enable_blocks_integration is active:

  • Visual Email Composition: Campaigns whose Campaign Type uses authoring_mode = blocks can assemble responsive email sections using reusable Blocks items.
  • Custom Block Rendering: CampaignRenderer dispatches Campaign::renderBlocksContent so email-safe HTML tables are generated from your block tree before CSS inlining and link wrapping.

When Ai is installed and enable_ai_integration is active:

  • Editorial Assistance: The Campaign editor exposes AI drafting helpers for subject lines, preheader copy, and body refinement via Campaign::aiSuggest.
  • Safe Human-in-the-Loop: AI suggestions populate draft fields for editorial review and never dispatch emails automatically.

When Headless is installed and enable_headless_integration is active, Campaign registers REST API endpoints under /api/v1/campaign/* using Headless authentication (JWT, PAT, HMAC, or session) and Campaign RBAC permissions:

Endpoint Method Purpose
/api/v1/campaign/lists GET List public or authorized mailing lists.
/api/v1/campaign/subscribe POST Subscribe a contact to a mailing list (respects Double Opt-In and rate limits).
/api/v1/campaign/unsubscribe POST Unsubscribe an email address from a specific list or globally.
/api/v1/campaign/campaigns GET Read campaign definitions (campaign-view).
/api/v1/campaign/sendouts GET, POST Inspect sendouts or trigger authorized dispatches (campaign-manage).

Next steps