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

# Intercom

Configuring the Intercom integration allows you to display your user’s session data (location, browser type, …) and conversations.

> [!WARNING]
>
> In order for your intercom integration to work properly, you will have to use the version 2 of intercom API. To do so, you'll need go to the intercom developer hub and ensure that the app registered to retrieve your API key uses the intercom API version 2.0.

![](https://mintcdn.com/forest/XG_FfWf8cKiyLgEH/images/legacy/javascript-agents/image%20\(352\).png?fit=max\&auto=format\&n=XG_FfWf8cKiyLgEH\&q=85\&s=7e3062788c38a9c785a5410939809c76)

First, add the intercom client as a dependency to your project:

> [tab] Rails
>
> ```ruby theme={null}
> gem 'intercom'
> ```
>
> Then, you need to add the intercom integration:

> [tab] Rails
>
> ```ruby theme={null}
> ForestLiana.integrations = {
>   # ...
>   intercom: {
>     access_token: ENV['INTERCOM_ACCESS_TOKEN'],
>     mapping: ['Customer']
>   }
> }
> ```

* `intercom` is used to pass the intercom client version. To do so, you have to require the previously installed client, as in the example.
* `accessToken` should be defined in your environment variable and is provided by intercom.
* `mapping` refers to the collection and field name you want to map to intercom data. It can either be a field that contain emails that refer to intercom users or a field that contain ids mapping the `external_id` in Intercom API.

> [!NOTE]
>
> You will have to restart your server to see Intercom plugged to your project.

![](https://mintcdn.com/forest/XG_FfWf8cKiyLgEH/images/legacy/javascript-agents/image%20\(353\).png?fit=max\&auto=format\&n=XG_FfWf8cKiyLgEH\&q=85\&s=9d0a28ad8099ae4265e58c1ff1fe95ad)

### Others


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.