May 19, 2021 WeChat Mini Program Development Document
If the small program set up a message push, ordinary WeChat users to the small program customer service message, WeChat server will first post the message POST to the developer filled in the url, if you want to forward the message to the web version of the customer service tool, you need the developer in the response package to return MsgType transfer_customer_service message, WeChat server received a response will be sent the message to the customer service system.
After the user is connected by customer service, before the customer service closes the session, when the session is in the process, the messages sent by the user are forwarded directly to the customer service system. When the customer service is not turned off for more than 30 minutes, the WeChat server automatically stops forwarding to customer service and sends the message back to the url filled out by the developer.
While the user waits in the queue, messages sent by the user are still pushed to the url filled in by the developer.
In particular, it is important to note that only for WeChat users sent messages to forward, and for other events (such as users from small programs to arouse customer service sessions) should not be transferred, otherwise customer service in the customer service system will see some meaningless messages.
The message is forwarded to the web version of the customer service tool
The developer only returns a message from MsgType as transfer_customer_service in the response package, and when the WeChat server receives a response, it forwards the message to the customer service system.
<xml>
<ToUserName><![CDATA[touser]]></ToUserName>
<FromUserName><![CDATA[fromuser]]></FromUserName>
<CreateTime>1399197672</CreateTime>
<MsgType><![CDATA[transfer_customer_service]]></MsgType>
</xml>
Description of the parameters
Parameters | Whether it is necessary | Describe |
---|---|---|
ToUserName | Is | Recipient account number (OpenID received) |
FromUserName | Is | Developer microsyscopy |
CreateTime | Is | Message creation time (integer) |
MsgType | Is | transfer_customer_service |