Dynamic Creative

Dynamic Creative allows you to automatically deliver different combinations of an ad's creative to your users. It helps you find the best creative combination per impression and learns from the asset's performance across audiences.

This solution also improves your ability to explore a variety of creative asset combinations and audiences, so you can show the best images, titles, descriptions and other assets to your users.

You should use Dynamic Creative to:

  • Automate the workflow used to test creative
  • Use different audiences to learn how to pick the most effective combination of creative assets

Use this API for new and ongoing campaigns, as well as campaigns that run longer than five days. You should perform split testing with your existing campaigns to find the best approach for your needs.

High-Level Steps

Create a Campaign

You can create a standard ad campaign for Dynamic Creative, but there are two limitations:

  • Your objective must be one of the following: CONVERSIONS, APP_INSTALLS, LINK_CLICKS, BRAND_AWARENESS, LEAD_GENERATION, REACH, or VIDEO_VIEWS.
  • buying_type must be the default, which is AUCTION, or left blank.

For example, to create an ad campaign with the objective of CONVERSIONS:

curl \
  -F 'name=Dynamic Creative Sample Campaign'
  -F 'objective=CONVERSIONS'
  -F 'status=PAUSED'
  -F access_token=<ACCESS_TOKEN>
  https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/campaigns   

Create an Ad Set

Use the standard ad set endpoint.

You can use all optimization_goals, billing_events, targeting, and promoted_objects, as long as they are compatible with the parent ad campaign's objective. For more information see Validation. Then set is_dynamic_creative to true.

To create an ad set in a campaign with optimization_goal set to conversions:

curl \
  -F 'status=PAUSED'
  -F 'name=Dynamic Creative Ad Set'
  -F 'campaign_id=<CAMPAIGN_ID>'
  -F 'optimization_goal=OFFSITE_CONVERSIONS'
  -F 'is_dynamic_creative=true'
  -F 'lifetime_budget=1000'
  -F 'promoted_object={"pixel_id": "<PIXEL_ID>", "custom_event_type": "PURCHASE"}'
  -F 'billing_event=IMPRESSIONS'
  -F 'bid_strategy=LOWEST_COST_WITHOUT_CAP'
  -F 'targeting={"geo_locations": {"countries": ["US"]}}'
  -F 'start_time=2019-04-02'
  -F 'end_time=2019-04-09'
  -F access_token=<ACCESS_TOKEN>
  https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adsets

If you use asset_feed_spec with an ad set optimized for APP_INSTALLS, you should specify link_url, such as http://www.abc.com. The link_url should be the same as object_store_url in promoted_object. You should provide only one link_url parameter in asset_feed_spec.

Provide Ad Creative

Provide your creative through the asset_feed_spec, also known as Asset Feed. In this field, you can specify multiple creative assets for each asset type. Some examples of asset types are images, videos, headlines and link descriptions. See the following:

With asset_feed_spec, you can also determine asset customization rules for solutions like Placement Asset Customization and Segment Asset Customization.

Note you may also need to set page_id and instagram_actor_id.

At this point, your ad set must be empty. When you create your ad, provide a reference to the creative ID. You can only create one ad per ad set. However, you can create additional Dynamic Creative ads in other, new ad sets.

curl 
  -F 'name=Dynamic Creative Ad' 
  -F 'adset_id=<ADSET_ID>' 
  -F 'access_token=<ACCESS_TOKEN>' 
  -F 'creative={
      "creative_id": <CREATIVE_ID>,
   }' 
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads

After you create your ad:

Note that once you create an ad for Dynamic Creative, you cannot delete or archive it. Instead, you should delete or archive the parent ad set.

Check Review Status

After you create your campaign, ad set, and ad, check ad review status:

curl -G 
-d "access_token=<ACCESS_TOKEN>" 
-d 'fields=review_feedback' 
https://graph.facebook.com/<API_VERSION>/<ADSET_ID>

The result includes ad review feedback. An empty array means that your ad passed review:

{
  "review_feedback":"[]",
  "id":"<ADSET_ID>"
}

If your ad does not pass review, you see:

{
  "review_feedback": {
    {"id":23842500258220001,"text":"Body 1","reason":["ALCOHOL"]},
    {"id":23842500258160001,"text":"Title 1","reason":["ALCOHOL"]},
    {"id":23842500258170001,"text":"Title 2","reason":["ALCOHOL"]}
  }",
  "id": "<AD_ID>"  
}