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

# Epsilon Retail Media (CitrusAd)

> Reach customers across the open web and drive increased sales both on-site and in-store.

## Overview

Now deliver even more relevant ads both onsite and across the web by combining data from various sources within your data warehouse to build custom audiences for CitrusAd. By keeping your custom audiences updated automatically, you'll never show an irrelevant ad to anyone.

## Supported syncing

| Type | Description | Supported Sync Modes | API documenation |
| - | - | - | - |
| **Customers** | Sync customer data from any source to CitrusAd customers | Upsert, Update, Insert | [Create or update a customer](https://developers.citrusad.com/integration/reference/create-or-update-a-customer) |

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 CitrusAd

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **CitrusAd** and click **Continue**. You can then authenticate Hightouch to CitrusAd by entering the following required fields into Hightouch:

* **Base URL**: The base URL for staging or production environment. Visit [CitrusAd's docs](https://developers.citrusad.com/integration/reference/api-overview#base-urls) for information on retrieving your base URL.
* **API key**: The API key for authenticating the API requests. Visit [CitrusAd's docs](https://developers.citrusad.com/integration/reference/api-overview#basic-authentication) for information on retrieving your API key.

## Sync configuration

Once you've set up your CitrusAd 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 CitrusAd destination you want to sync to.

### Customers

Customer data is required to generate personalized ads with CitrusAd. See CitrusAd's [docs](https://developers.citrusad.com/integration/reference/customer-data-1) for more details.

#### Record matching

You must match rows in your model with customers in CitrusAd on the **Customer ID** field.

> [!NOTE]
>
> In **Insert** mode, CitrusAd automatically generates a customer ID for every new record synced, so there is no need to match an existing record.

#### Field mapping

You can sync any model columns to CitrusAd's default customer fields including `targetingData`.

When creating new customer records in CitrusAd via insert or upsert mode, CitrusAd sets a default value to all fields without a value, whether you've mapped them or not.

You can find CitrusAd's default values in the table below:

| Field name | Default value |
| - | - |
| **Year of Birth** | `0` |
| **Gender** | `"Other"` |
| **Postcode** | `""` |
| **Suburb** | `""` |

> [!NOTE]
>
> The **Gender** field accepts the following values:
> `"Male"`,`"Female"`,`"Other"` case insensitive. If you send any other values, CitrusAd changes them to `"Other"`.

When updating existing customer data via update or upsert mode, Hightouch pulls the existing customer data from CitrusAd and merges it with your updates.

## 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).

> [!NOTE]
>
> For Hightouch platform error codes related to CitrusAd, see [Error codes: CitrusAd](https://docs.hightouch.com/developer-tools/error-codes.md#other-destinations).

#### Delete behavior

**Clear** is only available for update mode. All sync modes use the **Do nothing** behavior by default.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the customer record in CitrusAd with all its synced fields |
| **Clear** | Unset all the mapped fields from CitrusAd |
