# Marketing ROI Calculator MCP MCP

> Marketing ROI Calculator determines true campaign profit and payback period by accounting for all operational costs, not just ad spend. It calculates attributed revenue using models like Time-Decay, giving you a definitive financial picture of what actually drove sales.

## Overview
- **Category:** marketing
- **Price:** Free
- **Tags:** roi, marketing-analytics, attribution-modeling, financial-reporting, campaign-performance

## Description

Tired of dashboards that only show last-click attribution? Most reporting systems fail because they calculate ROI based on incomplete data—they miss overhead, production costs, and the complex journey a customer takes before buying. This connector solves that by building out a full financial picture.

It starts by aggregating every single cost associated with a campaign: media spend, staff time, tools, everything. Next, it applies sophisticated attribution logic to raw sales data, ensuring credit is given accurately across the entire buyer journey. Finally, it synthesizes all these numbers into one clean view, giving you clear ROI percentages and payback timelines for side-by-side comparisons.

Because this deals with financial figures, auditability matters. When your agent runs a calculation through Vinkius, every tool call generates a cryptographically signed audit trail. That means the data flow is tamper-proof by design, so you know exactly how the numbers arrived at their final conclusion.

## Tools

### compute_rois_metrics_comparative
Compares ROI metrics, calculating performance across multiple marketing campaigns side-by-side.

### query_marketing_investment_total
Calculates the total financial investment for a campaign within a defined date range.

### calculate_attributed_revenue
Calculates gross revenue linked to a specific campaign using various attribution models.

## Prompt Examples

**Prompt:** 
```
I need to compare Q1's performance for three campaigns: 'Spring2024_Launch', 'SEO Blitz', and 'Content Drive'. The gross margin is 0.65. Please run the full ROI comparison.
```

**Response:** 
```
First, I will aggregate costs using `query_marketing_investment_total` for each campaign's period. Then, I will calculate attributed revenue via `calculate_attributed_revenue`. Finally, I pass all results to `compute_rois_metrics_comparative` with the gross margin of 0.65.
```

**Prompt:** 
```
Calculate the total investment for 'SummerSale' from 2024-06-01 to 2024-08-31. Media spend was $50k, production was $10k, headcount overhead was $15k, and tools were $5k.
```

**Response:** 
```
I will call `query_marketing_investment_total` with the following parameters: campaignId='SummerSale', startDate='2024-06-01', endDate='2024-08-31', mediaSpend=50000, productionCost=10000, headcountOverhead=15000, toolsExpense=5000. This gives the total investment needed for attribution.
```

**Prompt:** 
```
Using a TIME_DECAY model, find the attributed revenue and conversion count for 'Spring2024_Launch' from 2024-01-01 to 2024-03-31. Raw revenue was $500k with 100 conversions.
```

**Response:** 
```
I will use the `calculate_attributed_revenue` tool, specifying campaignId='Spring2024_Launch', reportingPeriodStartDate='2024-01-01', reportingPeriodEndDate='2024-03-31', attributionModelType='TIME_DECAY', rawRevenue=500000, and conversionCount=100. This gives the most accurate gross revenue figure.
```

## Capabilities

### Aggregate total investment costs
It combines all operational and media spending for a campaign into one verified cost figure.

### Determine attributed gross revenue
It calculates the true value of sales using specific attribution models, like Time-Decay.

### Compare performance across campaigns
It delivers a full dashboard that compares ROI metrics and payback periods for multiple marketing efforts at once.

## Use Cases

### Quarterly Budget Review
A Marketing Director needs to compare Q1's performance for three separate product launches. They use `compute_rois_metrics_comparative` after feeding it the total costs (from `query_marketing_investment_total`) and the attributed sales data, proving which launch was most profitable.

### Calculating Total Campaign Cost
An Ops Lead needs to know the full cost of 'SummerSale' for audit purposes. They run `query_marketing_investment_total` with specific dates and all cost inputs (media, production, overhead) to get a verified total investment figure.

### Attribution Model Testing
A Finance Analyst needs to test if the 'Time-Decay' model is better than simple last-click attribution. They run `calculate_attributed_revenue` with raw sales data and compare the resulting attributed revenue figures for accuracy.

### Identifying Spend Gaps
The team identifies a campaign that has high costs but low projected ROI. They use all three tools together—cost first, then revenue, then comparison—to pinpoint exactly where the spending needs to shift for better returns.

## Benefits

- You stop guessing your performance. By calculating total investment using `query_marketing_investment_total`, you include every cost center—overhead, tools, and media spend—for an accurate picture.
- Forget basic revenue reporting. The agent uses sophisticated logic via `calculate_attributed_revenue` to give credit where it's due across the whole customer journey.
- Comparing campaigns is simple. Use `compute_rois_metrics_comparative` to get a dashboard view of ROI percentage and payback months for multiple efforts at once.
- You move past guesswork. The ability to compare performance metrics means you can immediately see which channels deliver the highest real profit margin against their total spend.
- The entire process is auditable. Vinkius ensures every single tool call generates a cryptographically signed trail, so your finance team trusts the numbers.

## How It Works

The bottom line is you get deterministic financial reports showing true profit relative to total investment.

1. You first tell the agent which campaign and date range you're tracking, giving it all the necessary cost inputs.
2. The system then uses advanced models to calculate how much revenue is truly linked to that spend across the whole customer lifecycle.
3. Finally, the results combine the total costs with the attributed revenue, generating a clear comparison of ROI percentage and payback months.

## Frequently Asked Questions

**How does `calculate_attributed_revenue` handle complex customer journeys?**
`calculate_attributed_revenue` uses models like Time-Decay. This means it doesn't just credit the last ad click; it distributes revenue across all touchpoints that influenced the sale.

**What costs does `query_marketing_investment_total` include?**
It aggregates everything: media spend, production costs, overhead, and tools expense. It builds a verified total investment number so you don't forget any cost center.

**Can I compare three campaigns easily using `compute_rois_metrics_comparative`?**
Yes. This tool is built for comparison. You pass it all the necessary metrics, and it spits out a single dashboard comparing ROI percent and payback months side-by-side.

**Is this calculation accurate enough for finance reports?**
The calculations are highly auditable. Since Vinkius runs every call in an isolated sandbox, the tool calls produce a cryptographically signed audit trail showing exactly how the numbers were derived.

**When should I use `query_marketing_investment_total` to define my investment scope?**
You must specify a distinct date range and a campaign ID. The tool calculates the total spending, including media spend, production costs, overhead, and tools expense for that exact window.

**What happens if I provide an incorrect raw revenue figure to `calculate_attributed_revenue`?**
The system will return a validation error. This failure message tells you exactly which parameter needs correcting, preventing bad data from entering the final ROI calculation.

**How does the platform combine results when I run multiple calculations using `compute_rois_metrics_comparative`?**
The tool accepts structured inputs containing all necessary metrics. This allows you to pass data derived from separate runs, letting it compare performance across different groups.

**Is there a way to optimize the token use when running a full sequence involving `query_marketing_investment_total` and other tools?**
Yes. Vinkius has native token optimization built into every call, which cuts down on token consumption significantly compared to manual tool execution.

**How does the system account for all types of spending?**
The `query_marketing_investment_total` tool handles this by aggregating four distinct cost categories: media spend, production costs, headcount overhead, and tools expense. This ensures your total investment is accurate before any ROI calculation begins.

**Which attribution model should I use for the most accurate revenue figure?**
The `calculate_attributed_revenue` tool supports LAST_TOUCH, FIRST_TOUCH, and TIME_DECAY. We recommend starting with TIME_DECAY for complex B2B sales cycles as it provides the most weighted view of customer influence.

**Can I compare multiple campaigns in one go?**
Yes. The `compute_rois_metrics_comparative` tool is designed for this, allowing you to pass a list of campaign IDs and generate a side-by-side comparison of ROI, payback months, and efficiency metrics.