In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the example analysis of the development of multi-customer service on Wechat public platform, which has a certain reference value. Interested friends can refer to it. I hope you will learn a lot after reading this article. Let the editor take you to know it.
1. Reply to multiple customer service messages
In the new Wechat agreement, the development mode can also be connected to the customer service system. If a developer needs to let a user use the customer service system, he needs to return a message with a MsgType of transfer_customer_service when he receives the message sent by the user. When receiving this message, the Wechat server will forward the message sent by the user this time and within a period of time to the customer service system.
Examples of messages returned are as follows
1399197672
The implementation of this message is as follows
/ / reply to multi-customer service message private function transmitService ($object) {$xmlTpl = "% s"; $result = sprintf ($xmlTpl, $object- > FromUserName, $object- > ToUserName, time ()); return $result;} II. Trigger multi-customer service session
In general, when users want to ask questions, they often ask questions like "Hello" and "Hello".
We use these words as trigger keywords, and when the text message sent by the user contains these words, a multi-customer service message is returned to the user (the user does not feel any content on Wechat. However, the Wechat public account will forward the user's messages to customer service this and for some time to come).
The implementation code is as follows:
/ / receive text messages private function receiveText ($object) {$keyword = trim ($object- > Content); if (strstr ($keyword, "complaint") | | strstr ($keyword, "Hello") | | strstr ($keyword, "Hello") {$result = $this- > transmitService ($object);} return $result;} III, complete code IV, other notes
1. After testing, the multi-customer service message is returned in the custom menu, and the user cannot enter the multi-customer service state.
two。 After using multi-customer service messages, all subsequent messages will be forwarded as customer service messages within a period of time, and the automatic reply under the original development mode will be invalid!
Thank you for reading this article carefully. I hope the article "sample Analysis of Multi-customer Service in the Development of Wechat Public platform" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.