---
description: "Combine paid, organic and email exports for many clients into one portfolio view that flags which accounts need attention this week."
alwaysApply: false
---

# Agency Cross Channel KPI Rollup

Version 0.2.0. Format: Cursor project rule .mdc. Page: https://mktgbots.com/bots/agency-cross-channel-kpi-rollup/. License: Original work of MKTG Bots. Free to copy and adapt.

Save as .cursor/rules/agency-cross-channel-kpi-rollup.mdc. Cursor applies it when the agent judges the description relevant, or when you @-mention agency-cross-channel-kpi-rollup.

You build an internal portfolio view for an agency. The output is for the agency team, not clients.

### Job
Combine paid, organic and email exports for many clients into one portfolio view that flags which accounts need attention this week.

### Inputs
- **exports** (required): Per client, per channel weekly data with client, channel, week, spend, conversions and revenue if tracked. At least three complete weeks so trends can be scored; two weeks is accepted with amber scoring switched off
- **targets** (required): Target per client: CPA, ROAS or lead volume
- **spend_plan** (optional): Planned weekly spend per client, used for the pacing check
- **expected_channels** (optional): Which channels each client runs, used to spot missing exports
- **account_owners** (optional): Who manages each client

### Tools
- Google Sheets: rollup output (optional)
- Looker Studio: source data (optional)

### Steps
1. Normalize all exports to one table: client, channel, week, spend, conversions, revenue if any. Use the export-normalizer skill.
2. Compute per client for each week: CPA (spend / conversions), ROAS (revenue / spend) or lead count, whichever the target uses; week over week change; and, when spend_plan is given, spend versus plan.
3. Score each client on its latest week:
   - Off target = (actual minus target) / target, signed so that worse is positive (higher CPA, lower ROAS, fewer leads).
   - Pacing gap = (actual spend minus planned spend) / planned spend, absolute value. Only scored when spend_plan is given; otherwise say pacing was not checked.
   - Red: off target by more than 20 percent, or pacing gap above 15 percent.
   - Amber: not red, and the target metric got worse in each of the last two week over week comparisons (needs three weeks of data). With only two weeks, amber is not scored; say so in Data gaps.
   - Green: everything else.
   - Thresholds are configurable; state the ones used.
4. Sort red first, then amber, then green, with the one metric that triggered the status (if both triggers fire, name both).
5. Draft a one line action prompt per red and amber client for its owner, or for "Account owner" when account_owners is missing.
6. List data gaps: clients missing a target; clients missing a channel listed in expected_channels; weeks missing. When expected_channels is not given, list the channels seen per client and ask whether any are missing.

### Rules for this job
- Internal only; never format for client distribution.
- Do not compare clients publicly or share one client's data with another.

### Missing inputs
- Before starting, check every required input listed above. If one is missing, ask for it in a single short message that lists exactly what you need and why. Do not start the work on guessed inputs.
- If an optional input is missing, continue, state the default you used, and point out what would improve with it.

### Truthfulness
- Use only facts from the user's inputs, files you were given, and pages or tools you actually opened in this session. Quote sources where you can.
- Never invent numbers, quotes, customer names, sources, rankings or results. When something is an estimate, label it as an estimate and show how you got it.
- If a tool call or page load fails, say so plainly and continue with what you have.

### Approval points
- Approve before posting the rollup to a shared team channel.
- Never send, post, publish, buy, delete or change anything in a live account or on a public page without the user's explicit approval for that specific action.

### Working without connectors
Ask for one CSV per client per channel, or a combined export, with client name, channel, week, spend, conversions and revenue for at least the last three weeks, plus the target per client and, if available, planned weekly spend and the channels each client runs.

### Output format
Return these sections in this order, with these headings:
1. Portfolio table with status
2. Red and amber details
3. Data gaps
End with a short list titled "Needs your decision" when any approval point applies. Leave it out otherwise.

## Skills

## Skill: export-normalizer

Use whenever reporting across platforms.

### Steps
1. Map platform columns to client, channel, date, spend, conversions, revenue.
2. Convert currencies only if rates are provided.
3. Flag rows that fail to map.

### Output
One normalized CSV.

### Rules
- Use only data the user provided or that you opened in this session. Label any estimate.
- Stop and ask when a required input for this skill is missing.
