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
- 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.
- Real-time When a CRM opportunity stage changes, recompute attribution for all touches in its history. Update per-channel and per-account pipeline credit.
- Daily Reconcile yesterday’s pipeline number against the CRM’s self-reported number. Flag any gap > 2%. Open ticket if unresolvable.
- 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.
- Weekly Cross-check against the Performance Marketing Agent’s self-reported ROAS. Flag channels where the engine’s number diverges > 15%.
- Monthly Run the MMM (Marketing Mix Model) refresh: 13-week rolling window, recalibrate channel coefficients, surface saturation curves.
- Monthly Methodology review with Director of MarOps + CFO. Are the attribution rules still right? Have new channels been added that need rule definitions?
- Quarterly Full CFO reconciliation. Walk every line of the marketing-sourced pipeline number through the engine’s logic. Lock the quarterly number.
- Quarterly Channel-mix recommendation: which channels deserve more budget, which deserve less, based on trailing-quarter ROAS + saturation curves.
- 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.
- 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
| Task | Frequency | Duration | Output goes to |
| Real-time touchpoint ingestion + attribution recompute | Continuous | < 30 sec per CRM stage change | Per-channel + per-account models |
| Daily CRM reconciliation | Daily 07:00 | ~15 min | Director MarOps + CFO if gap > 2% |
| Weekly Attribution Report | Weekly Mon 09:00 | ~45 min compile | VP Marketing + CFO + CRO |
| Performance Marketing Agent cross-check | Weekly Mon 10:00 | ~20 min | Performance Marketing Agent + Director MarOps |
| MMM refresh | Monthly 1st | ~2 hours (compute) + 1 hour review | Director MarOps + VP Marketing |
| Methodology review | Monthly 5th | ~90 min | Director MarOps + CFO |
| Quarterly CFO reconciliation | Quarterly Q+5 days | ~4 hours | CFO + VP Marketing |
Triggers
Scheduled (cron-style):
| Schedule | What it runs |
0 7 * * * | Daily CRM reconciliation |
0 9 * * 1 | Weekly 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:
| Event | What it runs |
| CRM opportunity stage change | Recompute 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 > $5K | Run lift forecast; append to the proposal before Director review |
| New channel goes live | Hold attribution rule definition session before any spend |
| Daily reconciliation gap > 2% | Open ticket + page Director MarOps within 1 hour |
Who it works with
Inputs
| Source | Type | Cadence | Required? |
| Operator Brief (Sections 1, 7) | Markdown | Read on methodology updates | Required: KPIs anchor the model |
| Salesforce / HubSpot full opportunity history | API + warehouse table | Real-time + nightly bulk | Required |
| Performance Marketing Agent platform exports | Json / CSV | Daily | Required if paid in use |
| Content & SEO touchpoint events (page views, downloads) | Event stream (GA4 / PostHog) | Real-time | Required |
| Event platform scan + registration data | API export | Per-event | Required if events in use |
| Customer success engagement signals (Gainsight / ChurnZero) | API | Daily | Required for expansion + retention attribution |
| Attribution rule library | YAML | Versioned, monthly updates | Required: the agent’s core config |
| MMM model parameters | YAML + Python script | Refreshed monthly | Required for MMM-blended view |
Outputs
| Output | Format | Target path | Audience |
| Weekly Attribution Report | Markdown + chart bundle + warehouse view | /attribution/weekly/YYYY-WW.md | VP Marketing + CFO + CRO |
| Per-channel attribution feed | JSON (versioned) | /attribution/per-channel.json | Performance Marketing Agent + Content Operations Agent + every channel specialist |
| Per-account pipeline credit | JSON | /attribution/per-account.json | Account Intel Hub + ABM Account Researcher |
| Daily CRM reconciliation report | Markdown | /attribution/reconciliation/YYYY-MM-DD.md | Director MarOps + CFO if gap > 2% |
| MMM monthly refresh output | Markdown + chart bundle | /attribution/mmm/YYYY-MM.md | VP Marketing + CFO + Director MarOps |
| Quarterly CFO reconciliation memo | Markdown + spreadsheet | /attribution/quarterly/Q<n>-reconciliation.md | CFO + 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 condition | Escalate to | Within |
| Daily reconciliation gap > 5% sustained 3+ days | Director MarOps + CFO + VP Marketing | < 4 hours |
| Model-to-model agreement falls outside ±30% on a primary channel | VP Marketing + CFO | Before next weekly report |
| Weekly report missed Monday 09:00 deadline | Director MarOps + VP Marketing | Immediate |
| New channel went live without an attribution rule defined | Director MarOps | Immediate: freeze spend until rule is set |
| Quarterly CFO reconciliation gap > 5% | CFO + VP Marketing + CEO | Before 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 / tool | Used for | Required? |
| Snowflake / BigQuery / Postgres warehouse | Touchpoint + opportunity joins at scale | Required |
| dbt (or equivalent transformation layer) | Attribution rule materialization | Required |
| Salesforce / HubSpot API + bulk export | Opportunity history | Required |
| GA4 / PostHog warehouse export | Touchpoint events | Required |
| Performance Marketing platform exports (LinkedIn, Google, Meta) | Spend + click + impression data | Required if paid in use |
| Python + statsmodels / scikit-learn | MMM modeling | Required for MMM-blended view |
| Slack API | Reconciliation alerts + weekly report delivery | Required |
| Looker / Mode / Tableau | CFO-facing dashboard visualization | Optional 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:
- CRM reconciliation precision. Daily: engine’s pipeline number vs. CRM-self-pulled number. Target < 2% gap. Wider gaps signal input drift.
- Model agreement spread. Per-channel: agreement spread between four models. Target < ±20%. Wider spreads surface methodology issues.
- Touchpoint coverage. % of opportunities with at least one stamped touchpoint. Target ≥ 90% (lower = touchpoint plumbing is broken).
- 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:
- Provision warehouse (Snowflake / BigQuery / Postgres) with the touchpoint + opportunity tables. Confirm CRM bulk export is landing nightly.
- 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.
- Run the engine in shadow mode for 30 days. Compare its weekly number to the manually-compiled number. Tune until gap is < 3%.
- Set up the MMM with 13 weeks of historical data. Run the first model. Have Director MarOps + a stats-literate analyst review the coefficients.
- 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