Blueprint
System Data Flow
Entry Point
Process Node
Data Store
Output
Productionv1.0.0
ROI Calculator
Marketing
Converts assumptions into a board-ready ROI narrative with transparent math and scenario toggles.
Logic Breakdown
Applies base/conservative/aggressive multipliers to traffic, CVR, and AOV to estimate incremental profit. Deterministic compute layer suitable for exporting to dashboards; stable inputs = stable outputs.
Architecture Decisions
- 01Converts assumptions into a board-ready ROI narrative with transparent math and scenario toggles.
- 02Applies base/conservative/aggressive multipliers to traffic, CVR, and AOV to estimate incremental profit.
- 03Deterministic compute layer suitable for exporting to dashboards; stable inputs = stable outputs.
Code Snippet
typescriptroi-calculator.ts
type Scenario = "conservative" | "base" | "aggressive";
export function calcROI({
spend,
grossMargin,
baselineRevenue,
incrementalRevenue,
}: {
spend: number;
grossMargin: number;
baselineRevenue: number;
incrementalRevenue: number;
}) {
const incrementalProfit = incrementalRevenue * grossMargin;
const roi = (incrementalProfit - spend) / Math.max(1, spend);
const totalRevenue = baselineRevenue + incrementalRevenue;
return { roi, incrementalProfit, totalRevenue };
}
export function applyScenario(v: number, s: Scenario) {
const m = s === "conservative" ? 0.85 : s === "aggressive" ? 1.2 : 1;
return v * m;
}Key Dependencies
Unit Economics—Core stack component
Scenario Modeling—Core stack component
Sensitivity—Core stack component
Technical Spec
- Pillar
- Marketing
- Modes
- 3
- Outputs
- ROI
Tags
Unit EconomicsScenario ModelingSensitivity
Live Sandbox
Interactive runtime environment — ROI Calculator v1.0.0
roi-calculator-sandbox
$ npm run sandbox
> Initialising ROI Calculator v1.0.0…
> Status: Production
// Live iframe mounted once sandboxUrl is configured.