Intercom
Last updated
Last updated
Please be sure of your agent type and version and pick the right documentation accordingly.
This is the documentation of the forest-express-sequelize
and forest-express-mongoose
Node.js agents that will soon reach end-of-support.
forest-express-sequelize
v9 and forest-express-mongoose
v9 are replaced by @forestadmin/agent
v1.
Please check your agent type and version and read on or switch to the right documentation.
Configuring the Intercom integration allows you to display your user’s session data (location, browser type, …) and conversations.
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.
First, add the intercom client as a dependency to your project:
Then, you need to add the intercom integration:
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.
You will have to restart your server to see Intercom plugged to your project.