use node v16
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-intercom' const config = { room: 'room_id@chatroom', mention: 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
config.mention
true
@
config.webhookProxyUrl
semee.io
config.intercomToken
In order to receive the reply and close events from Intercom, we need to configure two webhooks:
conversation.admin.replied
conversation.admin.closed
The request endpoint URL must be as same as the webhookProxyUrl setting in the config.
request endpoint URL
webhookProxyUrl
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.
WECHATY_PLUGIN_INTERCOM_TOKEN
process.env.WECHATY_PLUGIN_INTERCOM_TOKEN will be used if the config.intercomToken is not provided.
process.env.WECHATY_PLUGIN_INTERCOM_TOKEN
Learn more about the authorization token of intercom: Intercom Developers - How to get your Access Token
WECHATY_PLUGIN_INTERCOM_WEBHOOK_PROXY_URL
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.
process.env.WECHATY_PLUGIN_INTERCOM_WEBHOOK_PROXY_URL
See:
Our Friday BOT are using wechaty-intercom to connect our WeChat customers to Intercom.
wechaty-intercom
You can read the source code from: https://github.com/wechaty/friday/blob/master/src/plugins/intercom.ts
Release v1.0 of Wechaty Intercom Plugin.
wechaty-plugin-intercom
at
mention
Huan LI (李卓桓), Tencent TVP of Chatbot, <zixia@zixia.net>
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
wechaty-intercom
Intercom is a Conversational Relationship Platform (CRP).
Wechaty Intercom Plugin helps you build better customer relationships through WeChat across the customer journey.
Introduction
Wechaty Intercom Plugin helps you to manage your customers/leads/users in the WeChat Room, with the power of the Intercom service.
Usage
config.room: The room id of your service WeChat room.config.mention: 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.config.intercomToken: The Authorization Token for your Intercom account.Configure Intercom Webhooks
In order to receive the reply and close events from Intercom, we need to configure two webhooks:
conversation.admin.repliedconversation.admin.closedThe
request endpoint URLmust be as same as thewebhookProxyUrlsetting in theconfig.Environment Variables
The following two environment variables will be used if the required information is not provided by the config.
1
WECHATY_PLUGIN_INTERCOM_TOKENprocess.env.WECHATY_PLUGIN_INTERCOM_TOKENwill be used if theconfig.intercomTokenis not provided.Learn more about the authorization token of intercom: Intercom Developers - How to get your Access Token
2
WECHATY_PLUGIN_INTERCOM_WEBHOOK_PROXY_URLWe 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_URLwill be used if theconfig.webhookProxyUrlis not provided.See:
Screenshot
Example
Our Friday BOT are using
wechaty-intercomto connect our WeChat customers to Intercom.You can read the source code from: https://github.com/wechaty/friday/blob/master/src/plugins/intercom.ts
History
v1.0 (Oct 23, 2021)
Release v1.0 of Wechaty Intercom Plugin.
v0.4 master
wechaty-plugin-intercomtowechaty-intercom.attomentionin config.v0.2 (Jun 2020)
Contributors
Author
Huan LI (李卓桓), Tencent TVP of Chatbot, <zixia@zixia.net>
Copyright & License