Background
UpdateMediaBuyRequest currently exposes packages: list[PackageUpdate] and new_packages for budget changes — buyers can only update budgets package-by-package. There's no aggregate "rebudget the whole buy proportionally" verb.
Real-world use case
Buyers want to do "I want to extend this campaign by $5K, redistribute proportionally across active packages." Today this requires the buyer to read current package budgets via get_media_buys, compute per-package allocations, and send an enumerated packages: [...] list. That's:
- Stateful — needs a read before the write
- Race-prone — packages could change between read and write
- Verbose — buyer carries logic the server already has
salesagent (Prebid AdCP reference implementation) documents this scenario as UC-003 obligation #4 and currently exposes a budget field at the top level of UpdateMediaBuyRequest for it. That field is a salesagent extension and not spec-conformant.
Proposed addition
```json
{
"total_budget": {
"type": "object",
"description": "New aggregate budget for the whole media buy. Server distributes proportionally across active packages.",
"properties": {
"amount": {"type": "number", "minimum": 0},
"currency": {"type": "string", "pattern": "^[A-Z]{3}$"},
"redistribution_strategy": {
"type": "string",
"enum": ["proportional", "even", "preserve_relative"],
"default": "proportional"
}
},
"required": ["amount", "currency"]
}
}
```
Open questions
- Naming —
total_budget mirrors CreateMediaBuyRequest.total_budget, but budget_total or aggregate_budget could work.
- Mutual exclusion with
packages: [...] — should sending both be a validation error, or should packages overrides win for the named ones?
- Strategy enum —
preserve_relative (keep current ratios) is the expected default; happy to refine.
salesagent migration path: move local budget field to ext.salesagent.budget until this lands. Filed as part of cleanup PR bokelley/salesagent#208.
Background
UpdateMediaBuyRequestcurrently exposespackages: list[PackageUpdate]andnew_packagesfor budget changes — buyers can only update budgets package-by-package. There's no aggregate "rebudget the whole buy proportionally" verb.Real-world use case
Buyers want to do "I want to extend this campaign by $5K, redistribute proportionally across active packages." Today this requires the buyer to read current package budgets via
get_media_buys, compute per-package allocations, and send an enumeratedpackages: [...]list. That's:salesagent (Prebid AdCP reference implementation) documents this scenario as
UC-003 obligation #4and currently exposes abudgetfield at the top level ofUpdateMediaBuyRequestfor it. That field is a salesagent extension and not spec-conformant.Proposed addition
```json
{
"total_budget": {
"type": "object",
"description": "New aggregate budget for the whole media buy. Server distributes proportionally across active packages.",
"properties": {
"amount": {"type": "number", "minimum": 0},
"currency": {"type": "string", "pattern": "^[A-Z]{3}$"},
"redistribution_strategy": {
"type": "string",
"enum": ["proportional", "even", "preserve_relative"],
"default": "proportional"
}
},
"required": ["amount", "currency"]
}
}
```
Open questions
total_budgetmirrorsCreateMediaBuyRequest.total_budget, butbudget_totaloraggregate_budgetcould work.packages: [...]— should sending both be a validation error, or shouldpackagesoverrides win for the named ones?preserve_relative(keep current ratios) is the expected default; happy to refine.salesagent migration path: move local
budgetfield toext.salesagent.budgetuntil this lands. Filed as part of cleanup PR bokelley/salesagent#208.