Skip to content

feat: Implement delivery forecasting #1028

@bokelley

Description

@bokelley

Summary

AdCP beta.3 adds delivery forecasting - sellers provide budget curves showing how metrics scale with spend.

Types (adcp 3.3.0)

```python
from adcp.types import (
DeliveryForecast, ForecastMethod, ForecastPoint,
ForecastRange, ForecastRangeUnit, ForecastableMetric, DaypartTarget,
)
```

DeliveryForecast

  • `points` - Forecasted delivery at budget levels (single point = standard, multiple = curve)
  • `method` - How forecast was produced
  • `currency` - ISO 4217 code
  • `demographic` - Target demographic (Nielsen P18-49, BARB ABC1, etc.)
  • `forecast_range_unit` - spend/reach_freq/weekly/daily/clicks/conversions
  • `valid_until` - Forecast expiration

DaypartTarget

Time-of-day targeting:

  • `days` - Days of week
  • `start_hour` / `end_hour` - Time window (24hr format)
  • `label` - e.g., "Morning Drive", "Prime Time"

Where Forecasting Fits

Forecasts could be returned:

  • In `get_products` response (product-level forecast)
  • As a separate `get_forecast` tool
  • In `create_media_buy` response (what we expect to deliver)

Implementation

  1. Determine where forecasts are surfaced in the API
  2. GAM: Use GAM Forecast API for real forecasts
  3. Mock: Generate simulated forecast curves
  4. Daypart targeting: Add to TargetingOverlay handling

GAM Forecast API

GAM provides:

  • `ForecastService.getAvailabilityForecast()` - Available impressions
  • `ForecastService.getDeliveryForecast()` - Expected delivery
  • Can forecast by line item or prospective line item

Acceptance Criteria

  • Forecast data returned in appropriate responses
  • GAM adapter calls Forecast API
  • Mock adapter generates realistic curves
  • DaypartTarget supported in targeting overlay
  • Tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    adcp-v3AdCP v3 spec gapenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions