Dynamic Formats and Ad Creative

Within dynamic ads, you have the option to use dynamic formats and ad creative. This feature displays different formats and ad creative to different people, based on what they are most likely to respond to.

Currently, the available formats are collection ads and carousel ads. Both formats have different creative variation options. We make format and creative choices based on what is most likely to resonate with each person seeing your ad. We pick a format for each ad impression, whether to show a description, and which description to display, if shown.

To use dynamic formats and creative, follow these steps:

Step 3: Provide Ad Creative

When you provide your campaign's creative, you can let us know you want to use dynamic formats and creative. You do that by specifying FORMAT_AUTOMATION as an optimization_type inside your asset_feed_spec. Your API call must contain the following fields:

product_set_id

Provide the ID of the product set to be used. A product set is a group of related items in a product catalog that you advertise in dynamic ads.

template_data

For dynamic ads, you can add template parameters for your ad creative. Those parameters properly render at run-time based on data in your product feed. Inside object_story_spec, the template_data object allows you to build your template.

For dynamic formats and ad creative, template_data has the following required fields:

FieldDescription

format_option

Options on how to render your ad. In this case, you must set it to carousel_images_multi_items.

multi_share_end_card

Whether an advertiser wants to use the end card in the Carousel ad format. Set to true if you are using the card. Otherwise, set to false.

description

Specify one description option. The text will be used for ads served in the Carousel format. You can use supported template tags or a free-form message.

name

One template tag to be used as the product's name. See supported template tags.

link

Link for the offsite landing page. A user will be directed to this link if they click on your Call To Action.

message

Copy for your ad.

call_to_action

A call to action for the user seeing your ad. Use any call to action type compatible with dynamic ads.

asset_feed_spec

An asset feed is a collection of different creative elements, such as image, titles, bodies, and so on. The asset_feed_spec gives you the specifications for an asset feed.

For dynamic formats and ad creative, asset_feed_spec can include:

FieldDescription

optimization_type

Required.

The type of optimization being used. Set it to FORMAT_AUTOMATION.

ad_formats

Required.

List of ad formats. Set it to ["CAROUSEL", "COLLECTION"].

descriptions

Required.

List the description options to be used. The first one must be the same listed under description inside template_data.

images

Optional.

Use this field to set a custom image as cover media for a collection ad. See example of API call using this field.

videos

Optional.

Use this field to set a custom video as cover media for a collection ad. See example of API call using this field.

Example: Default Behavior

The following is an example of dynamic formats and creative. In this case, the cover media for collection ads defaults to a dynamically generated video:

curl \
   -F 'name=Dynamic Formats and Creative Test' \
   -F 'adset_id=<AD_SET_ID>' \
   -F 'creative={ 
     "name": "Creative for Dynamic Formats and Creative Test",
     "product_set_id": "<PRODUCT_SET_ID>", 
     "object_type": "SHARE",
     "object_story_spec": { 
     "page_id": "<PAGE_ID>", 
     "template_data": { 
        "format_option": "carousel_images_multi_items",
        "multi_share_end_card": "true",
        "description": "{{product.brand}}",
        "name": "{{product.name}}", 
        "link": "<OFFSITE_LANDING_PAGE>",
        "message": "<AD_COPY>",
        "call_to_action": {"type": "SHOP_NOW"}, 
        }},
      "asset_feed_spec":{
        "optimization_type":"FORMAT_AUTOMATION",
        "ad_formats": ["CAROUSEL", "COLLECTION"]},
        "descriptions": [{"text": "{{product.brand}}", "From {{product.current_price}}", ...]}
   }' \
   -F 'url_tags=<URL_TAGS>' \
   -F 'tracking_specs=[{"action.type":"offsite_conversion","fb_pixel":<PIXEL_ID>}]' \
   -F 'access_token=<ACCESS_TOKEN>' \
   https://graph.facebook.com/v<API_VERSION>/act_<AD_ACCOUNT>/ads

Example: Custom Image

The following is an example of dynamic formats and creative. In this case, the cover media for collection ads is set to a custom image:

curl \
  -F 'name=Dynamic Formats and Creative Test - Custom Image' \
  -F 'adset_id=<AD_SET_ID>' \
  -F 'creative={ 
  "name": "Creative For Dynamic Formats and Creative Test - Custom Image",
  "product_set_id": "<PRODUCT_SET_ID>", 
  "object_type": "SHARE",
  "object_story_spec": { 
    "page_id": "<PAGE_ID>", 
    "template_data": { 
      "format_option": "carousel_images_multi_items",
      "multi_share_end_card": "true",
      "description": "{{product.brand}}", 
      "name": "{{product.name}}", 
      "link": "<OFFSITE_LANDING_PAGE>",
      "message": "<AD_COPY>",
      "call_to_action": {"type": "SHOP_NOW"}, 
      }
  },
  "asset_feed_spec":{
    "optimization_type":"FORMAT_AUTOMATION",
    "ad_formats": ["CAROUSEL", "COLLECTION"],
    "images": [{"hash": "<customized_image_hash>"}],
    "descriptions": [{"text": "{{product.description}}", "From {{product.current_price}}", ...]
    } 
   }' \
   -F 'url_tags=<URL_TAGS>' \
   -F 'tracking_specs=[{"action.type":"offsite_conversion","fb_pixel":<PIXEL_ID>}]' \
   -F 'access_token=<ACCESS_TOKEN>' \
   https://graph.facebook.com/v<API_VERSION>/act_<AD_ACCOUNT>/ads

Example: Custom Video

The following is an example of dynamic formats and creative. In this case, the cover media for collection ads is set to a custom video:

curl \
  -F 'name=Dynamic Formats and Creative Test - Custom Video' \
  -F 'adset_id=<AD_SET_ID>' \
  -F 'creative={ 
  "name": "Creative For Dynamic Formats and Creative Test - Custom Video",
  "product_set_id": "<PRODUCT_SET_ID>", 
  "object_type": "SHARE",
  "object_story_spec": { 
    "page_id": "<PAGE_ID>", 
    "template_data": { 
      "format_option": "carousel_images_multi_items",
      "multi_share_end_card": "true",
      "description": "{{product.price strip_zeros}}",
      "link": "<LINK>",
      "message": "<AD_COPY>",
      "call_to_action": {"type": "SHOP_NOW"}, 
       }
   },
  "asset_feed_spec":{
    "optimization_type":"FORMAT_AUTOMATION",
    "ad_formats": ["CAROUSEL", "COLLECTION"], 
    "videos": [{"video_id": "<VIDEO_ID>"}]},
    "descriptions": [{"text": "{{product.description}}", "From {{product.current_price}}", ...]}
   }' \
   -F 'tracking_specs=[{"action.type":"offsite_conversion","fb_pixel":<PIXEL_ID>}]' \
   -F 'access_token=<ACCESS_TOKEN>' \
   https://graph.facebook.com/v<API_VERSION>/act_<AD_ACCOUNT>/ads

Creative Variations

Collection Ads

The collection format features 4 products under a hero image or video that opens into a fullscreen Instant Experience. The hero image or video is also called cover media. The dynamic formats and creative API calls are different, depending on your choice for cover media.

The standard behavior is to add a dynamically generated video as your ad's cover media. In this case, we automatically generate a personalized video for each user that sees your ad. The video highlights products from the catalog that are most relevant to the user. Alternatively, you can provide your own custom image or video for the cover media position.

Help Center: About Collection Ads

Carousel Ads

The carousel format lets you show two or more images and videos, descriptions and links or calls to action in a single ad. For dynamic formats and creative, you can select possible description variations.

Specify your description variations under two fields in the API call: description under template_data, and descriptions under asset_feed_spec. Add all your description options under descriptions, and list the first one under description.

Your description options can contain catalog information or new free-form short message, like "Free Shipping".

Template Tags

To use information available on your catalog, you can use the following template tags:

  • {{product.price}}
  • {{product.current_price}}
  • {{product.description}}
  • {{product.short_description}}
  • {{product.brand}}
  • {{product.name}}

The following tags cannot be used at the same time:

  • {{product.price}} and {{product.current_price}}
  • {{product.description}} and {{product.short_description}}

Limitations

Be mindful of the following:

  • A description can have only one template tag.
  • You must list at least one description option.
  • You can list up to three description options.
  • Only one free-form description is supported. The free-form description counts as one of the three allowed descriptions. If you use one free-form, you can add another two with template tags.
  • The same tag cannot be used in different description options. Once you used that tag, look for a different one to use on a different description.
Help Center: About Carousel Ads

Summary Of Available Options

FormatCreative Variations

Collection Ads

Cover media can be:

  • Auto-generated video (default)
  • Custom Image
  • Custom Video

You must pick one option.

Carousel Ads

Description can be:

  • Product information coming from catalog
  • Free-form custom message

Both can be used at the same time.