# Connect Reverse ETL Source to TikTok Audiences


This guide takes you through the steps to connect a [Reverse ETL source]({{< ref "sources/reverse-etl/" >}}) to your TikTok Audiences destination.

{{< success >}}
You can connect multiple Reverse ETL sources to the TikTok Audiences destination.
{{< /success >}}

## Setup

1. Set up and configure your Reverse ETL source.
2. In the **Overview** tab of the source page, click **Add destination** > **Create new destination**. You can also select an already-configured destination here.
3. From the list of destinations, select **TikTok Audiences** and click **Continue**.
4. Specify a unique name to identify this destination in RudderStack.
5. In the **Event delivery account** section, click **Select** to choose from an existing TikTok account from the list. You can also click **Add account** and authenticate via OAuth, by specifying the following settings:

| Setting | <div style="width: 350px;">Description</div> |
| :----| :-----|
| Account Name | Specify a unique account name |
| oAuth settings | Click **Connect account**, sign in with TikTok, and give RudderStack the required permissions to access your TikTok Ads account. |

6. The **Advertiser ID** field is automatically pre-populated based on the selected TikTok account — select the relevant ID from the dropdown.
7. Click **Continue** to configure the mapping settings.

## Mapping settings

This section lists the settings to correctly map data from your Reverse ETL source to the TikTok Audiences destination.

### Select audience

In this section, you can create a new audience or use an existing one.

- **Create new audience**: Use this option to create a new custom audience in TikTok. You can specify the name and description of the new TikTok audience.
- **Use existing audience**: Use this option if you have an existing audience in TikTok. RudderStack automatically populates this field with the relevant audiences based on your specified [connection settings](#setup).

### Sync mode

RudderStack supports only [Mirror mode]({{< ref "data-pipelines/reverse-etl/developer-guides/sync-modes.md#mirror-mode" >}}) for this integration.

### Map identifiers

1. Select a warehouse column that uniquely identifies your records and map it to the relevant TikTok field.
2. Map the other warehouse columns to specific TikTok fields that represent your audience's identity.

{{< image src="images/audiences/destinations/tiktok/map-identifiers-retl.webp" >}}

### Advanced settings

| Setting | <div style="width: 350px;">Description</div> |
| :----| :-----|
| Automatically hash PII data | When set to **Yes**, RudderStack automatically hash-encodes user data in the SHA-256 format before sending it to TikTok. <br /><br />**Do not use** this setting if you are sending already-hashed data from your warehouse to TikTok. Otherwise, it can lead to failures. See [Data hashing](#data-hashing) section for more information. |

## Sync settings

{{< customreadfile "/includes/retl/schedule-syncs.md" >}}

#### Sync observability settings

{{< customreadfile "/includes/retl/sync-observability-settings.md" >}}

## Enable destination

Once the setup is complete, make sure to click the **Enable** button to enable and activate the connection.

{{< image src="images/audiences/destinations/tiktok/enable-button.webp" >}}

## Supported mappings

You can map your warehouse columns to the following TikTok fields:

| Field | <div style="width: 350px;">Description</div> |
| :---| :----|
| IDFA_MD5 | MD5 hash of an iOS IDFA |
| AAID_MD5 | MD5 hash of an Android AAID/GAID |
| IDFA_SHA256 | SHA256 hash of an iOS IDFA |
| AAID_SHA256 | SHA256 hash of an Android AAID/GAID |
| EMAIL_SHA256 | SHA256 hash of email ID — see [Important Notes for Streaming API- Email Specific Normalization](https://business-api.tiktok.com/portal/docs?id=1739566528222210) section for more information |
| PHONE_SHA256 | SHA256 hash of a phone number in E.164 format, for example, `+1231234567` |

After normalization, RudderStack validates each field before sending it to TikTok. 

- If a field is determined to be invalid, RudderStack **does not** send it to TikTok.
- If all fields in a row are invalid, the entire row is skipped and the event is marked as failed.

## Data hashing

The [Automatically hash PII data](#advanced-settings) setting lets you hash your user data before sending it to TikTok. This setting is enabled by default.

- Configure the setting to **Yes** if your incoming data is not pre-hashed
- Configure this setting to **No** if your data is already hashed

{{< warning >}}
TikTok expects the incoming data to be hashed. Hence, incorrect configuration of the **Automatically hash PII data** setting will result in failures:

- If the **Automatically hash PII data** setting is configured to **Yes** and your data is already hashed, the event will fail.
- If the **Automatically hash PII data** setting is configured to **No** and your data is not pre-hashed, the event will fail.
{{< /warning >}}

RudderStack rejects such events with a clear error message, for example:

```text
Automatically hash PII data is disabled but the value for field EMAIL appears to be unhashed. Either enable hashing or send pre-hashed data.
```

You will also see errors in the **Events** tab for cases that were previously marked as successful, but were effectively resulting in no matches, helping you quickly identify and fix any data quality or configuration issues.

## FAQ

#### Why can't I add a Reverse ETL source from the destination page?

The Reverse ETL feature supports only source-driven pipeline configuration. It means that you must configure a Reverse ETL source in RudderStack and then connect it to a new or existing destination. Note that this destination should not be connected to any other source.

See [Reverse ETL FAQ]({{< ref "data-pipelines/reverse-etl/developer-guides/faq.md" >}}) for more information.

#### How do I view the synced segments in TikTok?

To view the synced audience, go to your [TikTok Ads Manager](https://ads.tiktok.com/i18n/home) and go to **Tools** > **Audience manager**.

{{< image src="images/event-stream-destinations/tiktok-ads-audiences.webp" >}}

To see the sync status, check the **Availability** column.

{{< image src="images/event-stream-destinations/tiktok-ads-sync-status.webp" >}}

<br />
