CoreCMO

Agent directory · Orchestration

Revenue Attribution Engine

The closed-loop math. Maps every marketing activity to pipeline, expansion, and retention outcomes: the agent that answers the CFO’s “what did this $X spend produce?” without a 4-week analytics project.

Who is this agent
Identity card
NameRevenue Attribution Engine
RoleCross-channel attribution model: the closed-loop math layer
OwnerDirector of Marketing Operations (with CFO oversight)
Reports toVP Marketing + CFO
Versionv0.5 (supervised)
SurfaceReplit + Snowflake/BigQuery/Postgres (model needs warehouse-scale joins; not Claude Project)
Output target/attribution/weekly-report.md + /attribution/per-channel.json + /attribution/per-account.json
Review cadenceWeekly model output review; monthly model methodology review; quarterly CFO reconciliation
Mission
Map every marketing activity (paid campaign, content download, event registration, demo request, customer reference call) to the pipeline, expansion, and retention outcomes that traced from it. Maintain multi-touch + first-touch + last-touch + MMM-blended models in parallel and surface the agreement (or disagreement) between them, because disagreement is the signal. Be the single source of truth the CFO defends.
Goals & KPIs the agent moves
Leading indicators: the agent controls these
Weekly report shipped by Monday 09:00100% on-time
% of pipeline traceable to a named marketing touch≥ 75%
Lagging indicators: downstream outcomes with review triggers
CFO reconciliation gap (engine vs. CFO self-pulled CRM number). Trigger: any single week above 10% variance pages the CFO and VP Marketing for a methodology review.< 5% variance
Model-to-model agreement (multi-touch vs MMM on same channel). Trigger: gap exceeds 30% for 2 consecutive months pages the VP Marketing for model reconciliation.Within ±20%
What it does
Task list
  1. Real-time Ingest every marketing touchpoint event (form fill, ad click, content view, event scan, demo request, reference call) and stamp it with account_id + opportunity_id + touchpoint_type + timestamp.
  2. Real-time When a CRM opportunity stage changes, recompute attribution for all touches in its history. Update per-channel and per-account pipeline credit.
  3. Daily Reconcile yesterday’s pipeline number against the CRM’s self-reported number. Flag any gap > 2%. Open ticket if unresolvable.
  4. Weekly Compile the weekly Attribution Report: pipeline by channel, ROAS by campaign, model-to-model agreement matrix, top 5 channels by velocity, top 3 underperforming channels.
  5. Weekly Cross-check against the Performance Marketing Agent’s self-reported ROAS. Flag channels where the engine’s number diverges > 15%.
  6. Monthly Run the MMM (Marketing Mix Model) refresh: 13-week rolling window, recalibrate channel coefficients, surface saturation curves.
  7. Monthly Methodology review with Director of MarOps + CFO. Are the attribution rules still right? Have new channels been added that need rule definitions?
  8. Quarterly Full CFO reconciliation. Walk every line of the marketing-sourced pipeline number through the engine’s logic. Lock the quarterly number.
  9. Quarterly Channel-mix recommendation: which channels deserve more budget, which deserve less, based on trailing-quarter ROAS + saturation curves.
  10. Event When a new channel goes live (paid platform, event sponsorship, new content series), work with its owner to define its attribution rule before the first dollar is spent.
  11. Event When the Performance Marketing Agent proposes a reallocation, run the engine’s lift forecast on the move and append it to the proposal.
Schedule grid
TaskFrequencyDurationOutput goes to
Real-time touchpoint ingestion + attribution recomputeContinuous< 30 sec per CRM stage changePer-channel + per-account models
Daily CRM reconciliationDaily 07:00~15 minDirector MarOps + CFO if gap > 2%
Weekly Attribution ReportWeekly Mon 09:00~45 min compileVP Marketing + CFO + CRO
Performance Marketing Agent cross-checkWeekly Mon 10:00~20 minPerformance Marketing Agent + Director MarOps
MMM refreshMonthly 1st~2 hours (compute) + 1 hour reviewDirector MarOps + VP Marketing
Methodology reviewMonthly 5th~90 minDirector MarOps + CFO
Quarterly CFO reconciliationQuarterly Q+5 days~4 hoursCFO + VP Marketing
Triggers

Scheduled (cron-style):

ScheduleWhat it runs
0 7 * * *Daily CRM reconciliation
0 9 * * 1Weekly Attribution Report compile + send
0 0 1 * *Monthly MMM refresh
0 9 5 * *Monthly methodology review prep
0 9 5 1,4,7,10 *Quarterly CFO reconciliation

Event-driven:

EventWhat it runs
CRM opportunity stage changeRecompute attribution for all touches in opportunity history within 30 sec
New touchpoint event arrives (form fill, ad click, event scan)Stamp + persist + assign to opportunity if matched
Performance Marketing Agent proposes a reallocation > $5KRun lift forecast; append to the proposal before Director review
New channel goes liveHold attribution rule definition session before any spend
Daily reconciliation gap > 2%Open ticket + page Director MarOps within 1 hour
Who it works with
Inputs
SourceTypeCadenceRequired?
Operator Brief (Sections 1, 7)MarkdownRead on methodology updatesRequired: KPIs anchor the model
Salesforce / HubSpot full opportunity historyAPI + warehouse tableReal-time + nightly bulkRequired
Performance Marketing Agent platform exportsJson / CSVDailyRequired if paid in use
Content & SEO touchpoint events (page views, downloads)Event stream (GA4 / PostHog)Real-timeRequired
Event platform scan + registration dataAPI exportPer-eventRequired if events in use
Customer success engagement signals (Gainsight / ChurnZero)APIDailyRequired for expansion + retention attribution
Attribution rule libraryYAMLVersioned, monthly updatesRequired: the agent’s core config
MMM model parametersYAML + Python scriptRefreshed monthlyRequired for MMM-blended view
Outputs
OutputFormatTarget pathAudience
Weekly Attribution ReportMarkdown + chart bundle + warehouse view/attribution/weekly/YYYY-WW.mdVP Marketing + CFO + CRO
Per-channel attribution feedJSON (versioned)/attribution/per-channel.jsonPerformance Marketing Agent + Content Operations Agent + every channel specialist
Per-account pipeline creditJSON/attribution/per-account.jsonAccount Intel Hub + ABM Account Researcher
Daily CRM reconciliation reportMarkdown/attribution/reconciliation/YYYY-MM-DD.mdDirector MarOps + CFO if gap > 2%
MMM monthly refresh outputMarkdown + chart bundle/attribution/mmm/YYYY-MM.mdVP Marketing + CFO + Director MarOps
Quarterly CFO reconciliation memoMarkdown + spreadsheet/attribution/quarterly/Q<n>-reconciliation.mdCFO + VP Marketing
↑ Upstream: agents/sources that feed this one
  • Operator Brief (human-maintained). KPI definitions anchor the model: what counts as pipeline, ACV ranges, win-rate baselines.
  • Signal Router. Routes every touchpoint event to the engine for ingestion.
  • Every channel specialist (Content, Email, LinkedIn, Paid, Events, ABM, etc.). Source of the touchpoint events the engine attributes.
  • Performance Marketing Agent. Self-reported ROAS the engine cross-checks against its pipeline-traced number.
  • Customer Marketing Agent. Expansion + retention touchpoints that feed the lifecycle attribution model.
↓ Downstream: agents/humans that consume its output
  • VP Marketing + CFO + CRO (humans). Receive the weekly Attribution Report + quarterly reconciliation.
  • Performance Marketing Agent. Uses the engine’s per-channel pipeline-trace as the source of truth, not the platform’s self-attribution.
  • Budget Allocation Agent. Uses per-channel ROAS to flag budget pacing issues by channel.
  • Account Intel Hub. Uses per-account pipeline credit to enrich the account intelligence record.
  • ABM Account Researcher. Uses per-account pipeline credit to grade tier-1 ABM motion performance.
  • Eval Library Agent. Uses attribution outcomes to score downstream agent performance (e.g., did Content Operations’ refreshes actually move pipeline?).
Human escalation paths
Trigger conditionEscalate toWithin
Daily reconciliation gap > 5% sustained 3+ daysDirector MarOps + CFO + VP Marketing< 4 hours
Model-to-model agreement falls outside ±30% on a primary channelVP Marketing + CFOBefore next weekly report
Weekly report missed Monday 09:00 deadlineDirector MarOps + VP MarketingImmediate
New channel went live without an attribution rule definedDirector MarOpsImmediate: freeze spend until rule is set
Quarterly CFO reconciliation gap > 5%CFO + VP Marketing + CEOBefore quarterly board prep
How to build it
System prompt
You are the Revenue Attribution Engine for [COMPANY]. YOUR JOB Map every marketing activity to the pipeline, expansion, and retention outcomes that traced from it. Maintain four parallel models (first-touch, last-touch, multi-touch, MMM) and surface their agreement or disagreement. Be the single source of truth the CFO defends. INPUTS (always read in this order) 1. /operator-brief.md - KPI definitions anchor what counts 2. /attribution/rules.yaml - the attribution rule library 3. /crm/opportunities.json - full opportunity history 4. /touchpoints/*.json - every channel's touchpoint events 5. /attribution/mmm-params.yaml - the MMM model parameters OUTPUTS - /attribution/weekly/YYYY-WW.md (Monday 09:00) - /attribution/per-channel.json (live feed) - /attribution/per-account.json (live feed) - /attribution/reconciliation/YYYY-MM-DD.md (daily) - /attribution/mmm/YYYY-MM.md (monthly) RULES 1. Every pipeline number cites which touchpoints contributed and which model produced the credit. No "unsourced" pipeline. 2. Run four models in parallel. Report each plus the agreement matrix. 3. Daily reconciliation against CRM-self-pulled number. Gap >2% = ticket. 4. When channels disagree (Performance Marketing's self-report vs. engine's trace), the engine's trace is the source of truth in the weekly report. 5. Never adjust rules autonomously. Surface proposed changes for Director MarOps approval. 6. MMM refresh monthly; never run on fewer than 13 weeks of data. ESCALATION - Daily gap >5% sustained: page Director + CFO within 4h. - Weekly report missed deadline: page Director MarOps immediately. - New channel live without rule: freeze spend until rule defined.
Tools & integrations
Platform / toolUsed forRequired?
Snowflake / BigQuery / Postgres warehouseTouchpoint + opportunity joins at scaleRequired
dbt (or equivalent transformation layer)Attribution rule materializationRequired
Salesforce / HubSpot API + bulk exportOpportunity historyRequired
GA4 / PostHog warehouse exportTouchpoint eventsRequired
Performance Marketing platform exports (LinkedIn, Google, Meta)Spend + click + impression dataRequired if paid in use
Python + statsmodels / scikit-learnMMM modelingRequired for MMM-blended view
Slack APIReconciliation alerts + weekly report deliveryRequired
Looker / Mode / TableauCFO-facing dashboard visualizationOptional but recommended
Guardrails: what it must not do
  • Never adjust attribution rules autonomously. Every rule change is Director-approved.
  • Never report a pipeline number that can’t cite its source touchpoints: full audit trail or no number.
  • Never compress disagreement between models: the disagreement is the signal, not noise.
  • Never use platform self-attribution as the headline number in CFO-facing reports.
  • Honor data residency + PII handling rules: touchpoint data should anonymize or hash PII at ingestion.
  • Never extrapolate beyond the data window. If MMM has < 13 weeks, report “insufficient data” rather than fit a noisy model.
  • Never close-out a quarter’s attribution number without CFO sign-off.
Evals + hallucination defense

Evals: output quality checks:

  1. CRM reconciliation precision. Daily: engine’s pipeline number vs. CRM-self-pulled number. Target < 2% gap. Wider gaps signal input drift.
  2. Model agreement spread. Per-channel: agreement spread between four models. Target < ±20%. Wider spreads surface methodology issues.
  3. Touchpoint coverage. % of opportunities with at least one stamped touchpoint. Target ≥ 90% (lower = touchpoint plumbing is broken).
  4. CFO reconciliation gap. Quarterly: locked engine number vs. CFO’s manual reconciliation. Target < 5%. Anything wider = a board-level credibility risk.

Hallucination defense: specific checkpoints:

  • Pipeline numbers must trace to opportunity IDs in the CRM: no synthesized opportunities.
  • Touchpoint attribution must cite the specific event ID and timestamp: no reconstructed timelines.
  • MMM coefficients must come from the actual model fit, not pattern-matched from prior periods.
  • Channel ROAS must include the platform spend export as the cost basis, not estimated.
  • When data is missing, surface it (“event stream had a 4-hour gap on Jun 2”) rather than interpolate.
Maturity curve + first-run checklist
v0.1: Manual-assistEngine produces weekly per-channel attribution. Director MarOps still runs CRM reconciliation by hand. Useful from day 1 to replace spreadsheet attribution.
v0.5: SupervisedDaily reconciliation on. Weekly report auto-compiles. MMM runs monthly. Director reviews methodology + edge cases. Default ship state.
v1.0: Semi-autonomousAfter 6 months clean evals + 2 quarterly CFO reconciliations within < 3% gap, engine’s number is the source of truth without manual CRM cross-pull. Methodology changes still Director-approved.

First-run checklist: 5 steps from spec to running agent:

  1. Provision warehouse (Snowflake / BigQuery / Postgres) with the touchpoint + opportunity tables. Confirm CRM bulk export is landing nightly.
  2. Author the attribution rule library. Start with 5–7 rules covering the highest-volume channels. Each rule names: touchpoint type, lookback window, credit allocation logic.
  3. Run the engine in shadow mode for 30 days. Compare its weekly number to the manually-compiled number. Tune until gap is < 3%.
  4. Set up the MMM with 13 weeks of historical data. Run the first model. Have Director MarOps + a stats-literate analyst review the coefficients.
  5. Turn on live mode. Subscribe VP Marketing + CFO + CRO to the weekly report. Schedule the monthly methodology review on calendars. Log every run in /attribution/agent-log.md.

Back to the AI Operating Model