


C# develops WeChat multi-customer service functions and develops integration examples
I have been developing the integrated function of WeChat recently, and found that WeChat has opened a multi-customer service function for certified accounts. For customer inquiries, you can switch to the customer service processing method, and you can add multiple customer service for processing. This is in It is a good marketing function when there are many customer inquiries. The multi-customer service function of WeChat can make full use of customer service staff resources to process customer consultation information promptly and quickly, bringing more opportunities and markets to the enterprise.
By default, this multi-customer service function needs to be actively activated in the service center in the WeChat public platform. It is not activated by default. In order to experience this function, I will activate the multi-customer service function here.
1. Multi-Customer Service Preparation
WeChat’s multi-customer service function, for customer service response operations, can be operated on the computer client or through the WeChat multi-customer service assistant. Processing, both can respond to customer information, end sessions, etc.
After activating the WeChat multi-customer service function, you need to add some customer service IDs for handling customer information.
Multiple customer service accounts use the form of "work ID@WeChat ID" to log in. Please enter the account information in the login window as shown below.
2. Use multiple customer service clients or assistants to operate
Use on the computer client
<xml> <tousername></tousername> <fromusername></fromusername> <createtime>1399197672</createtime> <msgtype></msgtype> </xml>During development, we usually encapsulate it as an entity class information, as shown below. The main thing is to specify the message type and flip the incoming and outgoing objects.
/// <summary> /// 客服消息 /// </summary> [System.Xml.Serialization.XmlRoot(ElementName = "xml")] public class ResponseCustomer : BaseMessage { public ResponseCustomer() { this.MsgType = ResponseMsgType.transfer_customer_service.ToString().ToLower(); } public ResponseCustomer(BaseMessage info) : this() { this.FromUserName = info.ToUserName; this.ToUserName = info.FromUserName; } }Then when calling processing, the code is as follows.
ResponseCustomer customInfo = new ResponseCustomer(info); xml = customInfo.ToXml();If I am in customer response processing and the customer responds 0, I will switch to customer service mode, so that all subsequent inputs by the customer will not trigger the analysis in the WeChat portal, but will be forwarded to customer service mode. Allow customer service staff to chat with customers.
//处理 0 指令, 人工客服 if (string.IsNullOrEmpty(xml) && eventKey.Trim() == "0") { xml = base.DealEvent(eventInfo, "event_customservice"); }In DealEvent, it can be processed according to this condition.
//人工客服 if (eventKey == "event_customservice") { ResponseCustomer customInfo = new ResponseCustomer(info); xml = customInfo.ToXml(); }By using a multi-customer service client, it is very convenient to process messages and interact, and you can obtain the customer's conversation information. On the computer client, the interface you see is as follows.
The above is the detailed content of C# develops WeChat multi-customer service functions and develops integration examples. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 English version
Recommended: Win version, supports code prompts!

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool