Recommend Campaign Budgets
recommend_campaign_budgetsCalculate campaign or adset budget recommendations from a completed MMM without applying changes, using read-only marginal returns and bounded allocation.
Instructions
Calculate campaign budget suggestions without applying them. Requires read:models.
Uses the same channel-derived marginal curves and bounded allocator as the web app. This POST is a read-only calculation: it creates no saved run, starts no fit or posterior job and does not change mappings or advertising-platform budgets. Results are conditional scenarios, not independently fitted campaign response curves or a day-by-day forecast.
Args: model_hash: Owned, completed MMM with verified curve and currency provenance. observation_window: {start: YYYY-MM-DD, end: YYYY-MM-DD}, inclusive fact dates. currency: Explicit currency matching the model and facts, for example GBP. channel_daily_budgets: Exact channel keys mapped to daily totals in that currency. Supply exactly one of this or optimizer_run_id. Preserve currency minor precision. optimizer_run_id: Existing owned optimiser run for the same model, with verified planning dates and currency. Its totals become flat daily equivalents, not a daily schedule. The tool does not create or rerun an optimiser. level: campaign or adset. max_step_fraction: Maximum change from observed average daily spend; default 0.2. bounds: Optional rows keyed by full identity {platform, account_id, campaign_id, adset_id}, with min and/or max amounts in daily currency units. Use null adset_id at campaign grain. No platform floor is invented; the server validates bounds. expected_context_key: Optional context_key returned by get_campaign_marginal_returns. A changed model, facts, mapping or attribution basis refuses with 409 instead of calculating against evidence different from the scenario you reviewed.
Returns {channels: [{channel, status, total_daily_budget, rows, explanation, assumptions, reason, feasible_range}], ...provenance}. Ready rows include current and recommended budgets, the continuous solution, marginal returns and binding constraints. Refusals retain their reasons and feasible ranges; never relax bounds or silently change a total. Rounded amounts reconcile in integer currency minor units; rounding does not imply exact equality of marginal returns. Missing marginal uncertainty remains explicitly unavailable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | campaign | |
| bounds | No | ||
| currency | Yes | ||
| model_hash | Yes | ||
| optimizer_run_id | No | ||
| max_step_fraction | No | ||
| observation_window | Yes | ||
| expected_context_key | No | ||
| channel_daily_budgets | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||