What is WeChat chatbot?
WeChat, which is owned by Chinese tech giant Tencent, has over a billion monthly users, behind Facebook's WhatsApp and Messenger.
Be that as it may, it offers far beyond just messaging, allowing its user to do everything from payments to booking flights and hotels.
One key element it has is designated "mini-programs" which are applications inside WeChat.
Automatic reply for interaction happening the WeChat Official Account chat-like screen and a chat section in a Mini Program, similar to bots integration that can be found on Facebook Messenger
Why build a WeChat bot?
WeChat has more than 1 billion daily active users, practically all of whom are in mainland China. If deploying a bot to the Chinese market is part of your growth plan, WeChat is a place you definitely want to be.
That being said, WeChat users’ expectations for bots aren’t necessarily the same as those of Facebook Messenger or Kik users. There are definitely bots on WeChat, however, as the platform has evolved, they’ve taken a back seat to non-bot apps. Among the bots that exist, you’re unlikely to find complex conversational experiences. Instead of bot-driven communication, the WeChat UX lends itself more to an app-within-app model.
If you are building a chatbot and want to deploy it to a Chinese audience, you shouldn’t find this information discouraging. Just be aware of your users’ expectations. Given WeChat’s overall structure, users may not anticipate completing a given task via conversation with a chatbot. That being said, there are bots on WeChat, and yours can be one of them.
What are the requirements for creating a WeChat chatbot?
The first step is understanding what you can and cannot do with WeChat. If you’re operating outside of China, you can’t launch a WeChat app (or a bot, which is technically a type of WeChat app) to the version of WeChat that’s available to Chinese users. In other words, if you operate outside of China, you won’t have access to the Chinese WeChat market.
That being said, if you do work in China or your organization has operations there, you can make a WeChat bot that’s available to Chinese users. You need a Chinese business license and the credentials to create an Official WeChat Account. Be sure you have these before you get started building a bot for WeChat.
To have your bot on your WeChat, you’ll also need to have a WeChat official account.You can go to https://mp.weixin.qq.com/ and create an account of any type based on your requirement.
How to build a WeChat Chatbot with Engati?
As for actually creating a bot, you can technically use any libraries, API frameworks, and other tools you want. However, you need to use the WeChat sandbox to get access to the WeChat API. Of course, if you want to deploy your chatbot on WeChat, you are going to need to have a WeChat official account. You can to https://mp.weixin.qq.com/ and create any type of account according to your organization’s requirements. To get your bot onto the WeChat platform, the WeChat Official Account system sends a GET request to the URL pointing to your backend server.
For testing purposes Engati provide a free sandbox account you can test it using this link.
The actual process of building and deploying your WeChat chatbot is rather easy. For the actual bot-building process, we have created several chatbot templates for a very wide range of use cases. You can pick any of these chatbot templates to start with and then customize your chatbot according to your business and userbase. So you don’t need to start building your chatbot from scratch. But if you do want to build your chatbot without a template, you can select a blank template and build the conversation flows yourself.
Now, let’s see how you can deploy your chatbot on WeChat.
The first thing you have to do is access Deploy workflow from the Navigation. Then look for WeChat.
1. Generate AppID and AppSecret
Login to your account and copy the AppID and AppSecret generated for your WeChat account
[Note: Google translate might convert the first character of AppID and Appsecret to uppercase. Use lowercase instead]
Go to Deploy section on Engati portal and paste the AppID and AppSecret in the fields provided. Click SAVE.
2. Webhook and WeChat token
Copy the webhook URL and wechat token from the Deploy section on Engati portal and paste it in Endpoint URL and token fields, respectively, on WeChat account page.
Save the credentials. Your WeChat bot is now ready to use.
You can scan the QR code in the sandbox account from the WeChat code scanner in the app to test the Engati chatbot.
There are a couple of things that you should keep in mind while deploying a WeChat chatbot. Firstly, WeChat does not make it possible for you to send clickable buttons via your chatbot. The channel just does not allow clickable buttons at all. This means that the ‘Send Message with options’ node on Engati would not allow your chatbot to send buttons that your users could click on. Your users would have to just reply to the bot, sending a message that shows which option they choose or even sending a message that has the option number that they want to pick. Also, when you use the ‘Send Carousel’ node on your Engati chatbot, WeChat would not let the chatbot send carousels with clickable buttons. Instead, these carousels will be sent and displayed as tiles that do not have any buttons to choose from. However, URLs can be passed on with a carousel message.