C# develops WeChat multi-customer service functions and develops integration examples

高洛峰
Release: 2017-03-31 15:10:48
Original
3229 people have browsed it

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.

C# develops WeChat multi-customer service functions and develops integration examples

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.

C# develops WeChat multi-customer service functions and develops integration examples

2. Use multiple customer service clients or assistants to operate

Use on the computer client

C# develops WeChat multi-customer service functions and develops integration examples

## To use multiple customer service on the mobile client, you need to follow an account, and the information will be forwarded here for processing. Follow the official account "Multiple Customer Service Assistant" and you'll be done.

C# develops WeChat multi-customer service functions and develops integration examples

Through the above two methods, the relevant information of customers can be well processed. In fact, it is similar to the method of telephone agents, allowing different customer service employees to conduct interviews with visiting customers. deal with.

3. Development and use of WeChat multi-customer service

In the introduction to WeChat multi-customer service development, there is relatively little content, as shown below.

In the new WeChat protocol, the development mode can also be connected to the customer service system. If developers need to use the customer service system, they need to return a message with MsgType of transfer_customer_service when receiving a message from the user. When the WeChat server receives this message, it will combine what the user sent this time and what will be sent in the future. Message forwarding customer service system. Examples of returned messages are as follows.

<xml>
<tousername></tousername>
<fromusername></fromusername>
<createtime>1399197672</createtime>
<msgtype></msgtype>
</xml>
Copy after login
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;
        }
    }
Copy after login
Then when calling processing, the code is as follows.

 ResponseCustomer customInfo = new ResponseCustomer(info);
 xml = customInfo.ToXml();
Copy after login
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");
                }
Copy after login
In DealEvent, it can be processed according to this condition.

                //人工客服
                if (eventKey == "event_customservice")
                {
                    ResponseCustomer customInfo = new ResponseCustomer(info);
                    xml = customInfo.ToXml();
                }
Copy after login
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.

C# develops WeChat multi-customer service functions and develops integration examples

The screenshot of the conversation on the phone is shown below.

           

                C# develops WeChat multi-customer service functions and develops integration examplesC# develops WeChat multi-customer service functions and develops integration examples

In this way, we can respond to customer information in a timely manner through multiple channels.

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!