Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

wechaty-plugin-intercom

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wechaty-plugin-intercom

Wechaty Intercom Plugin helps you build better customer relationships through WeChat across the customer journey.

latest
Source
npmnpm
Version
0.4.2
Version published
Weekly downloads
8
-11.11%
Maintainers
1
Weekly downloads
 
Created
Source

wechaty-plugin-intercom Wechaty Plugin Intercom

NPM Version NPM

Intercom is a Conversational Relationship Platform (CRP).

Wechaty Intercom Plugin helps you build better customer relationships through WeChat across the customer journey.

Wechaty Plugin Intercom

Powered by Wechaty TypeScript

Introduction

Wechaty Intercom Plugin helps you to manage your customers/leads/users in the WeChat Room, with the power of the Intercom service.

Usage

import { WechatyIntercom } from 'wechaty-plugin-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)

Configure Intercom Webhooks

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.

Intercom Webhooks

Do not forget to click [Save] button after you set them.

Environment Variables

The following two environment variables will be used if the required information is not provided by the config.

1 WECHATY_PLUGIN_INTERCOM_TOKEN

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

2 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.

See:

Screenshot

Wechaty Intercom Conversation

Example

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

History

v0.4 master

  • Rename at to mention in config.

v0.2 (Jun 2020)

  • Init code base
  • Room message to Intercom
  • Intercom message to Room (Powered by Smee.io)

Contributors

contributor contributor contributor contributor contributor contributor contributor contributor

Author

Huan LI (李卓桓), Tencent TVP of Chatbot, <zixia@zixia.net>

Profile of Huan LI (李卓桓) on StackOverflow

  • Code & Docs © 2020 Huan LI <zixia@zixia.net>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

Keywords

wechaty

FAQs

Package last updated on 14 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts