DAILY or CUSTOM schedule, as the action should not be frequently occurring.rebalance_spec to determine the lists of objects affected by rebalancing.EVEN) the recipients are the objects that did not pass evaluation.EVEN type rule criteria is cost_per_mobile_app_install > 2.50, this means that all ad sets that have a cost per mobile app install greater than 2.50 will be paused, and their budgets moved to all ad sets that have a cost per mobile app install less than or equal to 2.50.rebalance_spec determines exactly how the recipients get their budget. There are five parameters:| Field | Description |
|---|---|
type | Required. Determines how the budgets are allocated. If the value is not EVEN, a target_field is required as well to perform the ranking.
Supported Values:Â EVEN, PROPORTIONAL, NO_PAUSE_PROPORTIONAL, MATCHED_ONLY_PROPORTIONAL |
target_field | Optional. Specifies the Insights metric used to rank the recipients. This is required if type is not EVEN, or if target_count also exists in the spec.
Supported Values: An Insights field, such as cpa or impressions |
target_count | Optional. Specifies the number (K) of recipients. The combination of this, type, and target_field determines the top K recipients that receive the budget. This is useful when you do not wish to move the budget to every possible recipient. If K is larger than the number of recipients, the rule rebalances to all of them. If this is specified, target_field is required.
Supported Values: A positive integer, such as 5 |
is_cross_campaign | Optional. Specifies whether or not you allow budgets to be allocated across ad campaigns. If this is not specified or false, we only move budgets within ad campaigns. If this is true, we evaluate and execute all ad sets together, which can result in budgets shifting between ad campaigns.
Supported Values: A boolean value, such as true or false |
is_inverse | Optional. Specifies whether or not recipients should be ranked from high to low of the inverse of their target_field values. This is useful if you want to rank the lowest actual values highest.
Supported Values: A boolean value, such as true or false |
rebalance_spec typesEVEN and PROPORTIONAL types, we pause the matched objects (the donors of the budget to the recipients). When we pause these objects, we do not adjust their budgets in any way, because:NO_PAUSE_PROPORTIONAL type, we do not pause the matched objects. We determine how much budget to adjust by looking at all the objects (donors and recipients) together and ranking their performance. This guarantees that budget is only moved from donors to recipients. This setup avoids a situation where rebalancing results in a well-performing ad set donating instead to an underperforming ad set simply due to how much budget it has. Please see the example below for more information.MATCHED_ONLY_PROPORTIONAL type, we only look at the matched objects. Again, we do not pause them. We rank them among themselves and redistribute their budgets based on how they perform against each other. This means that we take the total budget from all the donors and proportionally share that with the same list of donors. Please see the example below for more information.PROPORTIONAL, we distribute more budgets to ad sets that are performing better based on the target_field defined. For example, if the metric is reach and I have two recipient ad sets that have 10 and 20 reach, we allocate 33.3% and 66.6% of the budget pool to these ad sets, respectively. If the type is EVEN, they would each get 50%.is_inverse flagis_inverse flag is useful for metrics such as cost_per_mobile_app_install, where a lower metric number means a higher performing ad set. This is reemphasized in the example below, and means that ad sets with a lower such value get a higher portion of the budget allocation.cost_per_mobile_app_install. We proportionally allocate the budget from all under-performing ad sets to the best 10 ad sets in the ad account. This rule runs at 8AM every day, while looking at lifetime data.curl \
-F 'name=Test Rebalance Rule' \
-F 'schedule_spec={
"schedule_type": "CUSTOM",
"schedule": [
{
"start_minute": 480
}
]
}' \
-F 'evaluation_spec={
"evaluation_type": "SCHEDULE",
"filters": [
{
"field": "entity_type",
"value": "ADSET",
"operator": "EQUAL"
},
{
"field": "time_preset",
"value": "LIFETIME",
"operator": "EQUAL"
},
{
"field": "mobile_app_install",
"value": 100,
"operator": "GREATER_THAN"
},
{
"field": "cost_per_mobile_app_install",
"value": 3.0,
"operator": "GREATER_THAN"
}
]
}' \
-F 'execution_spec={
"execution_type": "REBALANCE_BUDGET",
"execution_options": [
{
"field": "rebalance_spec",
"value": {
"type": "INVERSE_PROPORTIONAL",
"target_field": "cost_per_mobile_app_install",
"target_count": 10,
"is_cross_campaign": true
},
"operator": "EQUAL"
},
]
}' \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<VERSION>/<AD_ACCOUNT_ID>/adrules_library
curl \
-F 'name=Test Rebalance Rule' \
-F 'schedule_spec={
"schedule_type": "DAILY"
}' \
-F 'evaluation_spec={
"evaluation_type": "SCHEDULE",
"filters": [
{
"field": "entity_type",
"value": "ADSET",
"operator": "EQUAL"
},
{
"field": "time_preset",
"value": "LIFETIME",
"operator": "EQUAL"
},
{
"field": "impressions",
"value": 8000,
"operator": "GREATER_THAN"
},
{
"field": "audience_reached_percentage",
"value": 70,
"operator": "GREATER_THAN"
}
]
}' \
-F 'execution_spec={
"execution_type": "REBALANCE_BUDGET",
"execution_options": [
{
"field": "rebalance_spec",
"value": {
"type": "EVEN"
},
"operator": "EQUAL"
},
]
}' \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<VERSION>/<AD_ACCOUNT_ID>/adrules_library
NO_PAUSE_PROPORTIONAL type. In this case, the budget is reallocated from ad sets within ad campaigns from those with a low amount of video views. However, in this case ad sets are not paused, and are left with with a proportional amount of budget.1-5 with video_view of 1-5, 3000 daily budget each, and the below rule.6000 budget from ad sets 1 and 2, and determine proportionally how to distribute that. In this case, each ad set has ratios of 1/15 up to 5/15.400, 800, 4200, 4600, and 5000 respectively. This guarantees that the recipients (ad sets 1, 2, and 3) always increase their budget.curl \
-F 'name=Test Rebalance Rule' \
-F 'schedule_spec={
"schedule_type": "DAILY"
}' \
-F 'evaluation_spec={
"evaluation_type": "SCHEDULE",
"filters": [
{
"field": "entity_type",
"value": "ADSET",
"operator": "EQUAL"
},
{
"field": "time_preset",
"value": "LIFETIME",
"operator": "EQUAL"
},
{
"field": "video_view",
"value": 3,
"operator": "LESS_THAN"
},
]
}' \
-F 'execution_spec={
"execution_type": "REBALANCE_BUDGET",
"execution_options": [
{
"field": "rebalance_spec",
"value": {
"type": "NO_PAUSE_PROPORTIONAL",
"target_field": "video_view"
},
"operator": "EQUAL"
},
]
}' \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<VERSION>/<AD_ACCOUNT_ID>/adrules_library
MATCHED_ONLY_PROPORTIONAL. In this case, you don’t need to worry about unmatched objects. The focus is on ad sets that satisfy the rule’s filters. You can use the same example above, except now there is no need to determine the two lists based on how underperforming ad sets are.15000), and distributing it proportionally. As a result, ad sets 1-5 would end up with 1000-5000 budget.type is that there is no guarantee that better performing ad sets won’t end up losing budget, especially in cases of unbalanced budget values. All else being the same, if ad set 5 had started with 18000 budget, it would end up losing 8000 of its budget.curl \
-F 'name=Test Rebalance Rule' \
-F 'schedule_spec={
"schedule_type": "DAILY"
}' \
-F 'evaluation_spec={
"evaluation_type": "SCHEDULE",
"filters": [
{
"field": "entity_type",
"value": "ADSET",
"operator": "EQUAL"
},
{
"field": "time_preset",
"value": "LIFETIME",
"operator": "EQUAL"
},
]
}' \
-F 'execution_spec={
"execution_type": "REBALANCE_BUDGET",
"execution_options": [
{
"field": "rebalance_spec",
"value": {
"type": "MATCHED_ONLY_PROPORTIONAL",
"target_field": "video_view"
},
"operator": "EQUAL"
},
]
}' \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<VERSION>/<AD_ACCOUNT_ID>/adrules_library