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

# Intercom

> Sync product and CRM data to Intercom so that your support team has all the information they need about customers

## Supported syncing

Hightouch can create and update both contacts and company objects within the [Intercom Contacts Model](https://developers.intercom.com/intercom-api-reference/reference#contacts-model) and [Intercom Company Model](https://developers.intercom.com/intercom-api-reference/reference#company-model) respectively.

| Sync Type | Description | Supported Sync Modes | API Reference |
| - | - | - | - |
| **Contact objects** | Sync data from any source to Intercom contacts. | Upsert, Update, Archive | [Contact docs](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Contacts/CreateContact) |
| **Company objects** | Sync data from any source to Intercom company objects. | Upsert, Update | [Company docs](https://developers.intercom.com/intercom-api-reference/reference/createorupdatecompany) |
| **Events** | Sync records as events to Intercom. This is often in the form of a track call. | Insert | [Event docs](https://developers.intercom.com/intercom-api-reference/reference/createdataevent) |

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 Intercom

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **Intercom** and click **Continue**. You can then authenticate Hightouch to Intercom with OAuth. Click **Log in to Intercom** and log into your Intercom account.

![Intercom authorization screen listing the permissions Hightouch requests](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-intercom-config-auth.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=b9eb38b72e6fb497dd3cc93f6a6c3a69)

> [!NOTE]
>
> On Intercom's authorization screen, select the region that matches your Intercom workspace from the **Data host region** dropdown before you select **Authorize access**:
>
> ![Selecting Intercom hosting region](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/intercom-region-select.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=0b9a941e9bb023bc42268f44935ce590)

Once successful, you will be redirected back to Hightouch to enter a descriptive name for your destination and complete setup.

## Sync configuration

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

### Syncing contacts

Contact objects allow you to represent and provide information on individual users. All contact objects are represented as users or leads as marked by the role attribute.

> [!NOTE]
>
> When looking at the [People list](https://www.intercom.com/help/en/articles/318-the-people-company-and-account-list-explained#the-people-list) or when [creating an audience](https://www.intercom.com/help/en/articles/2848161-create-more-targeted-audiences-with-and-or-rules), the number of contacts (users) displayed might differ from the number of rows processed by your sync. This is because Intercom [automatically filters out unsubscribed contacts](https://www.intercom.com/help/en/articles/5537581-include-unsubscribed-contacts-in-your-email-audience#h_c8fcd619b4) from your contact list.

#### Record matching

To match rows from your model to objects in Intercom, you need to select a model column and corresponding Intercom field. You can match on any of the following Intercom fields:

* Email
* External User ID

#### Field mapping

You can map data from any of your model columns to contact fields in Intercom. Ensure the data type of your model column matches the data type of the field you want to sync to.

#### Associations

You can associate companies to contacts using this configuration section. To do so, select a column from your model to match the associated object. Hightouch uses this column to look up the associated object's ID and make the connection between the two objects.

For example, if you wanted to associate a company to your contact, you select **Company** from the right dropdown. Then, select a field to match the company on, for example Company ID.

![Creating an association in the Hightouch UI](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-intercom-association.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=921de9ca3e29ace3c34fb6c074b32cb5)

#### Delete behavior

The [delete behavior](https://docs.hightouch.com/syncs/overview.md#delete-behavior) you select dictates what to do when a row no longer appears in your model's query results. You have the following options:

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the contact in Intercom |
| **Clear fields** | Keep the contact in Intercom but clear the synced fields |
| **Remove from list** | Remove the contact from Intercom |

### Syncing companies

Company objects allow you to represent and provide information on organizations using your product. Each company has its own description and can be associated with contacts.

Company objects' Company ID can't be updated. If you need to change a company object's Company ID you need to delete it and recreate it with a new Company ID.

> [!WARNING]
>
> When syncing company objects, make sure they have at least one [associated contact](#associations-1). Otherwise, the company won't be visible in Intercom.

#### Record matching

To match rows from your model to records in Intercom, you need to select the model column that contains values that match the **Company ID** field. If there isn't a company with the matching Company ID, Hightouch creates a new company.

#### Field mapping

You can map data from any of your model columns to company fields in Intercom. Ensure the data type of your model column matches the data type of the field you want to sync to.

#### Associations

You can associate contacts to companies using this configuration section. To do so, select a column from your model to match to the associated object. Hightouch uses this column to look up the associated object's ID and make the connection between the two objects.

For example, if you wanted to associate a company to your contact, you select **Contact** from the right dropdown. Then, select a field to match the contact on, for example `user_id`.

![Creating an association in the Hightouch UI](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-intercom-association-2.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=b3cb0ad08910be56f4f320ecee2e7ca0)

#### Delete behavior

The [delete behavior](https://docs.hightouch.com/syncs/overview.md#delete-behavior) you select dictates what to do when a row no longer appears in your model's query results. You have the following options:

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the company in Intercom |
| **Clear fields** | Keep the company in Intercom but clear the synced fields |
| **Remove from list** | Remove the company from Intercom |

### Syncing events

When syncing events, Hightouch treats any records added to [your source](https://docs.hightouch.com/getting-started/concepts.md) as new events and sends them to Intercom when your sync runs.

> [!WARNING]
>
> To ensure syncs send each event, your event model must use a truly unique [primary key](https://docs.hightouch.com/getting-started/concepts.md#unique-primary-key-requirement). See the [events syncs](https://docs.hightouch.com/syncs/types-and-modes.md#event-syncs) documentation for more information.

#### Event name

Providing an event name is required to log an event in Intercom. You can either provide a static value or select to **use a column** from your model.

Refer to [Intercom's event docs](https://developers.intercom.com/intercom-api-reference/reference/createdataevent) for guidance on event naming.

#### Event timestamp

You can optionally select a column that contains timestamps of when events occurred. If this field is empty, Hightouch uses the time the event arrives at the server.

#### Field mapping

You can select model columns to sync to native and custom event parameters in the field mapping section.

## Tags

You can manage tags on companies and contacts in Intercom using Hightouch.

The data in your source should contain the name of one or more tags for each row.

For multiple tags, your source can contain an array or a comma-separated string of tag names.

![Mapping to the tags field in Intercom in the Hightouch UI](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-intercom-tags.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=c47bb048bebaa23fc9c1550490b58179)

#### Tag Modes

Syncs can have different tag modes based on how you would like to handle tags.

##### **Create added tags**

When there are tags added to the source, create the tags in Intercom. If the tag does not already exist, it will be created in Intercom. If the tag already exists, it will be added to the contact or company. Do nothing for tags removed from the source.

##### **Overwrite existing tags**

When there are changes to tags in the source, **remove all tags** in Intercom before creating the tags present in the source. If there are no changes to the tags, do nothing. Because this removes all tags in Intercom, this may delete data not authored by Hightouch.

##### **Delete removed tags and create added tags**

When there are changes to tags in the source, removes tags in Intercom that have been removed from the source, and creates tags that have been added to the source.

Read more about how Intercom handles tags [here](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/tags).

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

## Common errors

### 429 Rate limit exceeded

The full error message looks something like this:

```
Custom data attributes could not be created: StatusCodeError: 429 -
{
  "type": "error.list",
  "request_id": "003drrt76xkssahyhgd41",
  "errors":[{
    "code": "rate_limit_exceeded",
    "message": "Exceeded rate limit of 167 in 10_seconds"
  }]
}
```

This error means you've exceeded [Intercom's rate limit](https://developers.intercom.com/intercom-api-reference/reference/rate-limiting).
One reason for this could be running two Hightouch syncs to Intercom simultaneously.
Try staggering the syncs so that they don't overlap.

### Missing companies

If your Hightouch sync processes successfully, but you don't see the companies
in Intercom, check if there is at least one contact [associated to the company](#associations-1). Intercom only displays companies with at least one associated contact. For more information, read the Intercom [company API documentation](https://developers.intercom.com/intercom-api-reference/reference/create-or-update-a-company).
