WeChat

WeChat is a Chinese multi-purpose messaging, social media and mobile payment app. With over 1 billion monthly active users, it’s the most popular chat app for Chinese-speaking people. WeChat’s social commerce platform enables users to transact with businesses for things like booking a taxi, a flight, or a doctor’s appointment. It’s like Facebook, Skype, Slack, Amazon, PayPal, and Apple Wallet all rolled up into one.

Capabilities

WeChat supports a wide variety of capabilities as seen in the channel capabilities grid. Below is a detailed view of each capabilities.

Content Types

  • Text

    Full SupportAPI
  • Image

    Full SupportAPI
  • File

    Partial SupportAPI
  • Emoji

    Full SupportAPI
  • GIF

    Full SupportAPI
  • Location

    Partial SupportAPI

Action Types

  • Link

    Full SupportAPI
  • Extensions

    Partial SupportAPI
  • Buy

    Full SupportAPI
  • Postback

    Full SupportAPI
  • Replies

    Full SupportAPI
  • Location Request

    Partial SupportAPI

Structured Messages

  • Compound Messages

    Full SupportAPI
  • Carousel

    Partial SupportAPI

Indicators

  • Conversation Start

    Full SupportAPI

Delivery Events

Delivery events allow you to track deliveries of Smooch messages to WeChat by subscribing to the message:delivery:channel webhook. Failures to deliver a message to WeChat can be detected by subscribing to the message:delivery:failure webhook.

Configuring WeChat

In order to configure WeChat, you’ll need a WeChat Official Account. You can apply for an International-Market Official Account here and for a Mainland China-Market here. Alternatively, you can also test using the sandbox.

Once you’ve created your account, you will need to go through the account verification process. In order to do so, log in to your WeChat dashboard and go to the “WeChat Certification | 微信认证” page below the Set Up section.

Once your account has been verified, go to the integration page, connect the integration, and follow these steps.

  1. In the WeChat dashboard, go to the “Basic Configuration | 基本配置” page below the Develop section and add the following IP addresses to the whitelist separated by new lines.

    • 34.224.190.28
    • 52.6.201.31
    • 52.0.232.16
  2. In the WeChat dashboard, copy and paste your App ID and App Secret on the Smooch integration page.

  3. In the WeChat dashboard, click on “Modify Configuration | 修改配置” below Basic Configuration, then copy the Webhook URL and Token from the Smooch integration page and paste it there.

  4. After saving your settings, click on Connect to WeChat to complete the integration.

Safe Mode

Optionally, you can configure “Safe Mode” in the WeChat dashboard. With this mode enabled, all outgoing messages from WeChat will be encrypted using a secure 43 character AES key.

In order to have Safe Mode functioning correctly with Smooch, simply copy your EncodingAESKey from WeChat and paste it in the WeChat integration page. Messages will be automatically decrypted in a secure fashion.

Persistent Menu

WeChat Persistent Menu

It’s possible to configure a menu on the WeChat UI by calling the Smooch REST API. WeChat allows up to two levels of menu hierarchy and they can contain 1 to 3 menu items at its first level and 1 to 5 menu items for a submenu. Menus are configured per app or per integration, not per user. Menu items can be link, postback or submenu type actions.

List

WeChat supports native list messages. List messages are a vertically scrollable set of items that may each contain text, an image and a link. Once a user clicks on an item with a link, it opens a URL. See the WeChat list section in the REST API documentation for more information on how list messages are rendered in WeChat.

wechat list

Integrate with WeChat Sandbox

WeChat offers a sandbox environment to easily test their messaging features similar to an official account. Using your WeChat user account on your mobile phone, scan the QR code and log in to the WeChat Sandbox dashboard.

  1. In the WeChat Sandbox dashboard, the “Test Numbers | 测试号信息” section will provide you with an App ID and App Secret to be entered into the Smooch integration page.

  2. In the “Interface Configuration | 接口配置信息” section, click on “Modification | 修改” and enter the Webhook URL and Token from the Smooch integration page.

  3. After saving your settings, click on Connect to WeChat to complete the integration.

In the “Test QR Code | 测试号二维码” section, scan your Sandbox QR code to message your WeChat Sandbox account.