# wx.miniapp.openCustomerServiceChat
Support call the interface to pull up the WeChat customer service function. After the mobile application (APP) is connected to this function, the user can pull up the specified WeChat customer service session from the APP. This feature has been opened to all developers, developers in the WeChat has been certified open platform account. After the application approved by the mobile application and shelves, you can get the mobile application pull up WeChat customer service functional permissions.
# Instructions
# Account Requirements
To use this feature, mobile application developers must meet the following conditions:
- WeChat open platform account has been verified
- Mobile Application Approval and Listing
Note: If the mobile app is not available, you can only pull up to 100 WeChat customer service times./Days, to meet debugging needs.
# Association Dxplaination
Mobile application can only pull up the WeChat customer service with binding relationship, the developer needs to go to the WeChat customer service official website to complete the mobile application(appid)Binding to the enterprise id.
Note: A maximum of 15 enterprise IDs are bound to an appid
# Precautions before Access
- This ability dependsWeChat Open SDK , need to follow the guidelines in theWeChat Open PlatformCreate a mobile application account to complete the relevant initialization configuration, details can be viewedWeChat mobile application capability initialization guidelines
# parameter
Easy for developers to understand, wx.miniapageopenCustomerServiceChat Parameters andWeChat Open Platform opensdk APP pulls up WeChat customer service functionConsistent parameters
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
corpId | string | - | yes | Enterprise id Developers need to go to the WeChat customer service official website to complete the mobile application(appid)Binding to the enterprise id. |
url | string | - | yes | Customer Service URL |
# Call Example
wx.miniapp.openCustomerServiceChat({
corpId: 'xxxx', // Enterprise id
url: 'https://work.weixin.qq.com/kfid/kfcxxxxx',
complete(res) {
console.error('miniapp.openCustomerServiceChat', res)
},
success(res) {
wx.showToast({
title: "Success: Sharing Pictures"
})
},
fail() {
wx.showToast({
title: "Failure: Sharing Pictures"
})
}
})