public class WxCpKfServiceImpl extends Object implements WxCpKfService
| 构造器和说明 |
|---|
WxCpKfServiceImpl() |
| 限定符和类型 | 方法和说明 | ||
|---|---|---|---|
WxCpKfAccountAddResp |
addAccount(WxCpKfAccountAdd add)
添加客服帐号,并可设置客服名称和头像。
|
||
WxCpKfServicerOpResp |
addServicer(String openKfid,
List<String> userIdList)
接待人员管理
添加指定客服帐号的接待人员,每个客服帐号目前最多可添加500个接待人员。
|
||
WxCpKfCustomerBatchGetResp |
customerBatchGet(List<String> externalUserIdList)
获取客户基础信息
|
||
WxCpBaseResp |
delAccount(WxCpKfAccountDel del)
删除已有的客服帐号
|
||
WxCpKfServicerOpResp |
delServicer(String openKfid,
List<String> userIdList)
接待人员管理
从客服帐号删除接待人员
|
||
WxCpKfAccountLinkResp |
getAccountLink(WxCpKfAccountLink link)
企业可通过此接口获取带有不同参数的客服链接,不同客服帐号对应不同的客服链接。
|
||
WxCpKfGetCorpStatisticResp |
getCorpStatistic(WxCpKfGetCorpStatisticRequest request)
获取「客户数据统计」企业汇总数据
通过此接口,可以获取咨询会话数、咨询客户数等企业汇总统计数据
请求方式:POST(HTTPS)
请求地址:
WxCpKfServiceStateRespgetServiceState(String openKfid,
String externalUserId)
分配客服会话
获取会话状态
| ||
WxCpKfAccountListResp |
listAccount()
获取客服帐号列表,包括所有的客服帐号的客服ID、名称和头像。
|
||
WxCpKfServicerListResp |
listServicer(String openKfid)
接待人员管理
获取某个客服帐号的接待人员列表
|
||
WxCpKfMsgSendResp |
sendMsg(WxCpKfMsgSendRequest request)
发送消息
当微信客户处于“新接入待处理”或“由智能助手接待”状态下,可调用该接口给用户发送消息。
|
||
WxCpKfMsgSendResp |
sendMsgOnEvent(WxCpKfMsgSendRequest request)
发送欢迎语等事件响应消息
当特定的事件回调消息包含code字段,或通过接口变更到特定的会话状态,会返回code字段。
|
||
WxCpKfMsgListResp |
syncMsg(String cursor,
String token,
Integer limit,
Integer voiceFormat)
读取消息
微信客户发送的消息、接待人员在企业微信回复的消息、发送消息接口发送失败事件(如被用户拒收)、客户点击菜单消息的回复消息,
可以通过该接口获取具体的消息内容和事件。
|
||
WxCpKfServiceStateTransResp |
transServiceState(String openKfid,
String externalUserId,
Integer serviceState,
String servicerUserId)
分配客服会话
变更会话状态
|
||
WxCpBaseResp |
updAccount(WxCpKfAccountUpd upd)
修改已有的客服帐号,可修改客服名称和头像。
|
public WxCpKfAccountAddResp addAccount(WxCpKfAccountAdd add) throws WxErrorException
WxCpKfServiceaddAccount 在接口中 WxCpKfServiceadd - 客服帐号信息WxErrorException - 异常public WxCpBaseResp updAccount(WxCpKfAccountUpd upd) throws WxErrorException
WxCpKfServiceupdAccount 在接口中 WxCpKfServiceupd - 新的客服账号信息WxErrorException - 异常public WxCpBaseResp delAccount(WxCpKfAccountDel del) throws WxErrorException
WxCpKfServicedelAccount 在接口中 WxCpKfServicedel - 要删除的客服帐号WxErrorException - 异常public WxCpKfAccountListResp listAccount() throws WxErrorException
WxCpKfServicelistAccount 在接口中 WxCpKfServiceWxErrorException - 异常public WxCpKfAccountLinkResp getAccountLink(WxCpKfAccountLink link) throws WxErrorException
WxCpKfServicegetAccountLink 在接口中 WxCpKfServicelink - 参数WxErrorException - 异常public WxCpKfServicerOpResp addServicer(String openKfid, List<String> userIdList) throws WxErrorException
WxCpKfServiceaddServicer 在接口中 WxCpKfServiceopenKfid - 客服帐号IDuserIdList - 接待人员userid列表。第三方应用填密文userid,即open_userid
可填充个数:1 ~ 100。超过100个需分批调用。WxErrorException - 异常public WxCpKfServicerOpResp delServicer(String openKfid, List<String> userIdList) throws WxErrorException
WxCpKfServicedelServicer 在接口中 WxCpKfServiceopenKfid - 客服帐号IDuserIdList - 接待人员userid列表。第三方应用填密文userid,即open_userid
可填充个数:1 ~ 100。超过100个需分批调用。WxErrorException - 异常public WxCpKfServicerListResp listServicer(String openKfid) throws WxErrorException
WxCpKfServicelistServicer 在接口中 WxCpKfServiceopenKfid - 客服帐号IDWxErrorException - 异常public WxCpKfServiceStateResp getServiceState(String openKfid, String externalUserId) throws WxErrorException
WxCpKfServicegetServiceState 在接口中 WxCpKfServiceopenKfid - 客服帐号IDexternalUserId - 微信客户的external_useridWxErrorExceptionpublic WxCpKfServiceStateTransResp transServiceState(String openKfid, String externalUserId, Integer serviceState, String servicerUserId) throws WxErrorException
WxCpKfServicetransServiceState 在接口中 WxCpKfServiceopenKfid - 客服帐号IDexternalUserId - 微信客户的external_useridserviceState - 变更的目标状态,状态定义和所允许的变更可参考概述中的流程图和表格servicerUserId - 接待人员的userid。第三方应用填密文userid,即open_userid。当state=3时要求必填,接待人员须处于“正在接待”中。WxErrorExceptionpublic WxCpKfMsgListResp syncMsg(String cursor, String token, Integer limit, Integer voiceFormat) throws WxErrorException
WxCpKfServicesyncMsg 在接口中 WxCpKfServicecursor - 上一次调用时返回的next_cursor,第一次拉取可以不填。不多于64字节token - 回调事件返回的token字段,10分钟内有效;可不填,如果不填接口有严格的频率限制。不多于128字节limit - 期望请求的数据量,默认值和最大值都为1000。
注意:可能会出现返回条数少于limit的情况,需结合返回的has_more字段判断是否继续请求。voiceFormat - 语音消息类型,0-Amr 1-Silk,默认0。可通过该参数控制返回的语音格式WxErrorException - 异常public WxCpKfMsgSendResp sendMsg(WxCpKfMsgSendRequest request) throws WxErrorException
WxCpKfServicesendMsg 在接口中 WxCpKfServicerequest - 发送信息WxErrorException - 异常public WxCpKfMsgSendResp sendMsgOnEvent(WxCpKfMsgSendRequest request) throws WxErrorException
WxCpKfServicesendMsgOnEvent 在接口中 WxCpKfServiceWxErrorExceptionpublic WxCpKfCustomerBatchGetResp customerBatchGet(List<String> externalUserIdList) throws WxErrorException
WxCpKfServicecustomerBatchGet 在接口中 WxCpKfServiceWxErrorExceptionpublic WxCpKfGetCorpStatisticResp getCorpStatistic(WxCpKfGetCorpStatisticRequest request) throws WxErrorException
WxCpKfService获取「客户数据统计」企业汇总数据 通过此接口,可以获取咨询会话数、咨询客户数等企业汇总统计数据 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/kf/get_corp_statistic?access_token=ACCESS_TOKEN 文档地址:https://developer.work.weixin.qq.com/document/path/95489
getCorpStatistic 在接口中 WxCpKfServicerequest - 查询参数WxErrorExceptionCopyright © 2022. All rights reserved.