Aller au contenu principal
Reporting docs
Use case Codex + Trafficking

Pre-deploy feasibility

Line item forecast with Codex

Use Codex to forecast a planned line item before it mutates GAM, including sizes, priority, geo, frequency caps and goal.

User prompt

"Codex, forecast this planned STANDARD line item before deploy: 300x250 and 728x90, France, Homepage ad units, 500,000 impressions, priority 8, frequency cap 3 per day. Tell me if it is safe."

Expected outcome

A feasibility answer with availableUnits, matchedUnits, risk level and the targeting constraint that needs relaxing.

Agent workflow

  1. 01

    Run get_standalone_forecast for new work or get_delivery_forecast_by_line_item for an existing line item.

  2. 02

    Pass actual priority, creativeSizes and frequencyCaps to avoid inflated inventory.

  3. 03

    Use get_prospective_delivery_forecast when several candidate line items may contend with each other.

MCP functions

Parent MCP call shown with the reporting action.

FunctionCostPurpose
reporting(action="get_standalone_forecast")0 crForecasts a planned line item.
reporting(action="get_delivery_forecast_by_line_item")0 crChecks an existing line item.
reporting(action="get_prospective_delivery_forecast")0 crSimulates multiple candidate line items together.

JSON payload

{
  "tool": "reporting",
  "arguments": {
    "action": "get_standalone_forecast",
    "params": {
      "adUnitIds": [
        "1234567",
        "1234568"
      ],
      "startDate": "2026-07-01T00:00:00",
      "endDate": "2026-07-31T23:59:59",
      "primaryGoalUnits": 500000,
      "lineItemType": "STANDARD",
      "priority": 8,
      "geoTargeting": [
        "2250"
      ],
      "creativeSizes": [
        {
          "width": 300,
          "height": 250
        },
        {
          "width": 728,
          "height": 90
        }
      ],
      "frequencyCaps": [
        {
          "maxImpressions": 3,
          "numTimeUnits": 1,
          "timeUnit": "DAY"
        }
      ],
      "includeTargetingCriteriaBreakdown": true
    }
  }
}

Representative output

  • Forecast: 612,400 availableUnits for a 500,000 goal, riskLevel=LOW.
  • Constraint: geoTargeting France removes 31% of matchedUnits; frequencyCaps remove another 18%.
  • Recommendation: safe to book at priority 8 if creativeSizes stay 300x250 + 728x90.

Dimensions and metrics

Dimensions
NameSourceDescription
AD_UNIT_IDGAMTarget inventory
COUNTRY_IDGAMGeo targeting
CREATIVE_TARGET_AD_UNIT_SIZEGAMCreative size constraint
Metrics
NameSourceDescription
availableUnitsDerivedReservable units from forecast
matchedUnitsDerivedUnits matching targeting
possibleUnitsDerivedMaximum theoretical units
riskLevelDerivedDecision risk label

Limits

  • Forecasts are estimates and should be regenerated close to booking time.
  • Missing sizes or frequency caps can overstate delivery by a large margin.
  • Non-STANDARD or non-SPONSORSHIP inventory may not expose all contention details.
  • Forecast actions are read-only; booking still requires a separate confirmed mutation.
Use the forecast as a decision aid, not as a guarantee of future delivery.
Read the Academy guide

Use the editorial guide for the audience framing, then come back here for exact MCP actions, fields and payloads.

Read the Academy guide
Field references