Dynamic Ads for Real Estate - Creating Ads

You create Dynamic Ads for Real Estate in much the same way as Dynamic Ads.

To create a Dynamic Ads for Real Estate campaign, you need:

Every ad at Facebook must be part of ad set which defines its bidding and targeting, and the ad set much be part of a campaign which defines in objective. We must create each level of a campaign in order to run ads.

Step 1. Create Ad Campaign

Dynamic Ads for real estate uses the PRODUCT_CATALOG_SALES objective. You should specify a real estate catalog in promoted_object at the campaign level:

curl \
  -F 'name=DARE campaign' \
  -F 'objective=PRODUCT_CATALOG_SALES' \
  -F 'promoted_object={"product_catalog_id":"<PRODUCT_CATALOG_ID>"}' \
  -F 'status=PAUSED' \
  -F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/campaigns

Step 2. Create Ad Set

Create the ad set which defines the bidding and targeting options for your ads.

curl \
  -F 'name=adset name' \
  -F 'bid_amount=3000' \
  -F 'billing_event=IMPRESSIONS' \
  -F 'optimization_goal=OFFSITE_CONVERSIONS' \
  -F 'daily_budget=15000' \
  -F 'campaign_id=<CAMPAIGN_ID>' \
  -F 'targeting={
    "geo_locations": {"countries":["US"]},
    "dynamic_audience_ids": ["<DYNAMIC_AUDIENCE_ID>"]
  }' \
  -F 'promoted_object={"product_set_id":<PRODUCT_SET_ID>, "custom_event_type": "PURCHASE" }' \
  -F 'status=PAUSED' \
  -F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adsets

Step 3. Provide Ad Creative

Provide Dynamic Ad template creative, which is similar to ad creatives. The main difference is that you can add template parameters which Facebook uses at runtime based on data in your catalog and someone's home listing interest.

As with Dynamic Ads, define template_data in object_story_spec in the ad creative. You can also use template_url to define url in a more flexible way instead of using url from the feed. If template_url cannot be constructed at ads rendering time we will fall back to the url from the catalog.

Below is an example to create a carousel creative for a home listing.

curl \
  -F 'name=DARE creative' \
  -F 'object_story_spec={
    "page_id": "<PAGE_ID>",
    "template_data": {
    "description": "{{home_listing.name | titleize}}",
    "link": "http://www.EXAMPLE.com",
    "message": "HOME LISTINGS!!!",
    "name": "{{home_listing.num_beds}} beds / {{home_listing.num_baths}} baths | {{home_listing.price strip_zeros}}"
    }
  }' \
  -F 'product_set_id=<PRODUCT_SET_ID>' \
  -F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/creatives

Creative Format Options

You can choose whether to show a single product or multiple products in a carousel. For single product ads, you can show multiple images in the carousel for that product. You can also display static cards in combination with dynamic cards. See Dynamic Ads, Building a Creative Template.

Template Tags

When we deliver your ad, we substitute tags in {{...}} with the relevant value.

Template tagDescription

home_listing.description

Description of home listing

home_listing.name

Name

home_listing.num_beds

Number of beds

home_listing.num_baths

Number of baths

home_listing.num_units

Number of units

home_listing.price

Price of the home listing

home_listing.year_built

Year the home was built

home_listing.city

City provided in catalog

home_listing.country

Country provided in catalog

home_listing.region

Region provided in catalog

home_listing.street_address

Street address provided in catalog

Finally create your ad that delivers dynamic creative to the user based on your catalog:

curl \
  -F 'name=DARE Alpha Ad' \
  -F 'adset_id=<ADSET_ID>' \
  -F 'creative={"creative_id":"<CREATIVE_ID>"}' \
  -F 'tracking_specs=[{"action.type": ["offsite_conversion"],"fb_pixel": ["<PIXEL_ID>"]},{"action.type": ["post_engagement"],"page": ["<PAGE_ID>"],"post": ["<POST_ID>"]}]' \
  -F 'status=PAUSED' \
  -F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads

Your ad is now visible in Ads Manager and is in a paused state.