Skip to main content

[PRD] CEBE | Marketing Event Source: Broadcast & Ads — Phase 1 (SUPPORT: Broadcast Squad)

HEADER BLOCK

FieldValue
PMZhelia Alifa
PRD Version1.4
StatusREADY
PRD TypeSUPPORT
EpicTF-3302 — shared Phase-1 Epic (Owning Squad: Broadcast)
SquadBroadcast Squad
Owning SquadBroadcast
RFC LinkN/A — follows the core RFC; no separate RFC unless ads-platform sync warrants
Figma MasterN/A — no UI changes
AnchorNo — contributing squad. ANCHOR: Customer Event-Based Engine (CEBE) — ANCHOR
Parent PhaseCore Infrastructure & CDP Customer Event — Phase 1 (TECH)
Labelsepic:cdp | module:broadcast | feature:cebe-marketing-events
Last Updated2026-06-26

SUPPORT PRDs never carry the Anchor flag. Graceful degradation is mandatory — this squad's emission must never block the core ingestion or any Broadcast/Ads user flow.


CONDITIONAL BLOCK: SUPPORT CONTEXT

FieldDetail
Anchor PRDCustomer Event-Based Engine (CEBE) — ANCHOR
Lead Squad Phase PRDCore Infrastructure & CDP Customer Event — Phase 1 (TECH)
PhasePhase 1 of 3 (Q3 2026)
Lead SquadCDP Squad (+ BI/Data)
Contributing SquadBroadcast Squad
This squad contributesEmit standardized Marketing events into CEBE for BOTH outbound Broadcast and paid Ads (event list: anchor → 4. Campaign Module). Keyed on qontak_customer_id, so CEBE can derive marketing metrics (reply rate, ads conversion, CPL/CPA/ROAS) and attribution.
Lead squad ownsThe event schema, ContactResolver/identity resolution, Event Adapter, Central DB, retriever/metrics layer, and query approach. Broadcast squad does NOT build any of these — it publishes to them.
Integration pointBroadcast publishes to the standardized ingestion contract defined in the lead Phase PRD §14 Behavior 1 using the standard event envelope.
Handoff contractLead squad delivers the event schema + adapter in staging by [date in RFC]. Broadcast cannot finalize emission until available. Broadcast delivers Broadcast + Ads emission (incl. 12-month backfill) by end of Q3 2026.
CoordinationWeekly CDP + Broadcast sync. Schema changes via the Epic comment thread (TF-3302). Ads-platform sync details (Meta/Google/TikTok) aligned with BI/Data.

1. One-liner + Problem

One-liner: Broadcast Squad emits standardized Broadcast and Ads events into CEBE so marketing engagement, conversion, and attribution become reusable across Qontak.

Problem: Marketing engagement lives only inside the Broadcast/Ads tooling, so CEBE cannot compute reply rate, ads conversion, or attribution centrally. For full problem context, see the Anchor PRD.


2. Target Users + Persona Context

Personas inherited from the lead Phase PRD: Core Infrastructure & CDP Customer Event — Phase 1 (TECH).

Nuance: the direct beneficiary is the Marketing Owner who needs unified Broadcast + Ads metrics and attribution for segmentation and marketing automation.


3. Non-Goals

  1. Does not build the event schema, adapter, Central DB, retriever, or query layer — all owned by the lead CDP/BI-Data PRD.
  2. Does not build segmentation or marketing-automation features — those consume CEBE downstream.
  3. Does not change existing Broadcast/Ads user-facing behavior — emission is additive and background.
  4. Does not own identity resolution — uses the lead squad's qontak_customer_id / ContactResolver.
  5. Does not connect non-marketing modules (Chat, Ticket, etc.) — out of scope for this squad.

4. Scope Changes

Engineering surfaces this PRD touches (controlled vocab). Kept in sync with the scope_changes frontmatter above.

  • Backend — Broadcast/Ads service (repo TBD — Broadcast squad): emit the standardized campaign.* (Broadcast) and ad.* (Ads) events to the lead adapter contract keyed on qontak_customer_id; ad-platform sync (Meta/Google/TikTok) for ad.impression / ad.clicked / ad.spend_recorded; buffer + retry for graceful degradation; 12-month backfill of marketing events on first connect. Event list: anchor → 4. Campaign Module.
  • Data — marketing metric semantics aligned with the retriever (owned by lead): reply rate, % ads conversion, CPL/CPA, ROAS — this squad supplies source events + definitions; the lead materializes them.
  • Frontend / Mobile / Design — None (background emission only; no UI surface).

5. Constraints

ConstraintDetail
PlatformBackend emission from Broadcast/Ads services. No UI surface.
PerformanceEmit events such that CEBE propagation stays < 5s p99 (lead SLA).
API dependencyLead squad's standardized event schema + Event Adapter (must be stable in staging first).
Plan / tierN/A — emission is platform-internal; no plan/tier gating on this contribution.
Feature flagUses lead flag scope: cebe_event_ingestion (source: marketing) | default: OFF.
Fallback behaviorIf the adapter is unavailable, emission is buffered/retried; Broadcast & Ads user flows (sending, reporting) continue normally — never blocked.
Data handlingPublish-only (write events). No reads from CEBE by this squad in this phase.
Ads syncAds metrics (impression/click/spend) synced from ad platforms (Meta/Google/TikTok) may be near-real-time or periodic per platform API limits — documented in RFC.

6. Rollout

AspectDetail
Feature flagcebe_event_ingestion (marketing source) — derived from lead squad flag.
Rollout dependencyFollows lead squad. Lead must ship schema + adapter in staging before emission goes to canary.
RolloutStage 1 → Staging: emit synthetic Broadcast + Ads events; validate envelope + <5s
Stage 2 → Canary: real events from N pilot accounts
GA → All accounts; 12-month backfill loaded; metrics available via retriever
Backward compatNo change to existing Broadcast/Ads behavior.
MigrationBackfill last 12 months of Broadcast + Ads events on first connect.

7. Observability

For initiative-level events, see lead Phase PRD §8 Observability: Core Infra TECH PRD.

Events specific to this squad's contribution

Event NameTriggerProperties
marketing_event_emittedBroadcast/Ads event published to adapterevent_name, channel/ad_platform, qontak_customer_id, timestamp
marketing_event_emit_failedEmission to adapter failsevent_name, reason, retry state
ads_spend_sync_completedPeriodic ad-spend sync from platformad_platform, records, period

Dashboard & Alerts

AspectDetail
Dashboard ownerBroadcast Squad (emission health). Initiative dashboard: BI/Data Squad.
Alertsmarketing_event_emit_failed rate > 2% in 10 min → Broadcast on-call
• Ads spend sync missing for > 24h → Broadcast + BI/Data

8. Success Metrics

Initiative-level metrics are defined in the lead Phase PRD §9 Success Metrics: Core Infra TECH PRD.

Component-specific

CategoryMetricDefinitionBaselineTarget
EnablementMarketing source coverage on CEBE% of Broadcast + Ads events successfully emitted to CEBE0Broadcast + Ads live with ≥ 99% emission success by end of Q3 2026

9. Dependencies

DependencyOwning TeamDeliverable NeededBlocking?
Standardized event schema + Event AdapterCDP SquadSchema + adapter stable in staging by RFC dateYES
qontak_customer_id / ContactResolverCDP SquadIdentity key resolvable for marketing contactsYES
Retriever/metrics layerCDP + BI/DataReply rate / ads-conversion metric definitionsNO (parallel)
Ad platform APIs (Meta/Google/TikTok)External + BroadcastAccess to impression/click/spend dataYES (for Ads events)

10. Key Decisions + Alternatives Rejected

10a — Decisions Made

DateDecisionRationale
2026-06-26Emit BOTH Broadcast and Ads events (not Broadcast only)Ads attribution (CPL/CPA/ROAS, % ads conversion) is core to the marketing use-case
2026-06-26Publish-only integration; no reads from CEBE this phaseKeeps boundary clean; lead squad owns read/query path
2026-06-26Reuse lead squad schema + ContactResolver; build nothing sharedPrevents overlap; Broadcast owns only emission

10b — Alternatives Rejected

AlternativeWhy RejectedDate
Broadcast builds its own marketing data storeRe-creates CEBE; defeats unified-layer goal2026-06-26
Ship Broadcast events now, defer Ads to later phaseMisses paid-acquisition attribution the Primary use-case requires2026-06-26

11. Open Questions

#TypeQuestionOwnerDeadline
1Open QuestionContact-resolution rate for ad-sourced users (anonymous → qontak_customer_id)?Broadcast + CDP2026-08-15
2Open QuestionAds spend sync cadence per platform given API rate limits (real-time vs daily)?Broadcast + BI/Data2026-07-31
3AssumptionLead squad's schema + adapter stable in staging ≥ 2 weeks before our canaryBoth PMs2026-08-15
4RiskIf lead Phase 1 slips, marketing emission cannot ship in Q3 — no independent deliverable. Mitigation: stage synthetic emission against schema contract earlyCDP PM2026-09-15

12. System Flow + User Stories + ACs

12.1 System Flow

Flow: Marketing (Broadcast + Ads) event emission into CEBE (Broadcast squad contribution) · Type: Integration Flow

  1. A Broadcast/Ads action occurs (message sent/replied/clicked, ad impression/click/conversion, or periodic spend sync).
  2. Broadcast service builds the standardized event envelope, keyed on qontak_customer_id via ContactResolver.
  3. Broadcast publishes the event to the lead squad's Event Adapter ingestion contract (lead PRD §14 Behavior 1).
  4. (Lead) Adapter resolves identity, validates the schema, and dedups via the idempotency key.
  5. (Lead) Adapter writes the event to the Central DB (PII masked); the retriever recomputes marketing metrics.
  6. Marketing metrics (reply rate, ads conversion, ROAS) become queryable for segmentation / marketing automation.
  7. Failure: if the adapter or an ad-platform API is unavailable, the event is buffered + retried with zero loss, AND the Broadcast/Ads user flow continues normally (graceful degradation).

Architecture & ingestion diagram: see the anchor — 5. Architecture.

12.2 User Stories

User StoryImportanceMockupTechnical NotesAcceptance Criteria
[CEBE-MKT-SUP-S01] — Emit Broadcast engagement events into CEBE

As a Marketing Owner, I want Broadcast engagement captured in CEBE, so that reply rate, opt-in/out, and campaign attribution are reusable for segmentation and automation.
Must Have— (no UI)Data Fields:
• Broadcast event list (campaign.sent/replied/clicked/bounced/opted_in/opted_out) — see anchor → 4. Campaign Module §4a (not duplicated)
qontak_customer_id (string, required) — ContactResolver (lead)
campaign_id/template_id, channel, event_name — Broadcast
• Flag: cebe_event_ingestion (marketing source, default OFF)

Before-After Behavior: Before — broadcast engagement lives only in Broadcast tooling; CEBE has no marketing data. After — each engagement publishes a standardized event to CEBE in <5s, enabling central reply-rate and opt-status metrics; no change to the Broadcast UX.
— Happy Path —
• AC-1: Given the marketing ingestion flag is ON, when a broadcast is sent/replied/clicked/opted-in/opted-out, then a standardized event (keyed on qontak_customer_id) reaches CEBE in <5s.
• AC-2: Given a customer cannot be resolved to a qontak_customer_id, when the event is built, then it is emitted with available identifiers AND flagged for resolution (not dropped silently).
• AC-3: Given the same event is retried, when re-published, then idempotency (lead) ensures no duplicate in CEBE.

— Error / Unhappy Path —
• ERR-1: Given the Event Adapter is unavailable/times out, when a broadcast event is emitted, then it is buffered + retried until acknowledged (zero loss), AND the Broadcast send/report flow is NOT blocked, AND marketing_event_emit_failed is logged.
• ERR-2: Given a broadcast event fails schema validation at the adapter, when rejected, then the rejection is surfaced to the Broadcast service for correction (not dropped silently), AND logged for reconciliation.

— Permission Model —
• CAN: Broadcast service (system emission)
• CANNOT: end users trigger emission
• Unauthorized: N/A — backend emission

— UI States —
• N/A — no UI; Broadcast/Ads screens unchanged
[CEBE-MKT-SUP-S02] — Emit Ads events (impression, click, lead, conversion, spend) into CEBE

As a Marketing Owner, I want Ads impressions, clicks, leads, conversions, and spend captured in CEBE, so that ads conversion and ROAS are measurable and ad-sourced customers are attributable.
Must Have— (no UI)Data Fields:
• Ads event list (ad.impression/clicked/lead_captured/converted/spend_recorded) — see anchor → 4. Campaign Module §4b (not duplicated)
ad_id/campaign_id, ad_platform (meta/google/tiktok) — Ad platform
conversion_value/ad_spend (number, conditional) — Ad platform
qontak_customer_id — ContactResolver (when resolvable)

Before-After Behavior: Before — ads performance lives in ad platforms; CEBE has no ads data. After — ads events emitted/synced into CEBE, enabling % ads conversion, CPL/CPA, ROAS, and ad-attributed journeys; no change to Ads UX.
— Happy Path —
• AC-1: Given the marketing ingestion flag is ON, when an ad impression/click/lead_captured/converted occurs, then a standardized ad event (with ad_platform, campaign_id, qontak_customer_id where resolvable) reaches CEBE in <5s of receipt.
• AC-2: Given periodic ad-spend data from a platform, when the spend sync runs, then ad.spend_recorded events are emitted for the period AND ads_spend_sync_completed is logged.
• AC-3: Given an ad event for an unresolved/anonymous user, when emitted, then it is captured with platform identifiers and reconciled to qontak_customer_id when later resolved (e.g. on CTWA conversation start) — not dropped.

— Error / Unhappy Path —
• ERR-1: Given an ad-platform API is unavailable during spend sync, when the sync runs, then it is retried next cycle with no duplicate spend (idempotent), AND ads_spend_sync_completed is NOT logged until success, AND a gap alert fires if spend missing > 24h.
• ERR-2: Given the Event Adapter is unavailable, when an ad event is emitted, then it is buffered + retried (zero loss), AND no Ads management flow is blocked, AND marketing_event_emit_failed is logged.

— Permission Model —
• CAN: Broadcast/Ads service (system emission + platform sync)
• CANNOT: end users
• Unauthorized: N/A — backend emission

— UI States —
• N/A — no UI
[CEBE-MKT-SUP-S01-NEG] — Identity resolution stays with the lead adapter (Guard Rail — from Non-Goals)

As the Broadcast service, when an unresolved marketing event arrives, then this squad does not implement dedup/merge logic.
Guard RailBoundary from Non-Goal #4 (identity resolution owned by lead).• NEG-1: Given identity resolution (qontak_customer_id) is the lead squad's responsibility, when an unresolved marketing event arrives, then this squad does not implement dedup/merge logic — it defers to the lead adapter.
[CEBE-MKT-SUP-S02-NEG] — Downstream reads stay with the lead retriever (Guard Rail — from Non-Goals)

As a segmentation / marketing-automation consumer, when querying marketing metrics, then this squad's component is not involved.
Guard RailBoundary from Non-Goal #2 (no downstream/read features).• NEG-1: Given segmentation/marketing-automation consumption, when downstream features query marketing metrics, then this squad's component is not involved — the lead retriever/query layer governs reads.

Dependencies: Lead schema + adapter (staging); ad-platform API access (for S02).


PRD CHANGELOG

VersionDateBySectionTypeSummary
1.02026-06-26ClaudeAllCREATEDSUPPORT PRD for Broadcast Squad contribution to CEBE Phase 1: emit standardized Broadcast + Ads events into CEBE.
1.12026-06-26ClaudeS4, S12MODIFIEDExpanded flow; added Error/Unhappy Path blocks; Unauthorized line on S02; N/A plan/tier.
1.22026-06-26ClaudeHeader, CB-SMODIFIEDLinked shared Epic TF-3302; Status DRAFT → READY.
1.32026-06-26ClaudeAllMODIFIEDNewest write-prd skill: added Scope Changes; 5-column story table; linked event lists to anchor.
1.42026-06-26ClaudeCB-S, S5, S6, S7, S8, S12MODIFIEDConverted fenced code-block sections to tables/lists per skill. Committed to documents repo as .md.