Portfolio Optimization
An optimization is a proposal of budget changes for the contents of a portfolio, generated by Nexoya's optimization engine. It compares a baseline (current budget allocation) against a predicted outcome (proposed reallocation) for each funnel step. Learn more about how portfolio optimization works, optimization types, and understanding optimization uplift.
Prerequisites
Optimization must be enabled and an active optimization period must exist for the portfolio. If there is no active optimization, the field returns null.
Get the active optimization
graphql
query PortfolioOptimization($teamId: Int!, $portfolioId: Int!) {
portfolioV2(teamId: $teamId, portfolioId: $portfolioId) {
activeOptimization {
optimizationId
start
end
totalBudget
performance {
total {
budget {
spent
proposed
changePercent
}
funnelSteps {
metric {
baseline
predicted
changePercent
}
costPer {
baseline
predicted
changePercent
}
}
}
}
}
}
}Variables
json
{
"teamId": 123,
"portfolioId": 456
}Understanding the response
The funnelSteps array in performance.total corresponds index-for-index to the portfolio's funnel steps (retrieved via the portfolio funnel steps query).
| Field | Description |
|---|---|
totalBudget | The total budget amount allocated for the optimization period (scalar) |
budget.spent | Budget already spent in the current optimization period |
budget.proposed | Total budget proposed by the optimization |
budget.changePercent | Percentage change between proposed and spent budgets |
metric.baseline | Expected metric value with the current budget allocation |
metric.predicted | Expected metric value after applying the proposed reallocation |
metric.changePercent | Percentage improvement in metric: ((predicted - baseline) / baseline) * 100 |
costPer.baseline | Cost-per-conversion with the current allocation |
costPer.predicted | Cost-per-conversion with the proposed allocation |
costPer.changePercent | Percentage change in cost-per: negative means lower cost (improvement) |
