Send data to Facebook

Ads on Facebook appear in a variety of locations, including the news feed and within the right-side column on pages. Use Meta Ads Manager to manage ad placements on Facebook.

Note

This destination uses the Facebook Marketing API , specifically the Replace Users endpoint . This endpoint:

  1. Removes existing customers from an audience without resetting your ad set’s learning phase when an audience is part of active ad sets.

  2. Replaces those users with the list of customers that was sent to Facebook from Amperity.

Changes to audiences are not immediately available in Facebook. 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 from Amperity:

  1. Get details

  2. Authorize Amperity access to the customer’s account

  3. Add destination

  4. Add data template

How this destination works

You can build custom audiences in Facebook. Send customer information, such as email addresses, phone numbers, names, birthdates, gender, city, state, postal code, and mobile advertising IDs, from Amperity to find customer matches on Facebook.

Use custom audiences to advertise to these customers on Facebook, Instagram, and Messenger, and to use Audience Network to extend your advertising beyond Facebook to reach new audiences on apps and mobile devices, such as WhatsApp.

Build custom audiences on Facebook using data from Amperity.

A Facebook destination works like this:

  1. Use a query or segment to build custom audiences.

  2. Configure the Facebook destination and data template.

  3. Send a test set of first-party data from Amperity, and then from within Facebook verify that this data is available from Meta Ads Manager.

    Important

    The custom audience terms of service must be signed by each business user that is associated with your Facebook Ads account. If the terms of service are not signed, a permissions error will prevent Amperity from sending data to Facebook.

    Facebook uses OAuth to grant access to Amperity. You may need to reauthorize OAuth if the token expires or is removed.

About Meta Ads Manager

Meta Ads Manager is a unified ad creation tool that you can use to create and publish ads to Facebook, Messenger, Instagram and the Meta Audience Network. When you send data to Facebook using the Facebook Ads destination, your data will be available from Meta Ads Manager.

Instagram

Use Meta Ads Manager to configure a variety of ad placements across Facebook .

Instagram

Use Meta Ads Manager to configure objectives that place ads on Instagram .

Instagram

Use Meta Ads Manager to configure objectives that place ads on Messenger .

Instagram

Use Audience Manager to reach users who are not on Facebook or Instagram, but are on mobile apps that are within the audience network. For example, creating ads that open conversation threads in WhatsApp .

Get details

Facebook 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 Meta Ads Manager. This name should be clear and understandable to users of Meta Ads 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. Acccept the custom audience terms of service .

    Important

    Terms of service must be signed by each business user that is associated with your Facebook Ads account.

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

    Note

    You may need to reauthorize Amperity at various intervals.

Terms of service

The custom audience terms of service must be signed by each business user that is associated with your Facebook Ads account. If the terms of service are not signed, a permissions error will prevent Amperity from sending data to Facebook Ads.

The permissions error that you may see is similar to:

Permissions error: To create or edit an audience with an uploaded customer list,
please agree to the Custom Audience terms at
https://business.facebook.com/ads/manage/customaudiences/tos/?act=1805005506194464.

To resolve this error the terms of service must be signed by a business user who has a role in your 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.

  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 at the generated URL using the customer’s credentials to allow access to the customer’s instance of Facebook.

    Tip

    Send the URL to an individual who can provide the customer’s credentials, and then ask them to log into Facebook 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. This is necessary when an authorization token has expired or when it has been removed by someone with permission to manage access within Facebook. To reauthorize access to Facebook, follow the steps to configure OAuth and create a new credential.

Add destination

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

Warning

Amperity must be authorized to send data to the customer’s Facebook 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” and “This sends customer data to Facebook”.

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

  4. From the Credentials drop-down, select the “the OAuth credential you created for your Facebook account” credential type. Select the OAuth credential you created for your Facebook 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 business users to use this destination.

    This allows users who have been assigned to the Amp360 User and/or AmpIQ User policies to use this destination with orchestrations and/or campaigns.

  7. Select Allow business users with limited PII access to send data.

    This allows users who have been assigned to the Restrict PII Access policy option to use this destination with orchestrations and/or campaigns.

  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:

  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.

To add a data template for campaigns

  1. From the Destinations tab, open the menu for a destination that is configured for Facebook, 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 audiences” and “Send audiences to Facebook.”

  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.

  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, 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 customer profiles” and “Send email addresses and customer profiles to Facebook.”

  3. 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.

  4. 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.

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

  6. 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