> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CJ Affiliate

> CJ Affiliate's technology powers a partnership ecosystem where over 167K publishers and brands engage billions of consumers worldwide.

## Supported syncing

| Type | Description | Supported Sync Modes | API Reference |
| - | - | - | - |
| **Orders** | Sync data from any source to CJ Affiliate orders | Upsert, Update, Insert | [Orders docs](https://developers.cj.com/docs/advertiser-api-tracking/api-overview) |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

## Connect to CJ Affiliate

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **CJ Affiliate** and click **Continue**. You can then authenticate Hightouch to **CJ Affiliate**.

Enter the following fields into Hightouch:

* **Advertiser ID**: Enter your advertiser ID.
* **Access token**: Enter your personal access token.

## Sync configuration

Once you've set up your CJ Affiliate destination and have a [model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull data from, you can set up your sync configuration to begin syncing data. Go to the [**Syncs** overview page](https://app.hightouch.com/syncs?from=docs) and click the **Add sync** button to begin. Then, select the relevant model and the CJ Affiliate destination you want to sync to.

### Syncing orders

Sync data from any source to CJ Affiliate orders.

#### Record matching

To match rows from your model to orders in CJ Affiliate, you need to select the model column that contains values that match the **Order ID** field.
Refer to the [record matching docs](https://docs.hightouch.com/syncs/record-matching.md) for more information.

> [!NOTE]
>
> In **Insert** mode, CJ Affiliate automatically generates an identifier for every new record synced, so there is no need to match an existing record.

#### Field mapping

Hightouch lets you sync order fields via [field mapping](https://docs.hightouch.com/syncs/mapping-data.md).
You can map data from any of your model columns to default and custom order fields.
CJ Affiliate requires the following fields, so you must map them to complete your configuration:

* **Order ID**
* **Enterprise ID**
* **Action tracker ID**
  Ensure your model's columns have the same data types as the fields you want to sync to.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).
