Features
Prevents budget waste on underutilized campaigns while scaling spend for constrained high-performers.
✓ Campaigns hitting daily budget caps that need automated scaling when performance justifies increased spend
✓ Overbudgeted campaigns wasting potential by having daily budgets far above actual spend patterns
✓ Data-starved campaigns with budgets too low to generate the minimum clicks needed for optimization decisions
✓ Accounts wanting hands-off budget management that adapts to both growth opportunities and efficiency improvements
Daily or Multiple Times Daily | Automation: Change Daily Budget: Set ($) using $new_budget
Run multiple times daily during high-traffic periods to catch budget constraints quickly, or daily for standard monitoring.
The blueprint operates two independent decision paths that never conflict. The increase path examines the last four individual days to detect budget-capping behavior, then verifies performance is acceptable before scaling up by a fixed percentage. The rightsizing path analyzes sustained 14-day average utilization to identify campaigns consistently spending well below budget, then calculates a new budget based on actual usage patterns plus a buffer. A third "data starvation" path increases budgets that fall below CPC-based minimums regardless of utilization, ensuring all campaigns can generate enough clicks for reliable optimization.
Individual Daily Budget Cap Detection
Most budget management tools look at average utilization, which can hide intermittent constraints. This blueprint checks each of the last four days individually - if ANY single day hit 90%+ utilization and ACOS is acceptable, it triggers an increase. This catches scenarios like weekend budget caps that disappear into weekday averages, or campaigns that only hit caps on high-traffic days. One capped day in the last four is treated as evidence of constraint.
CPC-Based Data Minimum System
The blueprint calculates a dynamic minimum budget using your average CPC × minimum daily clicks (default 5). A campaign averaging $0.50 CPC needs at least $2.50 daily budget to support data collection. This minimum applies to both rightsizing decreases and data-starvation increases, creating a floor that ensures campaigns remain optimizable. Campaigns below this floor trigger immediate increases regardless of utilization or performance.
Sustained Utilization for Rightsizing
Unlike the increase path which reacts to single-day caps, rightsizing requires sustained 14-day average utilization below 50%. This asymmetry is intentional - increases should be reactive (quick response to constraints) while decreases should be conservative (only act on persistent underutilization). A campaign spending $8/day against a $20 budget for two full weeks triggers rightsizing, but two low-spend days mixed with normal days won't.
Performance-Gated Increases with Data Tolerance
Budget increases require ACOS ≤ 130% of target across three cascading periods (7d → 14d → 30d). However, if no period has sufficient orders for reliable ACOS ($orders_min = 4), the blueprint allows the increase anyway. This "innocent until proven guilty" approach recognizes that budget constraints themselves may be preventing the order volume needed for ACOS evaluation. If you're capped and can't evaluate performance, the blueprint gives you room to generate data.
Dual Minimum Logic
The blueprint uses different minimum floors for increases vs decreases:
This ensures rightsizing never creates data starvation, while still allowing performance-based increases to start from the platform floor.
Utilization Threshold Interaction
The 90% high and 50% low thresholds create three zones:
Narrowing this acceptable range (e.g., 70-85%) increases budget turnover - more frequent increases and decreases as campaigns move in/out of the target zone. Widening it (e.g., 40-95%) creates more stability but may leave efficiency on the table. Consider your management bandwidth and campaign predictability when tuning.
Orders Minimum for ACOS Evaluation
The $orders_min = 4 setting determines when ACOS is considered reliable for gating increases. This is intentionally higher than typical ACOS evaluation minimums (usually 2) because you're making spending decisions, not just bid adjustments. Lower values (2-3) make the ACOS gate easier to pass, enabling more budget increases. Higher values (5-6) require more proof of efficiency before scaling spend. If you're seeing too many increases on questionable performers, increase this threshold.
Spend Buffer for Rightsizing
When rightsizing, the new budget is set to average daily spend × $spend_buffer (default 130%). This 30% cushion prevents setting budgets so tight that campaigns immediately hit caps again due to natural daily variance. Reducing to 110-120% creates tighter budgets that maximize efficiency but risk constraint on above-average days. Increasing to 150%+ provides more breathing room but may leave excess budget unused. The 130% default is designed for typical daily spend variance of ±20%.
Budget Increase Percentage Scaling
The fixed 20% increase ($budget_increase_pct) is conservative by design - it takes 4-5 iterations to double a budget. Increase to 30-50% if you want faster scaling on proven performers (useful during launch periods or seasonal ramps). Decrease to 10-15% if you want more gradual, cautious scaling. Avoid increases above 50% as this can create budget shock if ACOS subsequently degrades.
Cooldown Period Strategy
The 14-day cooldown between rightsizing actions prevents thrashing on campaigns with variable spend. Campaigns that occasionally spike above the low utilization threshold won't immediately trigger re-increases after being rightsized. If your campaigns have predictable, stable spend patterns, you can safely shorten to 7 days. If you see rightsizing → increase → rightsizing cycles, extend to 21-30 days or raise the low utilization threshold.
$reason Utilization Ranges:
The diagnostic includes actual average utilization ranges in brackets:
These ranges help you understand not just that action is/isn't being taken, but how far from thresholds each campaign sits.
Reason Categories:
$result Action Types:
Rapid Budget-Capping Increases
Campaigns consistently showing "Budget Increase: High Utilization" across consecutive days are successfully scaling but may be hitting caps again immediately after each increase. This is normal during high-performance periods - the 20% increases are intentionally conservative. If you want faster scaling on these proven winners, increase $budget_increase_pct to 30-40%. Alternatively, manually set budgets higher on your top performers and let automation manage the rest.
Data-Starved Campaign Recovery
Campaigns showing "Budget Increase: CPC Minimum" had budgets below what's needed for basic data collection. After increase, watch for them to transition to utilization-based decisions within 1-2 weeks. If campaigns remain stuck on CPC minimums long-term (still showing 0-10% utilization after increases), they may have fundamental performance issues preventing any meaningful spend. Consider pausing these rather than continuing to maintain minimum budgets.
Rightsizing Followed by Stability
Campaigns showing "Budget Decrease: Rightsizing" should then show "Within acceptable utilization" after the decrease. If you see a campaign rightsize, then immediately trigger "Budget Increase: High Utilization" within a few days, your thresholds are too close together (50% low and 90% high might be creating boundary cases). Either raise the low threshold to 60% or lower the high threshold to 85% to create more separation.
Cooldown Blocking Obvious Rightsizing
Campaigns showing "[0-30%] Below low utilization threshold, cooldown active" for extended periods suggest the 14-day cooldown is too long for your account's spend patterns. These campaigns are clearly underutilizing budget but waiting on cooldown. If this is common, reduce $cooldown_period to 7 days, or if you're confident in the stability of these campaigns, manually reduce their budgets and let automation take over after cooldown.
ACOS Blocking Scale Opportunities
Campaigns showing "[90%+] Above high utilization threshold, ACOS too high" are budget-capped but performing poorly. This is the blueprint correctly preventing bad spend scaling. However, if you see this frequently and believe the campaigns deserve scale opportunities, either: (1) loosen $t_acos_threshold_increase to 150-200% to allow scaling on less efficient campaigns, or (2) use bid management automation to improve ACOS first, then let budget scaling follow.
Minimum Floor Preventing Rightsizing
Campaigns showing "Budget below rightsizing minimum" at 0-30% utilization are already at the calculated minimum (either $budget_min = $5.00 or CPC-based minimum). If you have many campaigns stuck here, consider whether you actually need them active. Campaigns that can't productively spend even $5/day may be better candidates for pausing rather than maintaining minimum budgets indefinitely. Alternatively, if you want more aggressive rightsizing, lower $budget_min to $3.00 or disable CPC minimums (though this risks data starvation).
/*
=== Core: Adaptive Budget Management ===
Purpose: Prevents budget waste while ensuring adequate spend for data collection and performance scaling.
Recommended: Change Daily Budget | Set ($) using $new_budget | Daily or Multiple Times Daily
*/
// === Core Settings ===
let $high_utilization = 90%; // CORE: Daily spend % that indicates budget constraint
let $low_utilization = 50%; // CORE: Daily budget utilization % that triggers rightsizing
let $enable_cpc_minimums = 1; // ADVANCED: Enable CPC-based budget minimums (1=yes, 0=no)
// === Budget Increases (High Utilization) ===
let $t_acos_threshold_increase = 130%; // STRATEGY: Increase budget when ACOS ≤ (Target ACOS × 130%) [e.g., 30% target = 39% threshold]
let $budget_increase_pct = 20%; // STRATEGY: Percentage increase when scaling up
let $orders_min = 4; // STRATEGY: Minimum orders needed for reliable ACOS evaluation
let $acos_eval_short = 7d; // TIME: Recent performance period
let $acos_eval_medium = 14d; // TIME: Medium-term performance period
let $acos_eval_long = 30d; // TIME: Long-term performance period
// === Budget Rightsizing (Low Utilization) ===
let $spend_buffer = 130%; // STRATEGY: Buffer above avg daily spend when rightsizing (budget set to 130% avg daily spend)
let $budget_min = 5.00; // STRATEGY: Absolute minimum budget floor for rightsizing
let $cooldown_eval_period = 14d; // TIME: Period for sustained utilization evaluation
let $cooldown_period = 14d; // TIME: Wait period between rightsizing actions
// === CPC-Based Budget Minimums ===
let $min_daily_clicks = 5; // ADVANCED: Minimum clicks per day budget should support
let $cpc_eval_period = 60d; // ADVANCED: Period for calculating average CPC for minimum budget
// === Segment Filters ===
let $include_campaigns = [""]; // FILTER: Apply to all campaigns, or specify terms like ["SP-", "Auto"]
let $exclude_campaigns = ["NEVER_MATCH"]; // FILTER: Exclude campaigns containing these terms, e.g., ["Brand", "Test", "Archive"]
// ============================================================================
// === Blueprint Logic ===
// ============================================================================
// Advanced logic below - modify carefully
// Increase Path: Individual daily budget cap analysis
let $today_spend = spend(0d..0d);
let $yesterday_spend = spend(1d..1d);
let $day2_spend = spend(2d..2d);
let $day3_spend = spend(3d..3d);
let $today_capped = case($today_spend >= budget * $high_utilization => 1, else 0);
let $yesterday_capped = case($yesterday_spend >= budget * $high_utilization => 1, else 0);
let $day2_capped = case($day2_spend >= budget * $high_utilization => 1, else 0);
let $day3_capped = case($day3_spend >= budget * $high_utilization => 1, else 0);
let $any_day_budget_capped = case(
$today_capped = 1 or $yesterday_capped = 1 or $day2_capped = 1 or $day3_capped = 1 => 1,
else 0
);
// Increase Path: CPC-based data sufficiency check
let $avg_cpc = cpc($cpc_eval_period);
let $min_budget_for_data = case(
$enable_cpc_minimums = 1 and $avg_cpc > 0 => $avg_cpc * $min_daily_clicks,
else 0 // Data minimums disabled or no CPC data
);
let $budget_too_small = case(
$enable_cpc_minimums = 1 and $avg_cpc > 0 and budget < $min_budget_for_data => 1,
else 0
);
// Increase Path: Performance evaluation for increases (prioritize recent data)
let $orders_short = orders($acos_eval_short);
let $orders_medium = orders($acos_eval_medium);
let $orders_long = orders($acos_eval_long);
let $performance_acos = case(
$orders_short >= $orders_min => acos($acos_eval_short),
$orders_medium >= $orders_min => acos($acos_eval_medium),
$orders_long >= $orders_min => acos($acos_eval_long),
else 99999 // No reliable ACOS data
);
let $acos_good_for_increase = case(
$performance_acos = 99999 => 1, // No ACOS data = allow increase
target acos <= 0 => 0, // Invalid target
$performance_acos <= (target acos * $t_acos_threshold_increase) => 1,
else 0
);
// Rightsizing Path: Sustained utilization analysis
let $total_spend = spend($cooldown_eval_period);
let $days_in_eval = 14; // Days in 14d period
let $avg_daily_spend = $total_spend / $days_in_eval;
let $avg_utilization_rate = case(
budget > 0 => $avg_daily_spend / budget,
else 0
);
// Calculate effective minimum for decreases early
let $effective_min_for_decreases = case(
$min_budget_for_data > $budget_min => $min_budget_for_data, // Use CPC minimum if higher
else $budget_min // Otherwise use absolute minimum
);
let $rightsizing_cooldown_passed = case(
is_null(last budget change) => 1,
last budget change < now() - interval($cooldown_period) => 1,
else 0
);
// Decision logic by path
let $should_increase = case(
$budget_too_small = 1 => 1, // Data-starved campaign
$any_day_budget_capped = 1 and $acos_good_for_increase = 1 => 1, // Budget-capped + good performance
else 0
);
let $should_rightsize = case(
$rightsizing_cooldown_passed = 0 => 0, // Cooldown period active
budget <= $effective_min_for_decreases => 0, // Already at or below minimum - don't rightsize
$avg_utilization_rate < $low_utilization => 1, // Sustained low utilization (including 0% from no spend)
else 0
);
// Calculate new budget
let $increase_budget = budget * (1 + $budget_increase_pct);
// For rightsizing, calculate based on actual usage plus buffer
let $rightsized_budget = case(
$avg_daily_spend > 0 => $avg_daily_spend * $spend_buffer,
else $budget_min // No spend = use minimum budget
);
let $calculated_budget = case(
$should_increase = 1 => $increase_budget,
$should_rightsize = 1 => $rightsized_budget,
else budget
);
// Apply minimums - different rules for increases vs decreases
let $final_minimum = case(
$should_rightsize = 1 => case(
$effective_min_for_decreases > 1.00 => $effective_min_for_decreases, // Use effective minimum if higher than platform
else 1.00 // Otherwise platform minimum
),
$should_increase = 1 and $budget_too_small = 1 => case(
$min_budget_for_data > 1.00 => $min_budget_for_data, // Use CPC minimum for data generation increases
else 1.00 // Platform minimum
),
else 1.00 // Platform minimum for budget-capping increases
);
let $new_budget = case(
$calculated_budget < $final_minimum => $final_minimum,
else $calculated_budget
);
// Diagnostic properties
let $reason = case(
target acos <= 0 => "No target ACOS set",
$should_increase = 1 and $budget_too_small = 1 => case(
$avg_utilization_rate <= 0.10 => "[0-10%] Below CPC minimum threshold",
$avg_utilization_rate <= 0.30 => "[10-30%] Below CPC minimum threshold",
$avg_utilization_rate <= 0.50 => "[30-50%] Below CPC minimum threshold",
$avg_utilization_rate <= 0.70 => "[50-70%] Below CPC minimum threshold",
$avg_utilization_rate <= 0.90 => "[70-90%] Below CPC minimum threshold",
else "[90%+] Below CPC minimum threshold"
),
$should_increase = 1 => case(
$avg_utilization_rate <= 0.70 => "[50-70%] Above high utilization threshold, ACOS acceptable",
$avg_utilization_rate <= 0.90 => "[70-90%] Above high utilization threshold, ACOS acceptable",
else "[90%+] Above high utilization threshold, ACOS acceptable"
),
$rightsizing_cooldown_passed = 0 => case(
$avg_utilization_rate = 0 => "[0%] Below low utilization threshold, cooldown active",
$avg_utilization_rate <= 0.10 => "[0-10%] Below low utilization threshold, cooldown active",
$avg_utilization_rate <= 0.30 => "[10-30%] Below low utilization threshold, cooldown active",
$avg_utilization_rate <= 0.50 => "[30-50%] Below low utilization threshold, cooldown active",
else "[50%+] Below low utilization threshold, cooldown active"
),
$should_rightsize = 1 => case(
$avg_utilization_rate = 0 => "[0%] Below low utilization threshold",
$avg_utilization_rate <= 0.10 => "[0-10%] Below low utilization threshold",
$avg_utilization_rate <= 0.30 => "[10-30%] Below low utilization threshold",
$avg_utilization_rate <= 0.50 => "[30-50%] Below low utilization threshold",
else "[50-70%] Below low utilization threshold"
),
$any_day_budget_capped = 1 and $acos_good_for_increase = 0 => case(
$avg_utilization_rate <= 0.70 => "[50-70%] Above high utilization threshold, ACOS too high",
$avg_utilization_rate <= 0.90 => "[70-90%] Above high utilization threshold, ACOS too high",
else "[90%+] Above high utilization threshold, ACOS too high"
),
budget <= $effective_min_for_decreases => case(
$avg_utilization_rate = 0 => "[0%] Budget below rightsizing minimum",
$avg_utilization_rate <= 0.30 => "[0-30%] Budget below rightsizing minimum",
else "[30-50%] Budget below rightsizing minimum"
),
else case(
$avg_utilization_rate = 0 => "[0%] Within acceptable utilization",
$avg_utilization_rate <= 0.10 => "[0-10%] Within acceptable utilization",
$avg_utilization_rate <= 0.30 => "[10-30%] Within acceptable utilization",
$avg_utilization_rate <= 0.50 => "[30-50%] Within acceptable utilization",
$avg_utilization_rate <= 0.70 => "[50-70%] Within acceptable utilization",
$avg_utilization_rate <= 0.90 => "[70-90%] Within acceptable utilization",
else "[90%+] Within acceptable utilization"
)
);
let $result = case(
$should_increase = 1 and $budget_too_small = 1 => "Budget Increase: CPC Minimum",
$should_increase = 1 => "Budget Increase: High Utilization",
$should_rightsize = 1 => "Budget Decrease: Rightsizing",
else "No Action"
);
// === Final Filter ===
state = "effectively enabled"
and (campaign name contains any $include_campaigns)
and (campaign name does not contain any $exclude_campaigns)
and ($should_increase = 1 or $should_rightsize = 1)
and $new_budget != budget
/*
=== Core: Adaptive Budget Management ===
Purpose: Prevents budget waste while ensuring adequate spend for data collection and performance scaling.
Recommended: Change Daily Budget | Set ($) using $new_budget | Daily or Multiple Times Daily
*/
// === Core Settings ===
let $high_utilization = 90%; // CORE: Daily spend % that indicates budget constraint
let $low_utilization = 50%; // CORE: Daily budget utilization % that triggers rightsizing
let $enable_cpc_minimums = 1; // ADVANCED: Enable CPC-based budget minimums (1=yes, 0=no)
// === Budget Increases (High Utilization) ===
let $t_acos_threshold_increase = 130%; // STRATEGY: Increase budget when ACOS ≤ (Target ACOS × 130%) [e.g., 30% target = 39% threshold]
let $budget_increase_pct = 20%; // STRATEGY: Percentage increase when scaling up
let $orders_min = 4; // STRATEGY: Minimum orders needed for reliable ACOS evaluation
let $acos_eval_short = 7d; // TIME: Recent performance period
let $acos_eval_medium = 14d; // TIME: Medium-term performance period
let $acos_eval_long = 30d; // TIME: Long-term performance period
// === Budget Rightsizing (Low Utilization) ===
let $spend_buffer = 130%; // STRATEGY: Buffer above avg daily spend when rightsizing (budget set to 130% avg daily spend)
let $budget_min = 5.00; // STRATEGY: Absolute minimum budget floor for rightsizing
let $cooldown_eval_period = 14d; // TIME: Period for sustained utilization evaluation
let $cooldown_period = 14d; // TIME: Wait period between rightsizing actions
// === CPC-Based Budget Minimums ===
let $min_daily_clicks = 5; // ADVANCED: Minimum clicks per day budget should support
let $cpc_eval_period = 60d; // ADVANCED: Period for calculating average CPC for minimum budget
// === Segment Filters ===
let $include_campaigns = [""]; // FILTER: Apply to all campaigns, or specify terms like ["SP-", "Auto"]
let $exclude_campaigns = ["NEVER_MATCH"]; // FILTER: Exclude campaigns containing these terms, e.g., ["Brand", "Test", "Archive"]
// ============================================================================
// === Blueprint Logic ===
// ============================================================================
// Advanced logic below - modify carefully
// Increase Path: Individual daily budget cap analysis
let $today_spend = spend(0d..0d);
let $yesterday_spend = spend(1d..1d);
let $day2_spend = spend(2d..2d);
let $day3_spend = spend(3d..3d);
let $today_capped = case($today_spend >= budget * $high_utilization => 1, else 0);
let $yesterday_capped = case($yesterday_spend >= budget * $high_utilization => 1, else 0);
let $day2_capped = case($day2_spend >= budget * $high_utilization => 1, else 0);
let $day3_capped = case($day3_spend >= budget * $high_utilization => 1, else 0);
let $any_day_budget_capped = case(
$today_capped = 1 or $yesterday_capped = 1 or $day2_capped = 1 or $day3_capped = 1 => 1,
else 0
);
// Increase Path: CPC-based data sufficiency check
let $avg_cpc = cpc($cpc_eval_period);
let $min_budget_for_data = case(
$enable_cpc_minimums = 1 and $avg_cpc > 0 => $avg_cpc * $min_daily_clicks,
else 0 // Data minimums disabled or no CPC data
);
let $budget_too_small = case(
$enable_cpc_minimums = 1 and $avg_cpc > 0 and budget < $min_budget_for_data => 1,
else 0
);
// Increase Path: Performance evaluation for increases (prioritize recent data)
let $orders_short = orders($acos_eval_short);
let $orders_medium = orders($acos_eval_medium);
let $orders_long = orders($acos_eval_long);
let $performance_acos = case(
$orders_short >= $orders_min => acos($acos_eval_short),
$orders_medium >= $orders_min => acos($acos_eval_medium),
$orders_long >= $orders_min => acos($acos_eval_long),
else 99999 // No reliable ACOS data
);
let $acos_good_for_increase = case(
$performance_acos = 99999 => 1, // No ACOS data = allow increase
target acos <= 0 => 0, // Invalid target
$performance_acos <= (target acos * $t_acos_threshold_increase) => 1,
else 0
);
// Rightsizing Path: Sustained utilization analysis
let $total_spend = spend($cooldown_eval_period);
let $days_in_eval = 14; // Days in 14d period
let $avg_daily_spend = $total_spend / $days_in_eval;
let $avg_utilization_rate = case(
budget > 0 => $avg_daily_spend / budget,
else 0
);
// Calculate effective minimum for decreases early
let $effective_min_for_decreases = case(
$min_budget_for_data > $budget_min => $min_budget_for_data, // Use CPC minimum if higher
else $budget_min // Otherwise use absolute minimum
);
let $rightsizing_cooldown_passed = case(
is_null(last budget change) => 1,
last budget change < now() - interval($cooldown_period) => 1,
else 0
);
// Decision logic by path
let $should_increase = case(
$budget_too_small = 1 => 1, // Data-starved campaign
$any_day_budget_capped = 1 and $acos_good_for_increase = 1 => 1, // Budget-capped + good performance
else 0
);
let $should_rightsize = case(
$rightsizing_cooldown_passed = 0 => 0, // Cooldown period active
budget <= $effective_min_for_decreases => 0, // Already at or below minimum - don't rightsize
$avg_utilization_rate < $low_utilization => 1, // Sustained low utilization (including 0% from no spend)
else 0
);
// Calculate new budget
let $increase_budget = budget * (1 + $budget_increase_pct);
// For rightsizing, calculate based on actual usage plus buffer
let $rightsized_budget = case(
$avg_daily_spend > 0 => $avg_daily_spend * $spend_buffer,
else $budget_min // No spend = use minimum budget
);
let $calculated_budget = case(
$should_increase = 1 => $increase_budget,
$should_rightsize = 1 => $rightsized_budget,
else budget
);
// Apply minimums - different rules for increases vs decreases
let $final_minimum = case(
$should_rightsize = 1 => case(
$effective_min_for_decreases > 1.00 => $effective_min_for_decreases, // Use effective minimum if higher than platform
else 1.00 // Otherwise platform minimum
),
$should_increase = 1 and $budget_too_small = 1 => case(
$min_budget_for_data > 1.00 => $min_budget_for_data, // Use CPC minimum for data generation increases
else 1.00 // Platform minimum
),
else 1.00 // Platform minimum for budget-capping increases
);
let $new_budget = case(
$calculated_budget < $final_minimum => $final_minimum,
else $calculated_budget
);
// Diagnostic properties
let $reason = case(
target acos <= 0 => "No target ACOS set",
$should_increase = 1 and $budget_too_small = 1 => case(
$avg_utilization_rate <= 0.10 => "[0-10%] Below CPC minimum threshold",
$avg_utilization_rate <= 0.30 => "[10-30%] Below CPC minimum threshold",
$avg_utilization_rate <= 0.50 => "[30-50%] Below CPC minimum threshold",
$avg_utilization_rate <= 0.70 => "[50-70%] Below CPC minimum threshold",
$avg_utilization_rate <= 0.90 => "[70-90%] Below CPC minimum threshold",
else "[90%+] Below CPC minimum threshold"
),
$should_increase = 1 => case(
$avg_utilization_rate <= 0.70 => "[50-70%] Above high utilization threshold, ACOS acceptable",
$avg_utilization_rate <= 0.90 => "[70-90%] Above high utilization threshold, ACOS acceptable",
else "[90%+] Above high utilization threshold, ACOS acceptable"
),
$rightsizing_cooldown_passed = 0 => case(
$avg_utilization_rate = 0 => "[0%] Below low utilization threshold, cooldown active",
$avg_utilization_rate <= 0.10 => "[0-10%] Below low utilization threshold, cooldown active",
$avg_utilization_rate <= 0.30 => "[10-30%] Below low utilization threshold, cooldown active",
$avg_utilization_rate <= 0.50 => "[30-50%] Below low utilization threshold, cooldown active",
else "[50%+] Below low utilization threshold, cooldown active"
),
$should_rightsize = 1 => case(
$avg_utilization_rate = 0 => "[0%] Below low utilization threshold",
$avg_utilization_rate <= 0.10 => "[0-10%] Below low utilization threshold",
$avg_utilization_rate <= 0.30 => "[10-30%] Below low utilization threshold",
$avg_utilization_rate <= 0.50 => "[30-50%] Below low utilization threshold",
else "[50-70%] Below low utilization threshold"
),
$any_day_budget_capped = 1 and $acos_good_for_increase = 0 => case(
$avg_utilization_rate <= 0.70 => "[50-70%] Above high utilization threshold, ACOS too high",
$avg_utilization_rate <= 0.90 => "[70-90%] Above high utilization threshold, ACOS too high",
else "[90%+] Above high utilization threshold, ACOS too high"
),
budget <= $effective_min_for_decreases => case(
$avg_utilization_rate = 0 => "[0%] Budget below rightsizing minimum",
$avg_utilization_rate <= 0.30 => "[0-30%] Budget below rightsizing minimum",
else "[30-50%] Budget below rightsizing minimum"
),
else case(
$avg_utilization_rate = 0 => "[0%] Within acceptable utilization",
$avg_utilization_rate <= 0.10 => "[0-10%] Within acceptable utilization",
$avg_utilization_rate <= 0.30 => "[10-30%] Within acceptable utilization",
$avg_utilization_rate <= 0.50 => "[30-50%] Within acceptable utilization",
$avg_utilization_rate <= 0.70 => "[50-70%] Within acceptable utilization",
$avg_utilization_rate <= 0.90 => "[70-90%] Within acceptable utilization",
else "[90%+] Within acceptable utilization"
)
);
let $result = case(
$should_increase = 1 and $budget_too_small = 1 => "Budget Increase: CPC Minimum",
$should_increase = 1 => "Budget Increase: High Utilization",
$should_rightsize = 1 => "Budget Decrease: Rightsizing",
else "No Action"
);
// === Final Filter ===
state = "effectively enabled"
and (campaign name contains any $include_campaigns)
and (campaign name does not contain any $exclude_campaigns)
and ($should_increase = 1 or $should_rightsize = 1)
and $new_budget != budget
© Merch Jar LLC