Send data to Facebook Ads

Facebook Ads appear in the news feed and in the right-side column on Facebook. Facebook Ads provides an API for integrating with third-party systems.

Note

This destination uses the Facebook Marketing API .

Changes to audiences are not immediately available in Facebook Ads. Allow for up to 24 hours after the point at which Amperity has finished sending audience updates for them to be available.

This topic describes the steps that are required to send customer data to Facebook Ads from Amperity:

  1. Get details

  2. Authorize Amperity access to the customer’s account

  3. Add destination

  4. Add data template

Get details

Facebook Ads requires the following configuration details:

  1. The account ID.

  2. The custom audience name and customer file source settings.

    The custom audience name is visible from the Facebook Audience Manager. This name should be clear and understandable to users of Facebook Audience Manager. The custom audience name will be created if it does not exist.

    The customer file source specifies if the data was provided by users, provided by partners, or provided from both users and partners.

    Note

    The customer file source maps directly to the customer_file_source parameter in the Facebook Marketing API. This value describes how the customer information in the custom audience was originally collected:

    • USER_PROVIDED_ONLY Select this option when advertisers collected information directly from customers.

    • PARTNER_PROVIDED_ONLY Select this option when advertisers sourced information directly from partners, such as an agency or data provider.

    • BOTH_USER_AND_PARTNER_PROVIDED Select this option when advertisers collected information directly from customers and it was also sourced from partners.

  3. Authorize Amperity to send data to the customer’s Facebook Ads account. This requires activation in the Amperity Facebook Ads account and approval in the customer’s Facebook Ads account.

Configure OAuth

OAuth is an open standard for access delegation, commonly used to grant websites or applications access to information on other websites.

To configure OAuth

  1. From the Destinations tab, click Add Destination. The Add Destination dialog box opens.

  2. From the Plugin drop-down, select Facebook Ads.

  3. From the Credential drop-down, select Create a new credential. This opens the Create New Credential dialog box.

  4. Generate an authorization link, and then visit the URL that was generated to complete the authorization process.

    Log in to Facebook Ads at the generated URL using the customer’s credentials to allow access to the customer’s instance of Facebook Ads.

    Tip

    Send the URL to an individual who can provide the customer’s credentials, and then ask them to log into Facebook Ads on your behalf.

  5. When complete, you will be redirected to the Credentials page in Amperity.

    Verify the credential is on the page, and then return to the Destinations tab.

Reauthorize Amperity

You may need to reauthorize access to Facebook Ads. This is necessary when an authorization token has expired or when it has been removed by someone with permission to manage access within Facebook Ads. To reauthorize access to Facebook Ads, follow the steps to configure OAuth and create a new credential.

Add destination

Configure Amperity to send data to Facebook Ads using the Facebook Ads API.

Warning

Amperity must be authorized to send data to the customer’s Facebook Ads account prior to configuring the destination.

To add a destination

  1. From the Destinations tab, click Add Destination. This opens the Add Destination dialog box.

  2. Enter the name of the destination and a description. For example: “Facebook Ads” and “This sends customer data to Facebook Ads”.

  3. From the Plugin drop-down, select Facebook Ads.

  4. From the Credentials drop-down, select the “the OAuth credential you created for your Facebook Ads account” credential type. Select the OAuth credential you created for your Facebook Ads account, after which configuration settings are added automatically.

  5. Under Facebook Settings, enter the account ID, custom audience, and the customer file source.

  6. Select Allow customers to use this destination.

  7. Select Allow orchestrations from users with limited PII access. (A user with limited PII access has been assigned the Restrict PII Access policy option.)

  8. Click Save.

Add data template

A data template defines how columns in Amperity data structures are sent to downstream workflows. A data template is part of the configuration for sending query and segment results from Amperity to an external location.

You have two options for setting up data templates for Facebook Ads:

  1. For use with campaigns

  2. For use with orchestrations

for campaigns

You can configure Amperity to send campaigns to Facebook Ads. These results are sent from the Campaigns tab. Results default to a list of email addresses, but you may configure a campaign to send additional attributes to Facebook Ads.

To add a data template for campaigns

  1. From the Destinations tab, open the menu for a destination that is configured for Facebook Ads, and then select Add data template.

    This opens the Add Data Template dialog box.

  2. Enter the name of the data template and a description. For example: “Facebook Ads audiences” and “Send audiences to Facebook Ads.”

  3. Enable the Allow customers to use this data template option, and then enable the Make available to campaigns option. This allows users to send campaign results from Amperity to Facebook Ads.

  4. Verify all template settings and make any required updates.

  5. Click Save.

for orchestrations

You can configure Amperity to send query results to Facebook Ads. These results are sent using an orchestration.

To add a data template for orchestrations

  1. From the Destinations tab, open the menu for a destination that is configured for Facebook Ads, and then select Add data template.

    This opens the Add Data Template dialog box.

  2. Enter the name of the data template and a description. For example: “Facebook Ads customer profiles” and “Send email addresses and customer profiles to Facebook Ads.”

  3. Under Webhook settings, add the Label Name. For example: “Facebook Ads”. The Webhook Settings should be set to empty curly braces: {}.

  4. Enable the Allow customers to use this data template option. This allows users to build queries, and then configure orchestrations that send results from Amperity to a configured destination.

  5. Optional. Enable the Allow orchestrations from customers with limited PII access option. This allows users who have been assigned the Restrict PII Access policy option to send results from Amperity.

  6. Verify all template settings and make any required updates.

  7. Click Save.

Facebook Marketing API keys

The following Amperity columns should be mapped to the corresponding Facebook Marketing API keys when they are present in query data:

Amperity Column

Facebook API Key

Description

Amperity ID

EXTERN_ID

This value is a unique ID used by the advertiser, such as a loyalty ID, a customer ID, an external cookie ID, or the Amperity ID.

For this key, the connector trims leading and trailing whitespace.

Tip

A query can alias the Amperity ID directly in a query: SELECT amperity_id AS EXTERN_ID from custom_table. This approach can be helpful for queries that are dedicated to returning data to be sent only to Facebook Ads.

Email Addresses

EMAIL

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Hashes data as SHA-256

Phone Numbers

PHONE

Converts each phone number to E.164 format which represents a phone number as a number up to fifteen digits in length (without spaces) that starts with a + symbol. For example: +12061234567.

For this key, the connector:

  • Trims leading and trailing whitespace

  • Removes symbols, letters, and any leading zeros

  • Hashes data as SHA-256

Gender

GEN

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Converts to m and f

  • Hashes data as SHA-256

Birth Date

BIRTH

The birth date in Amperity date format.

For this key, the connector splits this value into three fields: birth year (DOBY), birth month (DOBM), and birth day (DOBD).

Birth Year

DOBY

Warning

Do not pass this column. For this key, the connector will use birthdate to split out the value for DOBY with a format of YYYY and a range from 1900 to the current year.

Birth Month

DOBM

Warning

Do not pass this column. For this key, the connector will use birthdate to split out the value for DOBM with a format of 01 to 12.

Birth Day

DOBD

Warning

Do not pass this column. For this key, the connector will use birthdate to split out the value for DOBD with a format of 01 to 31.

Last Name

LN

This key supports special characters and non-Roman alphabet characters. For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Removes punctuation

  • Updates special characters to UTF-8 format

  • Hashes data as SHA-256

First Name

FN

This key supports special characters and non-Roman alphabet characters. For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Removes punctuation

  • Updates special characters to UTF-8 format

  • Hashes data as SHA-256

First Initial

FI

Warning

Do not pass this column. The connector will use the first character of the normalized first name.

US States

ST

A two-character ANSI abbreviation code for US states.

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Normalizes states located outside of the United States

  • Removes punctuation, special characters, and whitespace

  • Hashes data as SHA-256

City

CT

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Removes punctuation, special characters, and whitespace

  • Hashes data as SHA-256

Zip Code

ZIP

Use only the first five digits for the United States. Use postcodes (area, district, sector) format for United Kingdom.

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Removes whitespace from lower-case for United Kingdom

  • Trims to five digits for United States

  • Hashes data as SHA-256

Country Code

COUNTRY

A two-letter country code in ISO 3166-1 alpha-2 format.

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Hashes data as SHA-256

Mobile Advertiser ID

MADID

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Keeps hyphens

  • Hashes data as SHA-256