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

# Cordial

> Sync data to Cordial through Contacts API

## Supported syncing

| Sync Type | Description | Supported Sync Modes | API documentation |
| - | - | - | - |
| **Contacts** | Sync data from any source to Cordial as contacts | Upsert, Update, Insert | [Contacts](https://support.cordial.com/hc/en-us/articles/203885958-Contacts-API) |
| **Supplements** | Sync data from any source to Cordial's supplemental data sets | Upsert, Update, Insert | [Supplements](https://support.cordial.com/hc/en-us/articles/204570687-Supplements-API) |

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 Cordial

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **Cordial** and click **Continue**.

Enter your API key from your Cordial account.
If you don't have an API key, follow the [instructions on **Cordial** to create API keys](https://support.cordial.com/hc/en-us/articles/115005365087). Ensure the API key has write access for the object you are syncing.

Based on the sync object, ensure your API key has access to the following API endpoints:

| Object | Required API endpoints |
| - | - |
| **Contacts** | <ul><li>`GET /accountcontactattributes`</li><li>`GET/POST/PUT /contacts`</li></ul> |
| **Supplements** | <ul><li>`GET /supplements`</li><li>`GET/POST/PUT /supplements/<supplement key>/records`</li></ul> |

Next, select which Cordial domain your account uses. This will either be `admin.cordial.io` or `usw2.admin.cordial.io`. You can determine which one your account uses by navigating to your Cordial dashboard and checking the website URL.

## Sync configuration

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

Select which object you'd like to sync.

### Sync mode

* **Upsert**: pushes new objects to Cordial and updates mapped fields that change in your source.
* **Update**: updates mapped fields on existing objects in Cordial. New objects are not added.
* **Insert**: pushes new objects to Cordial. Existing objects are not updated.

### Field mapping

#### Contacts

Cordial has the following [contact attribute types](https://support.cordial.com/hc/en-us/articles/204570347-Accountcontactattributes):

* string
* number
* date (ISO 8601 standard)
* geo
* array

Hightouch supports syncing with all of these types. You may use Hightouch's object inline mapping to construct Cordial's object values from your source.

You **must** create a contact attribute on Cordial before syncing to that field. Follow the [instructions on **Cordial**](https://support.cordial.com/hc/en-us/articles/115005528368-Contact-attributes#addAttributes) either via UI or API to create contact attributes.

#### Supplements

Start syncing supplements by [creating a supplement collection on Cordial](https://support.cordial.com/hc/en-us/articles/115005528468-Supplements#ui). Indexes on supplement collections are **required** mapping fields on Hightouch.

If a field you'd like to map to is not available in the mapping dropdown, you can enter the field name manually:

![](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-cordial-creatable-mapping.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=cb461e5e43ec8eb8cb78083b755960bd)

### Record matching

#### Contacts

In **Upsert** and **Update** mode, records must be matched by either Cordial ID or Email. Records without unique IDs will fail to sync.

In **Insert** mode, records must have an **email field** to successfully be added to Cordial. Records without an email identifier will fail to sync.

#### Supplements

Since Cordial does not create ID fields for supplements, **id** is required in **Insert** mode. In **Upsert** and **Update** mode, **id** is also required to match records. Records without unique IDs will fail to sync.

> [!TIP]
>
> Cordial [does not allow](https://support.cordial.com/hc/en-us/articles/204570687-Supplements-API#postSuppRecords) 24 character hex strings as ID values for supplements.

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