# How to Use Customer Service Messaging
To enrich service capabilities and improve the quality of Mini Programs services, Weixin provides a customer service messaging capability for Mini Programs. It allows users to conveniently communicate with service providers of the Mini Programs.
# Feature Description
Users can communicate with customer service personnel of the Mini Program by using the Mini Program customer service messaging feature.
There are two entries to customer service message sessions:
Within the Mini Program: If developers add the Customer Service Message Button Component to the Mini Program, users can initiate a customer service session page and send messages within the Mini Program.
Outside of the Mini Program: All customer service messages of previously used Mini Programs are displayed in the Mini Program Customer Service Messages chat on the Chats screen in Weixin. Users can view past customer service messages and send messages to Mini Program customer service personnel outside of the Mini Program.
Conditions for Delivering Customer Service Messages: Mini Program users initiate customer service sessions within Mini Programs or send messages to the customer service personnel of the Mini Programs. For the time limit and maximum number of delivered messages, see Delivery Conditions for customer service messages.
Customer Service Message Type: Text and picture messages are supported.
Mini Programs can deliver customer service messages in the following ways based on the requirements of the Mini Program developers: 1. Call the customer service messaging API. 2. Use the customer service tool for web on the Weixin Official Accounts Platform.
# Delivery Conditions
When a user interacts with the customer service personnel of a Mini Program by performing a specific action (see below description for the specific action list), the Mini Program can deliver customer service messages to the user.
The allowed action is listed below. The time limit and maximum number of delivered messages vary depending on triggered actions. When the maximum number of delivered messages is reached, an error code is returned.
User Action | Maximum Number of Delivered Messages | Time Limit |
---|---|---|
The user sends a message. | 5 | 48 hours |
The numbers of customer service messages that can be delivered are not accumulated. The preceding user action will update the maximum number of delivered messages and the time limit in real time.
# Sending a Customer Service Message by Calling the Customer Service Messaging API
When a user sends a message to the Mini Program's customer service personnel, the Weixin server posts data packets (in JSON or XML format) of the message (or event) to the URL entered by the developer. After receiving this request, the developer can call this API to asynchronously reply the request.
If the customer service message authorizations set of the Mini Program is granted to a third-party platform, all customer service messages are pushed to the third-party platform's server, but not to the developer's server or the customer service tool for web.
# Entering Message Pushing Configurations
Log in to the Mini Program, and choose Settings > Development Settings > Message Pushing to enable the message pushing feature and configure related information (including the server address, token, and encryption method).
After the message pushing feature is enabled and server configurations are specified, all the messages sent by the user and events that the developer needs to push are forwarded by the Weixin server to the URL entered by the developer.
# API Call
Mini Program's Customer Service Messaging API Documentation
# Customer Service Tool for Web Vs. Customer Service Tool for Mobile
On Mini Programs, you can reply customer service messages by using the Customer Service Tool for Web on Weixin Official Accounts Platform or the Mobile Mini Program's Customer Service Assistant.
QR Code of the Customer Service Assistant Mini Program
If the message pushing feature is disabled for a Mini Program, messages sent by users will be forwarded to the Mini Program's customer service tools for web and for mobile. Then, customer service personnel can gain access to the tools to reply the users.
If the customer service message authorizations set of the Mini Program is granted to a third-party platform, all customer service messages are pushed to the third-party platform's server, but not to the developer's server or the customer service tool for web.
Note: The event indicating "The user enters a session via the customer service message button" will not be forwarded to the customer service tool for web.
# Linking Customer Service Personnel
The Mini Program administrator must link customer service personnel to the Mini Program console before the Mini Program's customer service tools for web and for mobile are put into use. A Mini Program can be linked to a maximum of 100 customer service personnel.
# How to Use the Customer Service Assistant Mini Program
# Login and access
Customer service personnel linked to a Mini Program can search for "Customer Service Assistant" or scan the QR code in Weixin and select the Mini Program account to log in to the customer service assistant Mini Program. After login, they can view users who chatted with the Mini Program and select a user to start chatting.
# Change the state of the customer service
Customer service personnel can click the online state icon to switch between online and offline states. If the online state is selected, notifications for user messages can be received on Service Notifications even if the customer service personnel exit the customer service Mini Program. If the offline state is selected, customer service personnel cannot receive customer messages and message notifications.
# Receiving and sending customer service messages
When customer service personnel log in to a Mini Program for the first time, the customer service message page is automatically displayed. To view a new customer service message subsequently, they can tap the top access bar to open the customer service message page. For connected sessions, customer service personnel can chat with users within 48 hours. Text and picture messages are supported in the chats.
# How to Use the Customer Service Tool for Web on the Weixin Official Accounts Platform
# Login and access
Customer service personnel linked to a Mini Program can scan the QR code and select the Mini Program account to log in to the Customer Service Tool for Web on the Weixin Official Accounts Platform. After login, they can view users who chatted with the Mini Program and select a user to start chatting.
# Change the state of the customer service
Customer service personnel can click the online state icon to switch between online, offline, and exit states.
# Receiving a message
Manual Access: After going online, customer service personnel can click Pending Access to manually access a to-be-replied chat in the Pending Access list.
Automatic Access: If there are too many chats in pending access state, customer service personnel can choose Setting > Access Setting to enable automatic access.
Re-Access: Customer service personnel need to re-connect to activate a chat if they log out or the chat lasts for more than half an hour.
# Sending a message
For connected sessions, customer service personnel can chat with users within 48 hours. Text and picture messages are supported in the chats.
# Usage Conventions
In addition to the Weixin Mini Program Platform Operating Regulations, customer service personnel who use the Mini Program's customer service messaging feature must obey the following rules, including but not limited to:
- Do not maliciously induce users to perform an operation to trigger customer service message delivery.
- Do not harass users by delivering messages that are unrelated to messages sent by the users or that annoy the users.
- Do not conduct malicious marketing campaigns by delivering content that is suspected of containing false or obviously exaggerated or illegal marketing information.
- Do not deliver customer service messages that contain false, lewd, or violent information or content that violates national laws and regulations.