Assembled integrates with [Intercom](https://www.intercom.com/) — a contact platform that is mainly used for chat and email — allowing your conversation data to be forecasted and tracked in our system. This article will walk through how to setup the integration and verify the data Assembled pulls in is correct.

### Preparing your Intercom data for Assembled

Before you connect your Intercom instance to Assembled, we recommend working with your team’s Intercom administrator to prepare your Intercom data as follows:

- **Channels:** Intercom does not have a concept of **channels.** For that reason, by default, we map all Intercom conversations to the **chat channel**. If you would like Assembled to treat all — or a subset of — conversations from Intercom as email conversations instead of chat, please reach out to our [Support team](mailto:support@assembledhq.com).
- **Conversations attributes:**Assembled can create queues based on one of the following attributes. If you plan to separate your Intercom data into multiple queues within Assembled, you should ensure that each Intercom conversation has one of the following properties:
  - Team assignee ID
  - Admin assignee ID
  - Delivered as
  - Source Type
  - Ticket tag

### Connecting to Intercom

Assembled connects to Intercom via [OAuth](https://developers.intercom.com/building-apps/docs/setting-up-oauth) which allows Assembled to make API requests to the Intercom API on behalf of your Intercom account. As a result, this will cause an overall increase in your Intercom API usage.

- To connect your Intercom instance to your Assembled instance, you will need an Intercom admin to navigate to Assembled's _[Third-party integrations](https://app.assembledhq.com/settings/integrations?tab=integrations_directory)_, then `Available`, and click `Add` from the Intercom integration.

- If you have successfully connected to Intercom, you will see a **Synced**, **Sync in progress,** or **Connected** field on the Intercom-specific card in Assembled’s _Settings > [Integrations](https://app.assembledhq.com/settings/integrations?tab=teamwide_integrations)_ page.

If you run into any issues during this step, please reach out to our [Support team.](mailto:support@assembledhq.com)

### Verifying the connection

There are two places in Assembled for you to verify if the Intercom integration has been correctly added: the _[Realtime dashboard](https://app.assembledhq.com/realtime/v2)_ and the _[Staffing timeline](https://app.assembledhq.com/staffing)_.

The _Realtime dashboard_ will display agent states and current adherence. Use this dashboard to make sure agent states from Intercom are being synced to Assembled correctly.

The _Staffing timeline_ displays the contacts of Intercom. Select **New and reopened cases** to see a line graph displaying how many tickets over time. This graph will show if the sync for tickets is working.

If either of these display zero or abnormal numbers, please reach out to our [Support team](mailto:support@assembledhq.com).

### Adding agents from Intercom

To add agents into Assembled you can follow the steps in our [people page guide](https://support.assembled.com/hc/en-us/articles/4414677143053-The-People-page). Agents can be added manually or in bulk via, `Add from Intercom` in the **people page,** CSV upload or [through the API.](https://docs.assembled.com/#post-v0-people)

In addition, please note that Assembled will map Intercom’s users to the **standard** role in Assembled.

### Setting up Assembled queues for Intercom cases

To set up your Assembled queues for your new Intercom integration, we recommend following the steps in our [queue configuration guide](https://support.assembled.com/hc/en-us/articles/7764774375437-Queue-configuration-ticket-exclusions).

In addition, please note the following Intercom specific details:

- Assembled will map Intercom conversations to Assembled chat **channel** by default.
- _If you would like Assembled to treat all or a subset of tickets from Intercom as email tickets instead of chat, please reach out to our [Support team](mailto:support@assembledhq.com)._

### Setting up Assembled agent states for Intercom

We use Intercom’s admin API endpoints to retrieve Intercom’s agent states.

To set up your Assembled agent states for your new Intercom integration, we recommend following the steps in our [agent states setup guide](https://support.assembled.com/hc/en-us/articles/4417997278221-Configuring-agent-state-mappings).

### Understanding how Intercom data maps to data attributes in Assembled

**Ticket data (Chat)**

| Intercom | Assembled |
| --- | --- |
| firstRespondedAt - created_at (SLA) | first_response_duration |

**Ticket status**

| Intercom | Assembled |
| --- | --- |
| snoozed | snoozed |
| close | closed |
| unsnoozed | open |
| note_and_reopen | open |
| timer_unsnooze | open |
| open | open |
| assign_and_reopen | open |

### FAQs

- Q: What should I do if I see a **sync invalid** from the Intercom integration in _Settings>Integrations_?
  - A: This could mean a few things so we recommend hovering over the message :
    - If you see any 400 errors those usually are permissions-related. This sometimes happens when the person who originally authorized does not have proper permissions, the person who originally authorized leaves the company, or if someone changed the permissions settings. In order to continue to have data flowing into Assembled and receive accurate reporting, you will need someone with admin permissions to reauthorize the sync.
    - If you see a generic error please reach out to our Support Team and we can help diagnose the root cause.
- Q: Do we include outbound messages ?
  - A: By default, yes, we include outbound messages. However, if you’d like to exclude outbound messages please reach out to our [Support team.](mailto:support@assembledhq.com)
- Q: How do we calculate SLA ?
  - A: We track SLA based on the `first_responded_at` - `created_at` in Intercom.
