WeChat applet customer service conversation function

Some mall-type mini programs will require customer service sessions. Today, I will talk about how to implement this function. It is actually very simple. The documents provided by WeChat have detailed instructions.



According to these two pictures, we can see his specific usage. Here is the detailed code for you:

  <button open-type='contact' class='kefu' session-from='weapp'>联系客服</button>
.kefu{
  width: 90%;
  background: #22ac38;
  color: #fff;
  border-radius: 50rpx;
  
}

The next step is to add your customer service account on your WeChat public platform, as shown in the following figure:


Click to enter to add customer service staff


After adding, click this online customer service function to chat


It should be noted that after I added it, I tested it on the WeChat development tool, but there was no response. I thought there was something wrong with my approach. Later, I tested it on the real machine and found that it was OK. Also, this feature only supports the WeChat web version chat tool.



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325693244&siteId=291194637