public class WxMpKefuServiceImpl extends Object implements WxMpKefuService
构造器和说明 |
---|
WxMpKefuServiceImpl() |
限定符和类型 | 方法和说明 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
kfAccountAdd(WxMpKfAccountRequest request)
添加客服账号
详情请见:
boolean kfAccountDel(String kfAccount)
删除客服账号
详情请见:
boolean kfAccountInviteWorker(WxMpKfAccountRequest request)
设置客服信息(即更新客服信息)
详情请见:
boolean kfAccountUpdate(WxMpKfAccountRequest request)
设置客服信息(即更新客服信息)
详情请见:
boolean kfAccountUploadHeadImg(String kfAccount,
File imgFile)
上传客服头像
详情请见:
WxMpKfList kfList()
获取客服基本信息
详情请见:
WxMpKfMsgList kfMsgList(Date startTime,
Date endTime)
获取聊天记录(优化接口,返回指定时间段内所有的聊天记录)
此接口返回的聊天记录中,对于图片、语音、视频,分别展示成文本格式的[image]、[voice]、[video]
详情请见:
WxMpKfMsgList kfMsgList(Date startTime,
Date endTime,
Long msgId,
Integer number)
获取聊天记录(原始接口)
此接口返回的聊天记录中,对于图片、语音、视频,分别展示成文本格式的[image]、[voice]、[video]
详情请见:
WxMpKfOnlineList kfOnlineList()
| ||||||||||||||||
boolean |
kfSessionCreate(String openid,
String kfAccount)
创建会话
此接口在客服和用户之间创建一个会话,如果该客服和用户会话已存在,则直接返回0。
|
||||||||||||||||
WxMpKfSessionGetResult |
kfSessionGet(String openid)
获取客户的会话状态
此接口获取一个客户的会话,如果不存在,则kf_account为空。
|
||||||||||||||||
WxMpKfSessionWaitCaseList |
kfSessionGetWaitCase()
获取未接入会话列表
开发者可以通过本接口获取当前正在等待队列中的会话列表,此接口最多返回最早进入队列的100个未接入会话。
|
||||||||||||||||
WxMpKfSessionList |
kfSessionList(String kfAccount)
获取客服的会话列表
开发者可以通过本接口获取某个客服正在接待的会话列表。
|
||||||||||||||||
boolean |
sendKefuMessage(WxMpKefuMessage message)
发送客服消息
详情请见: 发送客服消息
接口url格式:https://api.weixin.qq.com/cgi-bin/message/custom/send?
|
||||||||||||||||
String |
sendKefuMessageWithResponse(WxMpKefuMessage message)
发送客服消息
详情请见: 发送客服消息
接口url格式:https://api.weixin.qq.com/cgi-bin/message/custom/send?
|
||||||||||||||||
boolean |
sendKfTypingState(String openid,
String command)
客服输入状态
开发者可通过调用“客服输入状态”接口,返回客服当前输入状态给用户。
|
public boolean sendKefuMessage(WxMpKefuMessage message) throws WxErrorException
WxMpKefuService
发送客服消息 详情请见: 发送客服消息 接口url格式:https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN
sendKefuMessage
在接口中 WxMpKefuService
message
- the messageWxErrorException
- 异常public String sendKefuMessageWithResponse(WxMpKefuMessage message) throws WxErrorException
WxMpKefuService
发送客服消息 详情请见: 发送客服消息 接口url格式:https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN
sendKefuMessageWithResponse
在接口中 WxMpKefuService
message
- the messageWxErrorException
- 异常public WxMpKfList kfList() throws WxErrorException
WxMpKefuService
获取客服基本信息 详情请见:客服管理 接口url格式:https://api.weixin.qq.com/cgi-bin/customservice/getkflist?access_token=ACCESS_TOKEN
kfList
在接口中 WxMpKefuService
WxErrorException
- 异常public WxMpKfOnlineList kfOnlineList() throws WxErrorException
WxMpKefuService
获取在线客服接待信息 详情请见:客服管理 接口url格式:https://api.weixin.qq.com/cgi-bin/customservice/getonlinekflist?access_token=ACCESS_TOKEN
kfOnlineList
在接口中 WxMpKefuService
WxErrorException
- 异常public boolean kfAccountAdd(WxMpKfAccountRequest request) throws WxErrorException
WxMpKefuService
添加客服账号 详情请见:客服管理 接口url格式:https://api.weixin.qq.com/customservice/kfaccount/add?access_token=ACCESS_TOKEN
kfAccountAdd
在接口中 WxMpKefuService
request
- the requestWxErrorException
- 异常public boolean kfAccountUpdate(WxMpKfAccountRequest request) throws WxErrorException
WxMpKefuService
设置客服信息(即更新客服信息) 详情请见:客服管理 接口url格式:https://api.weixin.qq.com/customservice/kfaccount/update?access_token=ACCESS_TOKEN
kfAccountUpdate
在接口中 WxMpKefuService
request
- the requestWxErrorException
- the wx error exceptionpublic boolean kfAccountInviteWorker(WxMpKfAccountRequest request) throws WxErrorException
WxMpKefuService
设置客服信息(即更新客服信息) 详情请见:客服管理 接口url格式:https://api.weixin.qq.com/customservice/kfaccount/inviteworker?access_token=ACCESS_TOKEN
kfAccountInviteWorker
在接口中 WxMpKefuService
request
- the requestWxErrorException
- 异常public boolean kfAccountUploadHeadImg(String kfAccount, File imgFile) throws WxErrorException
WxMpKefuService
上传客服头像 详情请见:客服管理 接口url格式:https://api.weixin.qq.com/customservice/kfaccount/uploadheadimg?access_token=ACCESS_TOKEN&kf_account=KFACCOUNT
kfAccountUploadHeadImg
在接口中 WxMpKefuService
kfAccount
- the kf accountimgFile
- the img fileWxErrorException
- 异常public boolean kfAccountDel(String kfAccount) throws WxErrorException
WxMpKefuService
删除客服账号 详情请见:客服管理 接口url格式:https://api.weixin.qq.com/customservice/kfaccount/del?access_token=ACCESS_TOKEN&kf_account=KFACCOUNT
kfAccountDel
在接口中 WxMpKefuService
kfAccount
- the kf accountWxErrorException
- 异常public boolean kfSessionCreate(String openid, String kfAccount) throws WxErrorException
WxMpKefuService
创建会话 此接口在客服和用户之间创建一个会话,如果该客服和用户会话已存在,则直接返回0。指定的客服账号必须已经绑定微信号且在线。 详情请见:客服会话控制接口 接口url格式: https://api.weixin.qq.com/customservice/kfsession/create?access_token=ACCESS_TOKEN
kfSessionCreate
在接口中 WxMpKefuService
openid
- the openidkfAccount
- the kf accountWxErrorException
- 异常public boolean kfSessionClose(String openid, String kfAccount) throws WxErrorException
WxMpKefuService
关闭会话 开发者可以使用本接口,关闭一个会话。 详情请见:客服会话控制接口 接口url格式: https://api.weixin.qq.com/customservice/kfsession/close?access_token=ACCESS_TOKEN
kfSessionClose
在接口中 WxMpKefuService
openid
- the openidkfAccount
- the kf accountWxErrorException
- 异常public WxMpKfSessionGetResult kfSessionGet(String openid) throws WxErrorException
WxMpKefuService
获取客户的会话状态 此接口获取一个客户的会话,如果不存在,则kf_account为空。 详情请见:客服会话控制接口 接口url格式: https://api.weixin.qq.com/customservice/kfsession/getsession?access_token=ACCESS_TOKEN&openid=OPENID
kfSessionGet
在接口中 WxMpKefuService
openid
- the openidWxErrorException
- 异常public WxMpKfSessionList kfSessionList(String kfAccount) throws WxErrorException
WxMpKefuService
获取客服的会话列表 开发者可以通过本接口获取某个客服正在接待的会话列表。 详情请见:客服会话控制 接口url格式: https://api.weixin.qq.com/customservice/kfsession/getsessionlist?access_token=ACCESS_TOKEN&kf_account=KFACCOUNT
kfSessionList
在接口中 WxMpKefuService
kfAccount
- the kf accountWxErrorException
- 异常public WxMpKfSessionWaitCaseList kfSessionGetWaitCase() throws WxErrorException
WxMpKefuService
获取未接入会话列表 开发者可以通过本接口获取当前正在等待队列中的会话列表,此接口最多返回最早进入队列的100个未接入会话。 详情请见:客服会话控制 接口url格式: https://api.weixin.qq.com/customservice/kfsession/getwaitcase?access_token=ACCESS_TOKEN
kfSessionGetWaitCase
在接口中 WxMpKefuService
WxErrorException
- 异常public WxMpKfMsgList kfMsgList(Date startTime, Date endTime, Long msgId, Integer number) throws WxErrorException
WxMpKefuService
获取聊天记录(原始接口) 此接口返回的聊天记录中,对于图片、语音、视频,分别展示成文本格式的[image]、[voice]、[video] 详情请见:获取聊天记录 接口url格式: https://api.weixin.qq.com/customservice/msgrecord/getmsglist?access_token=ACCESS_TOKEN
kfMsgList
在接口中 WxMpKefuService
startTime
- 起始时间endTime
- 结束时间msgId
- 消息id顺序从小到大,从1开始number
- 每次获取条数,最多10000条WxErrorException
- 异常public WxMpKfMsgList kfMsgList(Date startTime, Date endTime) throws WxErrorException
WxMpKefuService
获取聊天记录(优化接口,返回指定时间段内所有的聊天记录) 此接口返回的聊天记录中,对于图片、语音、视频,分别展示成文本格式的[image]、[voice]、[video] 详情请见:获取聊天记录 接口url格式: https://api.weixin.qq.com/customservice/msgrecord/getmsglist?access_token=ACCESS_TOKEN
kfMsgList
在接口中 WxMpKefuService
startTime
- 起始时间endTime
- 结束时间WxErrorException
- 异常public boolean sendKfTypingState(String openid, String command) throws WxErrorException
WxMpKefuService
客服输入状态 开发者可通过调用“客服输入状态”接口,返回客服当前输入状态给用户。 此接口需要客服消息接口权限。 如果不满足发送客服消息的触发条件,则无法下发输入状态。 下发输入状态,需要客服之前30秒内跟用户有过消息交互。 在输入状态中(持续15s),不可重复下发输入态。 在输入状态中,如果向用户下发消息,会同时取消输入状态。 详情请见:客服输入状态 接口url格式:https://api.weixin.qq.com/cgi-bin/message/custom/typing?access_token=ACCESS_TOKEN
sendKfTypingState
在接口中 WxMpKefuService
openid
- 用户idcommand
- "Typing":对用户下发“正在输入"状态 "CancelTyping":取消对用户的”正在输入"状态WxErrorException
- 异常Copyright © 2024. All rights reserved.