Skip to main content

Budget optimization by budget group

The same optimization as Budget optimization, grouped by budget group instead of campaign. Swap the PARTNER_CAMPAIGN_* dimensions for BUDGET_GROUP.

Use this to answer "how should the Q3 Branded budget be spent in the upcoming period?". optimalAdSpend is the recommended allocation for that budget, with prevAdSpend as the baseline it is measured against. Because budget group is the same field you set on the campaign (see Budget groups), recommendations come back grouped by budget without a second lookup.

FieldDescription
partner.idPartner platform identifier assigned by Incremental
partner.namePartner platform name
budgetGroupCustomer-assigned budget group. null for campaigns with none
budgetStartDateStart date of the budget optimization period
budgetEndDateEnd date of the budget optimization period
prevAdSpendPrevious/baseline advertising spend (what was actually spent). Daily figure for the period, in cents
optimalAdSpendRecommended optimal ad spend amount. Daily figure for the period, in cents
prevKpiPrevious incremental sales achieved at baseline spend. Daily figure for the period
predictedKpiPredicted incremental sales if optimal budget is used. Daily figure for the period
prevIRoiPrevious incremental ROI at baseline spend
optimalIRoiExpected incremental ROI at optimal spend
query FetchBudgetOptimizationByBudgetGroupAnalytics($companyId: ID!) {
getCompany(id: $companyId) {
id
budgetOptimizationAnalytics(
input: { kpi: SALES }
dimensions: [
COMPANY_ID
PARTNER_ID
PARTNER_NAME
BUDGET_GROUP
BUDGET_START_DATE
BUDGET_END_DATE
]
measures: [
PREV_AD_SPEND
OPTIMAL_AD_SPEND
PREV_KPI
PREDICTED_KPI
PREV_I_ROI
OPTIMAL_I_ROI
]
) {
items {
partner {
id
name
}
budgetGroup
budgetStartDate
budgetEndDate
prevAdSpend
optimalAdSpend
prevKpi
predictedKpi
prevIRoi
optimalIRoi
}
pageInfo {
size
page
totalCount
hasNextPage
}
}
}
}
Variables
{
"companyId": "<COMPANY_ID>"
}

Response
{
"data": {
"getCompany": {
"id": "<COMPANY_ID>",
"budgetOptimizationAnalytics": {
"items": [
{
"partner": {
"id": "4de0db3a-3f0f-48d9-88ca-23d0313f0c1c",
"name": "Amazon Advertising"
},
"budgetGroup": "Q3 Branded",
"budgetStartDate": "2024-10-04T00:00:00.000Z",
"budgetEndDate": "2024-11-01T00:00:00.000Z",
"prevAdSpend": "1234.310344827586",
"optimalAdSpend": "1234.00000000001",
"prevKpi": "4500.751905977355",
"predictedKpi": "5600.600000032",
"prevIRoi": "6.247736885620005",
"optimalIRoi": "6.576589146710412"
}
],
"pageInfo": {
"size": 10,
"page": 0,
"totalCount": 100,
"hasNextPage": true
}
}
}
}
}