Segment Asset Customization

This solution allows you to customize ad assets according to targeting types. To customize assets for different placements, see Placement Asset Customization.

Add creative

At the ad set level, provide different creatives for each unique audience. Then, create rules to define each audience and their respective creative. The supported customization types are:

The format you should use to specify a rule is similar to the format for core targeting, see Targeting.

Rule Creation

You can specify a priority for each rule during their creation. Otherwise, we give each rule a priority number based on its position in the list of rules provided. For example, the first rule on the list is assigned priority 1.

You should setup a default rule to avoid the delivery of random combination of assets to people who do not match any rules. To set this up:

  • Create an empty customization_spec. Use opening and closing curly braces at the end of your rule, like so {}.
  • Assign the lowest priority to the rule. This is the total number of rules, including the default one. If you have 100 rules plus a default, the priority of the default should be 101.

The default rule matches a creative asset to people who do not satisfy any preceding rules. This enables Facebook to deliver a sufficient number of your ads.

In your setup, non-default rules should match a high percentage of your targeted audience.

Asset Feed Spec Setup

Create an asset_feed_spec with customization rules added to asset_customization_rules fields. You can add up to 50 customization rules.

For each rule, you need to specify the customization_spec, priority and the asset labels. Your customization_spec cannot have more than 50 conditions for a single rule.

curl \
-F 'object_story_spec={
       "page_id": "<YOUR_PAGE_ID>",
       "instagram_actor_id" : "<INSTAGRAM_ACTOR_ID>"
    }' \
-F 'asset_feed_spec={
 "images": [
   {"hash":"<IMAGE_HASH>", "adlabels":[{"name":"image1"}]}, 
   {"hash":"<IMAGE_HASH>", "adlabels":[{"name":"image2"}]}
 "bodies": [
   {"text":"Motor City Mission Corps", "adlabels":[{"name":"body1"}]}
 "titles": [
   {"text":"Link title 1 goes here", "adlabels":[{"name":"title1"}]}, 
   {"text":"Link title 2 goes here", "adlabels":[{"name":"title2"}]},
   {"text":"Link title 3 goes here", "adlabels":[{"name":"title3"}]}
 "descriptions": [
   {"text":"Begin Your Adventure"}
 "ad_formats": [
 "link_urls": [
 "asset_customization_rules": [
     "customization_spec": {
        "age_min": 18,
        "age_max": 24
     "image_label": {"name": "image1"},
     "title_label": {"name": "title1"},
     "priority": 1
     "customization_spec": {
       "age_min": 25,
       "age_max": 34
     "image_label": {"name": "image1"},
     "title_label": {"name": "title2"},
     "priority": 2
     "customization_spec": {
       "geo_locations": {
         "cities": [
           {"key": "2481714"},
           {"key": "2481868"}
     "image_label": {"name": "image1"},
     "title_label": {"name": "title3"},
     "priority": 4
     "customization_spec": {}, 
     "image_label": {"name":"image2"},
     "title_label": {"name":"title1"},
     "priority": 5
  }]}' \
-F 'access_token=<ACCESS_TOKEN>' \<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives

With the creative ID, you can create your ad.

See all available options for Asset Feed Spec.



Placements — Facebook Feed; Instagram Feed; Instagram Story; Audience Network Native, Banner and Interstitial; Audience Network Rewarded Video; Audience Network In-stream Video.

Buying typeReach and frequency or AUCTION.

asset_feed_spec restrictions are the same as those for asset-feed based ads without customization rules. Except for the following:

  • Each image or video must have a label attached.
  • Only one image or video is eligible for display per asset_customization_rule.
  • Ad Formats: Two ad_formats are supported: SINGLE_IMAGE and SINGLE_VIDEO. Only one ad_format is allowed per asset feed.
  • You can only provide one item in call_to_actions_types.
  • For each placement setting in an ad set's targeting, you should provide at least one asset_customization_rule for it.