Skip to content

Demand Budget programs: update

The Demand Budget Verbs update as MCP do programs, with inputs, result, refusals and an example.

Reference for Demand Budget, one group of Demand Budget programs.

DemandBudget.update

Changes the given properties of a Demand Budget. Verb page.

Text
do: return await $.DemandBudget.update(input)

Emits DemandBudget.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Demand Budget.
amountmoneyThe monthly spend it funds; zero is the default.
tierstringOne of $0, $100, $1k, $10k or $100k: the highest tier at or below the amount, whose Play mix it buys.
targetstringThe Metric value the spend must reach, such as cost per first Order under $40.
stopRulestringThe reading that closes the budget, such as acquisition cost above margin for two weeks.
untildateThe last day the budget runs before its Decision is read.

Returns

OutputTypeRequiredDescription
demandBudgetDemand BudgetrequiredThe Demand Budget.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

JSON
{
  "name": "do",
  "arguments": {
    "code": "return await $.DemandBudget.update({ id: 'demand_zQZUG08LwY', amount: { amount: 29, currency: 'USD' } })"
  }
}