curl \
-F 'name=90d High Value' \
-F 'rule={"inclusions":{"operator":"or","rules":[{"retention_seconds":7776000,"event_sources":[{"id":"<OFFLINE_EVENT_SET_ID>","type":"offline_events"}],"filter":{"operator":"and","filters":[{"operator":"=","field":"event","value":"Purchase"}]},"aggregation":{"type":"sum","field":"value","operator":">","value":"1000"}}]}}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/customaudiences"
subtype for custom audiences for websites, apps, engagement custom audiences, and audiences from offline conversion data. The one exception is that subtype is still supported for engagement custom audiences for video.curl \
-F 'name=My New Offline Event Set' \
-F 'rule={"inclusions":{"operator":"or","rules":[{"retention_seconds":2592000,"event_sources":[{"id":"<OFFLINE_EVENT_SET_ID>","type":"offline_events"}],"filter":{"operator":"and","filters":[{"operator":"=","field":"event","value":"purchase"},{"operator":">","field":"value","value":"50+Sheet1!A2+Sheet1!A2+Sheet1!A2+"}]}}]}}'
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<VERSION>/act_<AD_ACCOUNT_ID>/customaudiences
| Name | Description |
|---|---|
nametype: string | Required. The name for the cluster. |
ruletype: string | Required. Audience rules to be applied on the referrer URL. |
descriptiontype: string | Optional. Description of your custom audience. |
custom_data field. See Audience Rules for complete information. See also:event_source, set id to your Pixel ID and type to pixel.field, use "event" if the filter is to specify an event. Parameters that match events sent by pixel (for example, 'ViewContent', 'Purchase').//Match all referring `favorite_food` containing the string `'pizza'` in the last 30 days:
{
"inclusions": {
"operator": "or",
"rules": [
{
"event_sources": [
{
"type": "offline_events",
"id": "<OFFLINE_EVENT_SET_ID>",
}
],
"retention_seconds": 2592000,
"filter": {
"operator": "and",
"filters": [
{
"field": "custom_data.favorite_food",
"operator": "i_contains",
"value": "pizza"
}
]
},
}
]
}
}
{
"inclusions": {
"operator": "or",
"rules": [
{
"event_sources": [
{
"type": "offline_events",
"id": "<OFFLINE_EVENT_SET_ID>"
}
],
"retention_seconds": 2592000,
"filter": {
"operator": "and",
"filters": [
{
"field": "event",
"operator": "eq",
"value": "Purchase"
},
{
"operator": "or",
"filters": [
{
"field": "value",
"operator": ">=",
"value": "100"
}
]
}
]
}
}
]
}
}
blue defined by offline event attributes in the custom_data field called ‘color’ in the last 30 days. Consider using this rule for the following event:{
"inclusions": {
"operator": "or",
"rules": [
{
"event_sources": [
{
"type": "offline_events",
"id": "<OFFLINE_EVENT_SET_ID>"
}
],
"retention_seconds": 2592000,
"filter": {
"operator": "and",
"filters": [
{
"field": "event",
"operator": "eq",
"value": "Purchase"
},
{
"operator": "or",
"filters": [
{
"field": "custom_data.color",
"operator": "eq",
"value": "blue"
}
]
}
]
}
}
]
}
}