当前位置:网站首页>Call wechat customer service applet

Call wechat customer service applet

2022-04-23 14:04:00 one billion twenty-nine million one hundred and seventy-nine th

Realize the idea
Because the development of small program interface is relatively perfect , So we can directly call the customer service interface of wechat applet . But you must read the following interface documentation
(1) Customer service function guide
https://developers.weixin.qq.com/miniprogram/introduction/custom.html#%E5%8A%9F%E8%83%BD%E4%BB%8B%E7%BB%8D
(2) Customer service message usage guide
https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/customer-message.html
Realization effect
Because I don't have a server , Therefore, customer service messages use wechat third-party tools . The applet initiates to contact the customer service , The message will be pushed to your own wechat ( Service push ), The customer service can reply to the message sent by the customer .
Wechat applet sends messages ( Customer )-> Wechat's third-party tool ( Customer service )-> Reply to customer messages
Specific implementation ideas
(1) Use customer service messages on the page
Need to put button Components open-type Is set to contact, When the user clicks, it will enter the customer service session , If the user clicks on the applet message in the session , Will return to the applet , Developers can use bindcontact The event callback obtains the page path of the message selected by the user path And the corresponding parameters query.
Sample code
wxxml

<button open-type="contact" bindcontact="handleContact"></button>

js

Page({
    handleContact (e) {
        console.log(e.detail.path)
        console.log(e.detail.query)
    }
})

(2) Enter wechat public platform and bind customer service wechat
The binding of micro signals is realized according to the following operations
 Insert picture description here
(3) Scan the QR code below the bound micro signal ( Wechat customer service applet )
 Insert picture description here

(4) test
1) Wechat applet sends messages to customers Customer
 Insert picture description here
2: Wechat received a message Customer service
 Insert picture description here
3: Click the service notification to reply the message Customer service
 Insert picture description here
4: The customer received a reply from the customer service Customer
View reply
More examples and learning materials, please search WeChat official account. : The small white XBIT
 Insert picture description here

版权声明
本文为[one billion twenty-nine million one hundred and seventy-nine th]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231401298284.html