Analyze Campaign Attribution
Requirements
CSV file with campaign/source column and deal amount data
1
If the CSV path was not already provided, ask the user for it.
Should include: campaign/source/channel and deal amount (ideally also status).
Establish for the subtask:
- Output path:
Parsed Sales Data
- Column types to detect: campaigns/sources, amounts, stages/outcomes, dates
5
Analyze campaign attribution:
- Identify campaign/source column and amount column from interpreted columns
- If multiple campaign columns exist (utm_source, utm_campaign, etc.), analyze each
- Sum revenue by campaign/source
- Count deals by campaign/source
- Calculate average deal size per campaign
- If cost data available, calculate ROI; otherwise note it's missing
- Rank campaigns by closed revenue
Present results following the Campaign Attribution template.
Show both pipeline generated and closed revenue if status data available.
6
Provide recommendations:
- Which campaigns to double down on
- Which to investigate (high volume, low conversion)
- Which to potentially cut (low ROI)
To run this task you must have the following required information:
> CSV file with campaign/source column and deal amount data
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
---
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. If the CSV path was not already provided, ask the user for it.
Should include: campaign/source/channel and deal amount (ideally also status).
Establish for the subtask:
- Output path: `./documents/tmp/sales-data.json`
- Column types to detect: campaigns/sources, amounts, stages/outcomes, dates
2. [Gather Requirements for Parse and Interpret CSV] The next step has the following requirements: "CSV file path to parse. Column type hints (e.g., "scores, customers, dates, categories"). Output file path for the interpreted data.". Search the user's data for this information or ask them directly if needed. Do not proceed until you have this information.
3. [Execute Parse and Interpret CSV Task]: Spawn a subagent and provide it with the requirements gathered above and instructions to read `./skills/sauna/[skill_id]/references/recipes/stdlib.csv.interpret.md` for its task list
4. [Read Parsed Sales Data]: Read the file at `./documents/tmp/sales-data.json` and analyze its contents (Load the parsed and interpreted CSV data)
5. [Read Sales Analytics Guide]: Read the documentation in: `./skills/sauna/[skill_id]/references/sales.analytics.guide.md` (Campaign attribution output format)
6. Analyze campaign attribution:
1. Identify campaign/source column and amount column from interpreted columns
2. If multiple campaign columns exist (utm_source, utm_campaign, etc.), analyze each
3. Sum revenue by campaign/source
4. Count deals by campaign/source
5. Calculate average deal size per campaign
6. If cost data available, calculate ROI; otherwise note it's missing
7. Rank campaigns by closed revenue
Present results following the Campaign Attribution template.
Show both pipeline generated and closed revenue if status data available.
7. Provide recommendations:
- Which campaigns to double down on
- Which to investigate (high volume, low conversion)
- Which to potentially cut (low ROI)