public interface WxCpKfService
微信客服由腾讯微信团队为企业打造,用于满足企业的客服需求,帮助企业做好客户服务。企业可以在微信内、外各个场景中接入微信客服, 用户可以发起咨询,企业可以进行回复。 企业可在微信客服官网使用企业微信扫码开通微信客服,开通后即可使用。
WxCpKfAccountAddResp addAccount(WxCpKfAccountAdd add) throws WxErrorException
add
- 客服帐号信息WxErrorException
- 异常WxCpBaseResp updAccount(WxCpKfAccountUpd upd) throws WxErrorException
upd
- 新的客服账号信息WxErrorException
- 异常WxCpBaseResp delAccount(WxCpKfAccountDel del) throws WxErrorException
del
- 要删除的客服帐号WxErrorException
- 异常WxCpKfAccountListResp listAccount(Integer offset, Integer limit) throws WxErrorException
offset
- 分页,偏移量, 默认为0limit
- 分页,预期请求的数据量,默认为100,取值范围 1 ~ 100WxErrorException
- 异常WxCpKfAccountLinkResp getAccountLink(WxCpKfAccountLink link) throws WxErrorException
link
- 参数WxErrorException
- 异常WxCpKfServicerOpResp addServicer(String openKfid, List<String> userIdList) throws WxErrorException
openKfid
- 客服帐号IDuserIdList
- 接待人员userid列表。第三方应用填密文userid,即open_userid 可填充个数:1 ~ 100。超过100个需分批调用。WxErrorException
- 异常WxCpKfServicerOpResp delServicer(String openKfid, List<String> userIdList) throws WxErrorException
openKfid
- 客服帐号IDuserIdList
- 接待人员userid列表。第三方应用填密文userid,即open_userid 可填充个数:1 ~ 100。超过100个需分批调用。WxErrorException
- 异常WxCpKfServicerListResp listServicer(String openKfid) throws WxErrorException
openKfid
- 客服帐号IDWxErrorException
- 异常WxCpKfServiceStateResp getServiceState(String openKfid, String externalUserId) throws WxErrorException
openKfid
- 客服帐号IDexternalUserId
- 微信客户的external_useridWxErrorException
- the wx error exceptionWxCpKfServiceStateTransResp transServiceState(String openKfid, String externalUserId, Integer serviceState, String servicerUserId) throws WxErrorException
openKfid
- 客服帐号IDexternalUserId
- 微信客户的external_useridserviceState
- 变更的目标状态,状态定义和所允许的变更可参考概述中的流程图和表格servicerUserId
- 接待人员的userid。第三方应用填密文userid,即open_userid。当state=3时要求必填,接待人员须处于“正在接待”中。WxErrorException
- the wx error exception@Deprecated WxCpKfMsgListResp syncMsg(String cursor, String token, Integer limit, Integer voiceFormat) throws WxErrorException
cursor
- 上一次调用时返回的next_cursor,第一次拉取可以不填。不多于64字节token
- 回调事件返回的token字段,10分钟内有效;可不填,如果不填接口有严格的频率限制。不多于128字节limit
- 期望请求的数据量,默认值和最大值都为1000。 注意:可能会出现返回条数少于limit的情况,需结合返回的has_more字段判断是否继续请求。voiceFormat
- 语音消息类型,0-Amr 1-Silk,默认0。可通过该参数控制返回的语音格式WxErrorException
- 异常WxCpKfMsgListResp syncMsg(String cursor, String token, Integer limit, Integer voiceFormat, String open_kfid) throws WxErrorException
WxErrorException
WxCpKfMsgSendResp sendMsg(WxCpKfMsgSendRequest request) throws WxErrorException
request
- 发送信息WxErrorException
- 异常WxCpKfMsgSendResp sendMsgOnEvent(WxCpKfMsgSendRequest request) throws WxErrorException
目前支持的事件场景和相关约束如下:
事件场景 允许下发条数 code有效期 支持的消息类型 获取code途径 用户进入会话,用于发送客服欢迎语 1条 20秒 文本、菜单 事件回调 进入接待池,用于发送排队提示语等 1条 48小时 文本 转接会话接口 从接待池接入会话,用于发送非工作 时间的提示语或超时未回复的提示语 等 1条 48小时 文本 事件回调、转接会话接口 结束会话,用于发送结束会话提示语 或满意度评价等 1条 20秒 文本、菜单 事件回调、转接会话接口
request
- the requestWxErrorException
- the wx error exceptionWxCpKfCustomerBatchGetResp customerBatchGet(List<String> externalUserIdList) throws WxErrorException
externalUserIdList
- the external user id listWxErrorException
- the wx error exceptionWxCpKfGetCorpStatisticResp getCorpStatistic(WxCpKfGetCorpStatisticRequest request) throws WxErrorException
获取「客户数据统计」企业汇总数据 通过此接口,可以获取咨询会话数、咨询客户数等企业汇总统计数据 请求方式: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
request
- 查询参数WxErrorException
- the wx error exceptionWxCpKfGetServicerStatisticResp getServicerStatistic(WxCpKfGetServicerStatisticRequest request) throws WxErrorException
获取「客户数据统计」接待人员明细数据 通过此接口,可获取接入人工会话数、咨询会话数等与接待人员相关的统计信息 请求方式:POST(HTTPS) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/kf/get_servicer_statistic?access_token=ACCESS_TOKEN 文档地址: https://developer.work.weixin.qq.com/document/path/95490
request
- 查询参数WxErrorException
- the wx error exceptionWxCpKfServiceUpgradeConfigResp getUpgradeServiceConfig() throws WxErrorException
WxErrorException
- the wx error exceptionWxCpBaseResp upgradeMemberService(String openKfid, String externalUserId, String userid, String wording) throws WxErrorException
openKfid
- 客服帐号IDexternalUserId
- 微信客户的external_useriduserid
- 服务专员的useridwording
- 推荐语WxErrorException
- the wx error exceptionWxCpBaseResp upgradeGroupchatService(String openKfid, String externalUserId, String chatId, String wording) throws WxErrorException
openKfid
- 客服帐号IDexternalUserId
- 微信客户的external_useridchatId
- 客户群idwording
- 推荐语WxErrorException
- the wx error exceptionWxCpBaseResp cancelUpgradeService(String openKfid, String externalUserId) throws WxErrorException
openKfid
- 客服帐号IDexternalUserId
- 微信客户的external_useridWxErrorException
- the wx error exceptionCopyright © 2024. All rights reserved.