Ad Rules are standalone objects created and stored in the Ad Rules Library and minimally contain a name
, an evaluation_spec
and an execution_spec
. This is the basic structure of a rule:
curl \ -F 'name=Rule 1' \ -F 'evaluation_spec={ ... }' \ -F 'execution_spec={ ... }' \ -F "access_token=<ACCESS_TOKEN>" \ https://graph.facebook.com/<VERSION>/<AD_ACCOUNT_ID>/adrules_library
Facebook evaluates Trigger-based rules when Insights metrics or Object metadata field changes. We evaluate Schedule-based rules on scheduled time intervals.
evaluation_spec
criteria.The main purpose of the evaluation_spec
of a rule is to determine the objects upon which the rule should execute its action. Learn more.
The execution_spec
of a rule determines the action that applies to all objects that pass evaluation. Learn more.
The status
of a rule determines whether the rule should be running. There are two statuses: ENABLED
and DISABLED
. To temporarily turn off a rule, edit the rule and set its status to DISABLED
. To reactivate a rule, edit the rule and set its status back to ENABLED
. To permanently remove a rule, delete it.