C# development of WeChat portal and applications-WeChat multi-customer service functions and development integration

高洛峰
Release: 2017-02-17 14:58:32
Original
1764 people have browsed it

最近一直在弄微信的集成功能开发,发现微信给认证账户开通了一个多客服的功能,对于客户的咨询,可以切换至客服处理的方式,而且可以添加多个客服进行处理,这个在客户咨询比较多的时候,是一个不错的营销功能。微信多客服的功能,能够在很大程度上利用客服员工资源,及时迅速对客户咨询信息进行处理,为企业带来更多的机会和市场。

默认这个多客服的功能,需要在微信公众平台中的服务中心进行主动开通,默认是不开通的,为了体验这个功能,我这里把多客服功能进行开通。

1、多客服准备工作

微信的多客服功能,对于客服的响应操作,既可以在电脑的客户端上进行操作,也可以在微信多客服助手进行信息处理,两者都能对客户的信息进行回应、结束会话等操作。

C#开发微信门户及应用-微信多客服功能及开发集成

开通微信多客服功能后,就需要添加一些处理客户信息的客服工号了。

多客服账号采用“工号@微信号”的形式进行登录,请您在登录窗口依照下图形式输入帐号信息。

C#开发微信门户及应用-微信多客服功能及开发集成

2、使用多客服客户端或助手操作

在电脑客户端上使用

C#开发微信门户及应用-微信多客服功能及开发集成

在手机客户端上进行多客服的使用,就是关注一个账号,信息通过转发到这里进行处理。关注公众号”多客服助手“就搞定了

C#开发微信门户及应用-微信多客服功能及开发集成

通过上面两种途径,能够很好处理客户的相关信息,其实也就是类似电话坐席的方式,让不同的客服员工,对来访的客户进行处理。

3、微信多客服的开发使用

在微信的多客服开发介绍中,内容介绍的比较少,如下所示。

在新的微信协议中,开发模式也可以接入客服系统。 开发者如果需要使用客服系统,需要在接收到用户发送的消息时,返回一个MsgType为transfer_customer_service的消息,微信服务器在收到这条消息时,会把用户这次发送的和以后一段时间内发送的消息转发客服系统。返回的消息举例如下。


<xml><ToUserName><![CDATA[touser]]></ToUserName><FromUserName><![CDATA[fromuser]]></FromUserName><CreateTime>1399197672</CreateTime><MsgType><![CDATA[transfer_customer_service]]></MsgType></xml>
Copy after login

而在开发的时候,我们一般把它封装为一个实体类信息,如下所示。主要就是指定消息类型,和翻转传入传出对象就可以了。

    /// <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

然后调用处理的时候,代码如下所示。

 ResponseCustomer customInfo = new ResponseCustomer(info);
 xml = customInfo.ToXml();
Copy after login

如我在客户应答处理里面,客户回应0,我就切换进入客服模式,这样客户后续所有的输入内容,均不会触发微信门户里面的解析,而转发到客服模式,让客服的工号可以和客户进行交谈了。

                //处理 0 指令, 人工客服
                if (string.IsNullOrEmpty(xml) && eventKey.Trim() == "0")
                {
                    xml = base.DealEvent(eventInfo, "event_customservice");
                }
Copy after login

而在DealEvent里面,根据这个条件进行处理就可以了。

                //人工客服
                if (eventKey == "event_customservice")
                {
                    ResponseCustomer customInfo = new ResponseCustomer(info);
                    xml = customInfo.ToXml();
                }
Copy after login

 

通过使用多客服的客户端,这样处理消息交互起来非常方便,能获得客户的对话信息了,在电脑客户端上,看到的界面如下所示。

C#开发微信门户及应用-微信多客服功能及开发集成

手机上的谈话截图如下所示。

C#开发微信门户及应用-微信多客服功能及开发集成 C#开发微信门户及应用-微信多客服功能及开发集成

# This can respond to the customer's information in a timely manner through multiple channels.

If you are interested or experience related customer service response functions, you can follow my WeChat to learn more. For specific results, you can follow my WeChat portal: Guangzhou Aiqidi, or you can scan the QR code below to learn more.

C#开发微信门户及应用-微信多客服功能及开发集成

For more C# development of WeChat portals and applications - WeChat multi-customer service functions and development integration For related articles, please pay attention to 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!