Intercom is a Conversational Relationship Platform (CRP).
Wechaty Intercom Plugin helps you build better customer relationships through WeChat across the customer journey.
Wechaty Intercom Plugin helps you to manage your customers/leads/users in the WeChat Room, with the power of the Intercom service.
import { WechatyIntercom } from 'wechaty-plugin-intercom'
const config = {
room: 'room_id@chatroom',
at: true,
webhookProxyUrl : 'https://smee.io/your_smee_io_proxy_url',
intercomToken : 'your_intercom_authorization_token',
}
const IntercomPlugin = WechatyIntercom(config)
const wechaty = new Wechaty()
wechaty.use(IntercomPlugin)config.room: The room id of your service WeChat room.config.at: If set totrue, customers need to use@to mention the bot when they want to ask questions.config.webhookProxyUrl: Asemee.iolink that you need to set it to receive the Intercom Webhook events.- Intercom Developer Hub - Webhook Topics
- smee.io - Webhook payload delivery service - Receives payloads then sends them to your locally running application.
config.intercomToken: The Authorization Token for your Intercom account.
In order to receive the reply and close events from Intercom, we need to configure two webhooks:
conversation.admin.repliedconversation.admin.closed
The request endpoint URL must be as same as the webhookProxyUrl setting in the config.
Do not forget to click [Save] button after you set them.
The following two environment variables will be used if the required information is not provided by the config.
process.env.WECHATY_PLUGIN_INTERCOM_TOKEN will be used if the config.intercomToken is not provided.
Learn more about the authorization token of intercom: Intercom Developers - How to get your Access Token
We receive webhook payloads with the help from <smee.io>, by proxy them to our locally running Wechaty Plugin application.
process.env.WECHATY_PLUGIN_INTERCOM_WEBHOOK_PROXY_URL will be used if the config.webhookProxyUrl is not provided.
See:
- Intercom Developer Hub - Webhook Topics
- smee.io - Webhook payload delivery service - Receives payloads then sends them to your locally running application.
Our Friday BOT are using wechaty-plugin-intercom to connect our WeChat customers to Intercom.
You can read the source code from: https://github.com/wechaty/friday/blob/master/src/plugins/intercom.ts
- Init code base
- Room message to Intercom
- Intercom message to Room (Powered by Smee.io)
Huan LI (李卓桓), Tencent TVP of Chatbot, <zixia@zixia.net>
- Code & Docs © 2020 Huan LI <zixia@zixia.net>
- Code released under the Apache-2.0 License
- Docs released under Creative Commons



