WeChat customer service management
Customer Service Management
##Get basic customer service information
Call instructions
12 | http request method: GET ##https://api.weixin.qq.com/ cgi-bin/customservice/getkflist?access_token=ACCESS_TOKEN
|
Return instructions
Return data example (JSON return result when correct):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | { "kf_list" : [ { "kf_account" : "test1@test", "kf_headimgurl" : "http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjfUS8Ym0GSaLic0FD3vN0V8PILcibEGb2fPfEOmw/0", "kf_id" : "1001", "kf_nick" : "ntest1", "kf_wx" : "kfwx1" }, { "kf_account" : "test2@test", "kf_headimgurl" : "http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjfUS8Ym0GSaLic0FD3vN0V8PILcibEGb2fPfEOmw/0", "kf_id" : "1002", "kf_nick" : "ntest2", "kf_wx" : "kfwx2" }, { "kf_account" : "test3@test", "kf_headimgurl" : "http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjfUS8Ym0GSaLic0FD3vN0V8PILcibEGb2fPfEOmw/0", "kf_id" : "1003", "kf_nick" : "ntest3", "invite_wx" : "kfwx3", "invite_expire_time" : 123456789, "invite_status" : "waiting" } ] } |
Parameter description
Description | |
Complete customer service account, the format is: account prefix@public account WeChat ID | |
Customer service nickname | |
Customer service number | |
kf_headimgurl | Customer service avatar |
kf_wx | If the customer service account has been bound Customer service staff's WeChat ID, The WeChat ID is displayed here |
invite_wx | If the customer service account has not been bound to WeChat ID , but a binding invitation has been initiated, The WeChat ID of the binding invitation is displayed here |
If the customer service account has not been bound to WeChat ID, but a bound invitation has been initiated, The expiration time of the invitation is the unix timestamp | |
The status of the invitation includes "waiting" waiting for confirmation, "rejected" being rejected, | expired "expired" |
12 | #http request method: GET
|
##123 4567891011 121314151617 | Return data example (JSON return result when correct):
{
"kf_online_list" : [
"kf_account" {
"kf_account" " : "test1@test" ,
"status" : 1, "kf_id" : "1001" , "accepted_case" : 1 }, { "kf_account" : "test2@test" , "status" : 1, "kf_id" : "1002" , "accepted_case" : 2 } ] } |
Parameter Description
Parameters | Description |
kf_account | Complete customer service account, the format is: account prefix@public WeChat ID |
status | Customer service online status, currently: 1. web online |
kf_id | Customer service number |
accepted_case | The number of sessions currently being received by customer service |
##Call instructions
1234567 | http request method: POST
https://api.weixin.qq.com/customservice/kfaccount/ add?access_token=ACCESS_TOKEN
POST data example is as follows:
{
"kf_account" : "test1@test",
"nickname" : "Customer Service 1"
}
|
参数 | 说明 |
kf_account | 完整客服帐号,格式为:帐号前缀@公众号微信号,帐号前缀最多10个字符,必须是英文、数字字符或者下划线,后缀为公众号微信号,长度不超过30个字符 |
nickname | 客服昵称,最长16个字 |
Return description
##123 45 | Return data example (JSON return result when correct):
{
"errcode" : 0,
"errmsg" : "ok"
##}
|
Return code | Description |
0 | Success |
65400 | API is not available, that is, the new customer service function has not been activated/upgraded |
65403 | The customer service nickname is illegal |
65404 | Customer service account is illegal |
65405 | The number of accounts has reached the upper limit, and you cannot add any more |
65406 | Existing customer service accounts |
Invitation to bind customer service account
The newly added customer service account cannot be used directly. Only customer service staff can bind it with WeChat ID. After you have set up a customer service account, you can log in to the web customer service for operations. This interface initiates a binding invitation to the customer service staff's WeChat ID. The customer service staff needs to confirm with the WeChat ID on the WeChat client before the account can be used. Accounts that have not been bound to WeChat ID can be bound to the invitation operation. If the invitation has not expired, the account cannot be bound to WeChat ID to invite again.
Call instructions
1 2 3 4 5 6 7 | ##http request method: POST
https://api.weixin.qq.com/customservice/kfaccount/inviteworker?access_token=ACCESS_TOKEN
POST data examples are as follows: { "kf_account " : "test1@test", "invite_wx" : "test_kfwx" } |
Parameter Description
参数 | 说明 |
kf_account | 完整客服帐号,格式为:帐号前缀@公众号微信号 |
invite_wx | 接收绑定邀请的客服微信号 |
Return description
##123 45 | Return data example (JSON return result when correct):
{
"errcode" : 0,
"errmsg" : "ok"
##}
|
Return code | Description |
0 | Success |
65400 | API is not available, that is, it has not been activated/upgraded to the new version of customer service |
65401 | Invalid customer service account |
65407 | The invitee is already the customer service of this official account |
65408 | This public account has sent an invitation to this WeChat ID |
65409 | Invalid WeChat ID |
65410 | The number of invitees bound to official customer service accounts has reached the upper limit (currently each WeChat account can be bound to up to 5 official customer service accounts) |
65411 | This account already has an invitation waiting for confirmation and cannot be invited again |
65412 | This account has been bound to WeChat ID , cannot invite |
Set customer service information
Call instructions
1 2 3 4 5 6 7 | http request method: POST https://api.weixin.qq.com/customservice/kfaccount/update?access_token =ACCESS_TOKEN POST data example is as follows: { "kf_account" : "test1@test", "nickname" : "Customer Service 1" } |
Parameter Description
参数 | 说明 |
kf_account | 完整客服帐号,格式为:帐号前缀@公众号微信号 |
nickname | 客服昵称,最长16个字 |
Return description
1 2 3 4 5 | Return data example (JSON return result when correct): { "errcode" : 0, "errmsg" : "ok" } |
Main return code
Return code | Description |
0 | Success |
65400 | API is not available, that is, the new version of customer service function has not been activated/upgraded |
65401 | Invalid customer service account |
65403 | Customer service nickname is illegal |
##Upload customer service avatar
Call instructions