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:
Removes existing customers from an audience without resetting your ad set’s learning phase when an audience is part of active ad sets.
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:
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.

A Facebook destination works like this:
Use a query or segment to build custom audiences.
Configure the Facebook destination and data template.
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.
Use Meta Ads Manager to configure a variety of ad placements across Facebook . |
|
Use Meta Ads Manager to configure objectives that place ads on Instagram . |
|
Use Meta Ads Manager to configure objectives that place ads on Messenger . |
|
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:
The account ID.
How do I find Facebook Ads account information?
You can find all of this information and perform all of the required steps from within Facebook Business Manager . Click Business Settings, then Ad Accounts, and then the Facebook Ads account name. The account ID is visible under Details.
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.
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.
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
From the Destinations tab, click Add Destination. The Add Destination dialog box opens.
From the Plugin drop-down, select Facebook.
From the Credential drop-down, select Create a new credential. This opens the Create New Credential dialog box.
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.
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.
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
From the Destinations tab, click Add Destination. This opens the Add Destination dialog box.
Enter the name of the destination and a description. For example: “Facebook” and “This sends customer data to Facebook”.
From the Plugin drop-down, select Facebook.
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.
Under Facebook Settings, enter the account ID, custom audience, and the customer file source.
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.
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.
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:
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
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.
Enter the name of the data template and a description. For example: “Facebook audiences” and “Send audiences to Facebook.”
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.
Verify all template settings and make any required updates.
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
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.
Enter the name of the data template and a description. For example: “Facebook customer profiles” and “Send email addresses and customer profiles to Facebook.”
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.
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.
Verify all template settings and make any required updates.
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: |
Email Addresses |
For this key, the connector:
|
|
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:
|
Gender |
GEN |
For this key, the connector:
|
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 |
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 |
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 |
Last Name |
LN |
This key supports special characters and non-Roman alphabet characters. For this key, the connector:
|
First Name |
FN |
This key supports special characters and non-Roman alphabet characters. For this key, the connector:
|
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:
|
City |
CT |
For this key, the connector:
|
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:
|
Country Code |
COUNTRY |
A two-letter country code in ISO 3166-1 alpha-2 format. For this key, the connector:
|
Mobile Advertiser ID |
MADID |
For this key, the connector:
|