Resources: Template Messages

All resources

Template Messages is the main interface that is used to perform communication between the WeChat user and the external client's system. There are two main types of Template Messages: Pull and Push. A Pull type is used when the request to the system is  triggered from the WeChat channel (for example, the user clicks on WeChat channel menu and makes a self-check). A Push type is used for notifications where the external system want to send an update(s) to specific user through the WeChat Channel. Additionally, a Pull message can be used as Push message but not vice versa.

To handle requests from WeChat Gateway your system should support  API(Swagger UI). Please note that your system should not necessarily support both endpoints (with and without input parameter). Also, your system can have several endpoints for different requests.

Information that is required to create new Template Message is shown below: 

Template Message UI

Name - this is the  name of the template message (where you are using multiple template messages 'name' allows you to differentiate between the messages).

Alias - this is used for notifications. When the external system wants to send a message to a specific user it should specify the exact Template Message to be used to enable the final message to be generated. 

Type - either Pull or Push. Enter Pull for messages that are to be used and will display within the WeChat channel menu when the user triggers a request. Enter Push for notifications that will be sent from the external system to WeChat user within the WeChat channel. 

Request Path -Enter the endpoint that will be used to handle a request. This could be either a fully qualified URL ( or a path (/handler-wechat-request) in which case a Service domain from Integration Specification will be used.

Credentials - Enter the credentials that will be used to perform the authorization request. You must  setup the credentials as described here before proceeding with setting up Template messages.

Input Required checkbox - sometimes inorder to perform a request, the external system may require additional information from the WeChat user. For example: the user clicks on the WeChat menu item named "Get article status". To proceed with this request, the external system requires an article id to be entered by the WeChat user. When Input Required is checked WeChat Gateway will send a text from Ask Message to the user to ask for this additional input. When the user submits the additional information to  the WeChat channel WeChat Gateway will transmit that input information back to the external system.

Ask message - text that will be send to user when the external system requireds additional information from user in order to complete the request. 

Response Type - either List or Object. Based on which of these two values you select you have different options for writing the template message. Please check Template Message Syntax for more information

Developer Description  -  the Developer is responsible for the data contained in the response from the external system (JSON object fields) and a Manager (possibly a non-technical person) is responsible for actual template message text. Within this area the Developer should  describe what fields the Manager can use to create the template message.

Template message - the actual template what will be used along with response from the external system to generate  the final message to the WeChat user. Refer to  Template Message Syntax for more information.