The Things You Need to Know before Start Your WeChat Development

Kai Yang
7 min readMay 8, 2020

WeChat is one of the most popular messaging and social apps in the world. With over 900 million monthly active users, the app is fully integrated into people’s daily life in China.

For people who is familiar with WeChat, it is not just an app, but also a large ecosystem that integrates with almost anything, well, at least in China. From booking a taxi, to ordering a coffee/milktea, or getting a movie ticket. WeChat has made almost everything possible without letting its users leaving its ecosystem.

There could be so many different factors that lead to the big success of WeChat, however, one of them cannot be simply neglected, that is the WeChat solution or platform itself. I won’t dive too much into WeChat history, since it is not the main purpose of this article. But if you are interested in how WeChat app has evolved into its form today, I can recommend some articles for you later. The focus of this article is on the two big functional arms of the WeChat platform: the WeChat Official Account, and the WeChat Mini-Program.

WeChat Official Account (OA)

In a Nutshell, WeChat Official Account (OA) is a functional module on the WeChat ecosystem, that allows companies/businesses to formally engage with its customers in the form of subscription. Users who subscribe/follow to an WeChat Official Account can receive media content published by the account owner, this includes Article Posts, Videos, Audios or Text messages.

From functional perspective, there are three types of WeChat Official Account: Subscription Account, Service Account, and Enterprise Account. However, there are different categorizations of WeChat OA. For example, from the way or the entity that the account is registered, they can be classified into Personal Account, Domestic Company Account, and International/Overseas Company Account. To make it even more confusing, each account type may have different functionalities dependent on its entity (Domestic Company or International Company) and account type. This might be due to the fact that WeChat started with a focus on the Chinese domestic market, and later on started its global expansion. Anyway, here we will focus on the three functional types: Subscription Account, Service Account, and Enterprise Account, and briefly go through each.

Subscription Account

WeChat Subscription Account focuses on content creation and publishing, and it is the only account type that is open to both individuals and companies. Individual users can use this type of account for their blogs, while company users can use it for news updates or marketing communication.

WeChat allows all Subscription accounts to publish 1 WeChat Post per Day, and each Post can have up to 6 articles. This is quite high when comparing to the 4 Posts per Month limit on the Service account. Hence this account type is more popular for content creation and publishing.

All subscription account and their post articles are put together into the WeChat Subscriptions folder, this makes them less visible on the WeChat UI, however, much easier to read. Going through the Subscriptions article list is similar as going through my news feed, except this one doesn’t have any Ads. Well, at least for now.

WeChat Subscription Accounts

Functional wise, Subscription accounts have less functionalities as comparing to Service accounts. For people who wants to work on WeChat developement, Subscription account will not have functions such as Template Messages, Custom QR Code, WeChat Payment, or WeChat Store functions. Again this re-highlights the primary use case of Subscription account, which is for content creation and publishing. In addition, from 2014 WeChat no longer provides verification to Individual Subscription accounts, this means the end of support for development using individual subscription accounts. However, subscription accounts registered under company entities still remains under support. Again, most WeChat development for Subscription account is to support its messaging and content publishing capability.

Service Account

As its name says, WeChat Service accounts are often used in more service oriented ways. From customer support, to online shopping and payment, Service accounts allow companies to build more engaging and functional rich interactions with their followers.

Comparing to subscription accounts, service accounts only have 4 Posts limit per month. Even the limit is quite low, most companies still find it is enough for brand building and information updates. On top of that, the more diverse functionalities that comes with the service account make it a lot more popular to Subscription account. When it comes to WeChat development, this is the primary WeChat OA account type recommended.

Basic features that come with Service account include Article publishing, Customer Support via messages and auto-responses, Custom QR Code creation, Template Messages, etc. There are also more advanced functionalities such as WeChat Pay, WeChat Store and Online shopping. However, those functionalities require separate application process to activate. Personally, this is the my favorite OA type out of the three, given its rich functionalities.

Enterprise Account

Last and maybe also the least, the least popular account type is the Enterpise Account. Till now I still don’t fully understand the reason that WeChat put this type of account together with the other two, as their purposes are completely different. While the previous two WeChat OAs are used to help companies build engagement with their customers or followers, the Enterprise Account is more like an internal communication tool. To me, it feels like someone put Twitter, Facebook and Microsoft Team together, then the question is Why?!

Despite the strange classifications of three different types of OA, Tencent the parent company of WeChat has spent a lot of efforts selling this account. Some people see it as the competitor to DingTalk from Alibaba Cloud, or Microsoft Team. I won’t give any comments here to that comparison, as personally, I never used it. Anyway, when it comes to WeChat development, this account type is out of the selection box, as it doesn’t have any WeChat API support.

What can we build using OA

Overall the WeChat Official Account is one of the most popular functional modules in the WeChat platform. There are millions of active OA available on WeChat, while most of them are used for customer engagement or marketing communication, some people use it for developing games or providing services.

One Official Account I’ve used recently, allows its followers to create photo Album and upload photos into it by sending the photos to the Official Account. Once subscribe to the OA, followers can create their own photo Albums by messaging pre-defined command/text to the OA. Once the Album is created, users can then upload photos to it by sending photos to the OA, and the OA will automatically put the received photo into the created Album.

A lot of the WeChat OA services are quite simple and free for use. If you want to create a simple WeChat program, WeChat OA or most specifically WeChat Service account is a good option to start with. However, for a more complex use cases or scenarios, you will need to use WeChat Mini-Program.

WeChat Mini-Program

If you think building a WeChat OA integration is like driving a car, then building a WeChat Mini-Program will be like flying a jet. Yes, it is more fun, but also more complex to master. To give you a quick idea of what WeChat Mini-Program is, a WeChat mini-program is an app that runs inside the WeChat platform. If you are an iPhone user, think it as an App that only runs inside WeChat. Actually, same rule applies to Android users.

WeChat Mini-Program was originally born as an Javascript plugin (WeixinJSBridge) that allows developers quickly add dynamic behaviors that run in WebView. Since WeChat uses WebView or a customized version of WebView for content renderring, it has native support to HTML, JavaScript and CSS.

WeixinJSBridge.invoke('imagePreview', {
current: 'http://inews.gtimg.com/newsapp_bt/0/1693121381/641',
urls: [
'https://img1.gtimg.com/10/1048/104857/10485731_980x1200_0.jpg',
'https://img1.gtimg.com/10/1048/104857/10485726_980x1200_0.jpg',
'https://img1.gtimg.com/10/1048/104857/10485729_980x1200_0.jpg'
]
}, function(res) {
console.log(res.err_msg)
})

With an increasing number of people start to use the Javascript plugin (WeixinJSBridge) in WeChat, the company decided to officially launch it, as its Javascript library support in 2015, which is known as the WeChat JS-SDK. By doing so, WeChat has formalised the way Developers can use Javascript in WeChat content. The initial JS library (WeixinJSBridge) has become the official WeChat JS SDK (wx).

wx.previewImage({
current: 'https://img1.gtimg.com/10/1048/104857/10485726_980x1200_0.jpg',
urls: [
'https://img1.gtimg.com/10/1048/104857/10485731_980x1200_0.jpg',
'https://img1.gtimg.com/10/1048/104857/10485726_980x1200_0.jpg',
'https://img1.gtimg.com/10/1048/104857/10485729_980x1200_0.jpg'
],
success: function(res) {
console.log(res)
}
})

The WeChat JS-SDK comes with a long list of functionalities with integration to WeChat and user’s smart phone. This includes Camera, Voice Recording, QR Code scan, Geolocation, Payment, etc. The library has opened a whole new world to people who are interested in WeChat Development.

However, the first version of JS-SDK comes with its limitation. Since the scripts are loaded from server side, there is often a small gap before the content are fully rendered, hence giving a bad user experience. In addition, web browsers often mix both logic layer (JS Core) and rendering layer (DOM) together, even this gives the flexibility of manipulating rendering layer inside the logic layer, e.g JQuery, ReactJS. However, for resource limited environment such as the mobile phone, it has bad performance. To solve those issues, the engineers at WeChat decide to split the Logic layer from the Rendering layer, which leads to the creation of WeChat Mini-Program platform.

That is why WeChat Mini-Program is very similar to Javascript web app, but yet different from it. For web app development, we can use normal browsers to debug and develop the application. However, in WeChat we will need to use the WeChat IDE for development.

To start building your first WeChat Mini-Program, you will need to register for a WeChat MP account, and download the WeChat IDE. For a complete guide on how to setup your Development environment for WeChat Mini-Program, i recommend this article from Adrien. It has all the information you need to get ready for your WeChat MP development.

Hope the information covers so far will give you a good understanding of what WeChat and WeChat development is about. I will write separate articles on how to build WeChat OA programs and how to build WeChat Mini-Program. If you are interested, please follow my account.

--

--

Kai Yang

Ph.D in Semantic Web, Multi-Cloud Technical Leadship, WeChat Development Veteran, Polyglot Coder with Love