


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
