get_scenario_template
Generate a forward-period scenario template from a completed model, returning prefilled future dates, channel names, baseline values, and average CPMs for scenario planning.
Instructions
Generate a forward-period scenario template from a completed model.
Returns future dates pre-filled with values from 1 year prior, the list of media and control channels, and average cost-per-unit per media channel.
IMPORTANT: Always call this before run_scenario or run_optimizer to discover:
Channel names (use these exact names in scenario_data, bounds, laydown_weights, period_cpm)
Average CPM per channel (avg_cpu_by_channel — use for period_cpm in run_optimizer)
Baseline activity values per channel (rows — use as starting point for scenarios)
Media vs control channel classification (variable_classification field)
The response also includes: operating_margin (the model's stored margin, if set — useful for profit math), variable_transforms (per-variable transform metadata), periodicity, and start_date.
WARNING: Template data may contain NaN or null values for channels without historical data. You MUST replace NaN/null with 0 before passing to run_scenario, otherwise the prediction will fail downstream.
Args: model_hash: Hash of a completed model. periods_forward: Number of future periods to generate (default 12).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_hash | Yes | ||
| periods_forward | No |