Unified Paid Media table

The Unified Paid Media table builds customer profiles that contain all known PII—including email addresses, phone numbers, names, and physical addresses—for each Amperity ID. This is different from the Merged Customers table, which contains only the best PII for each Amperity ID. Use the Unified Paid Media to help increase the total number of matched customers with your paid media campaigns.

Note

The Unified Paid Media table is built from the Unified Coalesced table to build customer profiles that include all known personally identifiable information (PII), including email addresses, phone numbers, and physical addresses.

Add this table to your customer 360 database when your brand wants to send all known PII downstream for use with paid media campaigns.

Add table

The Unified Paid Media table is an optional table for the customer 360 database. The Unified Paid Media table is built using a SQL template.

Note

The Unified Paid Media table uses a Spark SQL query to pull the Amperity ID, along with all known PII data, from the Unified Coalesced table.

The Unified Coalesced table contains all the PII data that has been processed through Stitch. The data is organized by the semantic tag as the column heading and then coalesced into one single table. A unique Amperity ID may appear in more than one row.

To add the Merged Customers table

  1. From the Customer 360 page, under All Databases, select the menu for the customer 360 database, and then click Edit.

  2. From the Database Editor, click Add Table.

  3. Name the table “Unified_Paid_Media”.

  4. Set the build mode to SQL.

  5. Click Apply template, and then select Unified Paid Media.

  6. Click Validate to verify the SQL runs without error.

  7. Optional. Adjust the row limit.

  8. Click Next. This opens the Database Table Definition page.

  9. Add a table description. This enables a tooltip that is visible from other areas in Amperity.

  10. Verify that semantic tags—given_name, surname, email, phone, address, city, state, postal, birthdate, gender, etc.—were applied to all PII fields correctly.

    Tip

    You can clear incorrectly tagged semantics individually or for the entire table. To clear semantic tags for the entire table, under Semantic Suggestions click Clear semantics.

  11. Under Version History, select Enable table version history.

  12. Click Save.

SQL query

The following SQL query is the recommended starting point for the Unified Paid Media table. It is a series of window function that collects and groups all known PII data, and then a statement that updates the Unified Paid Media table with the results.

Optional updates

The Unified Paid Media does not require customization, but you may make the following updates:

Configure the row limit

The Unified Paid Media table is configured by default to include a ranked list of up to 10 phone numbers, email addresses, and addresses/details for each unique Amperity ID.

Important

Amperity IDs are duplicated in the Unified Paid Media table, but are limited by the configured row limit.

You can configure the row limit by changing a value in the pii_row_limit common table expression at the start of the query. For example, a value of “3” will include the top 3 ranked phone numbers, email addresses, and physical addresses for each unique Amperity ID:

WITH pii_row_limit AS (
  SELECT 3 AS limit
)

How many rows are defined by the row limit?

If the limit is set to 10, and there are 10 rows each for email addresses, phone numbers, and address/details, there will be 10 x 10 x 10 combinations of rows, or 1000 rows in the Unified Paid Media table.

If the limit is set to 5, and there are 5 rows each, there will be 5 x 5 x 5 combinations of rows, or 125 rows.

If the limit is set to 3, and there are 3 rows each, there will be 3 x 3 x 3 combinations of rows, or 27 rows.

Adjust the row limit to control the size of the Unified Paid Media table, as required to support your brand’s goals for match rates and customer matches in downstream marketing applications.

When an audiences is sent to a destination and that audience uses the Unified Paid Media table, only the fields that are supported by the downstream marketing application will be sent. For example, if a downstream marketing tool only requires email addresses, a row limit of 10 will send up to 10 email addresses for each Amperity ID that matched the audience that was built in Amperity.

State, province, and territory codes

Amperity uses a CASE statement ot define standardized state and province codes for the United States (states and territories) and Canada (provinces and territories).

The default CASE statement located in the address_and_details_prep common table expression standardizes states, provinces, and territories into two digit codes:

,CASE
  WHEN TRIM(LOWER(state)) IN ('alabama','al') THEN 'AL'
  WHEN TRIM(LOWER(state)) IN ('alaska','ak') THEN 'AK'
  [... 72 rows ...]
  WHEN TRIM(LOWER(state)) IN ('nunavut','nu') THEN 'NU'
  WHEN TRIM(LOWER(state)) IN ('yukon','yt') THEN 'YT'
  ELSE UPPER(state)
END AS state

You may update the codes within the CASE statement located in the address_and_details_prep common table expression to align to the codes your brand uses or you may use a separate mapping file that is joined to this table.

Column reference

The Unified Paid Media table only contains field associated with customer profile semantic tags (names, physical addresses, phone numbers, email addresses, birthdates, and gender) along with the Amperity ID.

Column name

Data type

Description

Amperity ID

String

The unique identifier that is assigned to clusters of customer records that all represent the same individual. Each row in this table is associated with an Amperity ID; rows in this table are not unique by Amperity ID.

Address

String

The address that is associated with the location of a customer, such as “123 Main Street”.

Address Line 2

String

Additional address information, such as an apartment number or a post office box, that is associated with the location of a customer, such as “Apt #9”.

Birthdate

Date

The date of birth that is associated with a customer.

City

String

The city that is associated with the location of a customer.

Country

String

The country that is associated with the location of a customer.

Email

String

The email address that is associated with a customer. A customer may have more than one email address.

Gender

String

The gender that is associated with a customer.

Given Name

String

The first name that is associated with a customer.

Phone

String

The phone number that is associated with a customer. A customer may have more than one phone number.

Zip

String

The zip code or postal code that is associated with the location of a customer.

State

String

The state or province that is associated with the location of a customer.

Surname

String

The last name that is associated with a customer.