C# Class Senparc.Weixin.MP.AdvancedAPIs.CustomServiceApi

多客服接口
Mostrar archivo Open project: JeffreySu/WeiXinMPSDK

Public Methods

Method Description
AddCustom ( string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT ) : WxJsonResult

添加客服账号

AddCustomAsync ( string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT ) : Task

【异步方法】添加客服账号

CloseSession ( string accessTokenOrAppId, string openId, string kfAccount, string text = null, int timeOut = Config.TIME_OUT ) : WxJsonResult

关闭会话

CloseSessionAsync ( string accessTokenOrAppId, string openId, string kfAccount, string text = null, int timeOut = Config.TIME_OUT ) : Task

【异步方法】关闭会话

CreateSession ( string accessTokenOrAppId, string openId, string kfAccount, string text = null, int timeOut = Config.TIME_OUT ) : WxJsonResult

创建会话

CreateSessionAsync ( string accessTokenOrAppId, string openId, string kfAccount, string text = null, int timeOut = Config.TIME_OUT ) : Task

【异步方法】创建会话

DeleteCustom ( string accessTokenOrAppId, string kfAccount, int timeOut = Config.TIME_OUT ) : WxJsonResult

删除客服账号

DeleteCustomAsync ( string accessTokenOrAppId, string kfAccount, int timeOut = Config.TIME_OUT ) : Task

【异步方法】 删除客服账号

GetCustomBasicInfo ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : CustomInfoJson

获取客服基本信息

GetCustomBasicInfoAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】 获取客服基本信息

GetCustomOnlineInfo ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : CustomOnlineJson

获取在线客服接待信息

GetCustomOnlineInfoAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取在线客服接待信息

GetMsgList ( string accessTokenOrAppId, System.DateTime startTime, System.DateTime endTime, long msgId, int number, int timeOut = Config.TIME_OUT ) : Senparc.Weixin.MP.AdvancedAPIs.CustomService.GetMsgListResultJson

获取聊天记录

GetMsgListAsync ( string accessTokenOrAppId, System.DateTime startTime, System.DateTime endTime, long msgId, int number, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取聊天记录

GetRecord ( string accessTokenOrAppId, System.DateTime startTime, System.DateTime endTime, int pageSize = 10, int pageIndex = 1, int timeOut = Config.TIME_OUT ) : GetRecordResult

获取用户聊天记录

GetRecordAsync ( string accessTokenOrAppId, System.DateTime startTime, System.DateTime endTime, int pageSize = 10, int pageIndex = 1, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取用户聊天记录

GetSessionList ( string accessTokenOrAppId, string kfAccount, int timeOut = Config.TIME_OUT ) : GetSessionListResultJson

获取客服的会话列表

GetSessionListAsync ( string accessTokenOrAppId, string kfAccount, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取客服的会话列表

GetSessionState ( string accessTokenOrAppId, string openId, int timeOut = Config.TIME_OUT ) : GetSessionStateResultJson

获取客户的会话状态

GetSessionStateAsync ( string accessTokenOrAppId, string openId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取客户的会话状态

GetWaitCase ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : GetWaitCaseResultJson

获取未接入会话列表

GetWaitCaseAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取未接入会话列表

InviteWorker ( string accessTokenOrAppId, string kfAccount, string inviteWx, int timeOut = Config.TIME_OUT ) : WxJsonResult
InviteWorkerAsync ( string accessTokenOrAppId, string kfAccount, string inviteWx, int timeOut = Config.TIME_OUT ) : Task
UpdateCustom ( string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT ) : WxJsonResult

设置客服信息

UpdateCustomAsync ( string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT ) : Task

【异步方法】设置客服信息

UploadCustomHeadimg ( string accessTokenOrAppId, string kfAccount, string file, int timeOut = Config.TIME_OUT ) : WxJsonResult

上传客服头像

UploadCustomHeadimgAsync ( string accessTokenOrAppId, string kfAccount, string file, int timeOut = Config.TIME_OUT ) : Task

【异步方法】上传客服头像

Method Details

AddCustom() public static method

添加客服账号
public static AddCustom ( string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。如果没有公众号微信号,请前往微信公众平台设置。
nickName string 客服昵称,最长6个汉字或12个英文字符
passWord string 客服账号登录密码,格式为密码明文的32位加密MD5值
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.WxJsonResult

AddCustomAsync() public static method

【异步方法】添加客服账号
public static AddCustomAsync ( string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。如果没有公众号微信号,请前往微信公众平台设置。
nickName string 客服昵称,最长6个汉字或12个英文字符
passWord string 客服账号登录密码,格式为密码明文的32位加密MD5值
timeOut int 代理请求超时时间(毫秒)
return Task

CloseSession() public static method

关闭会话
public static CloseSession ( string accessTokenOrAppId, string openId, string kfAccount, string text = null, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
openId string 客户openid
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号
text string 附加信息,文本会展示在客服人员的多客服客户端(非必须)
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.WxJsonResult

CloseSessionAsync() public static method

【异步方法】关闭会话
public static CloseSessionAsync ( string accessTokenOrAppId, string openId, string kfAccount, string text = null, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
openId string 客户openid
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号
text string 附加信息,文本会展示在客服人员的多客服客户端(非必须)
timeOut int 代理请求超时时间(毫秒)
return Task

CreateSession() public static method

创建会话
public static CreateSession ( string accessTokenOrAppId, string openId, string kfAccount, string text = null, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
openId string 客户openid
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号
text string 附加信息,文本会展示在客服人员的多客服客户端(非必须)
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.WxJsonResult

CreateSessionAsync() public static method

【异步方法】创建会话
public static CreateSessionAsync ( string accessTokenOrAppId, string openId, string kfAccount, string text = null, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
openId string 客户openid
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号
text string 附加信息,文本会展示在客服人员的多客服客户端(非必须)
timeOut int 代理请求超时时间(毫秒)
return Task

DeleteCustom() public static method

删除客服账号
public static DeleteCustom ( string accessTokenOrAppId, string kfAccount, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.WxJsonResult

DeleteCustomAsync() public static method

【异步方法】 删除客服账号
public static DeleteCustomAsync ( string accessTokenOrAppId, string kfAccount, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号
timeOut int 代理请求超时时间(毫秒)
return Task

GetCustomBasicInfo() public static method

获取客服基本信息
public static GetCustomBasicInfo ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : CustomInfoJson
accessTokenOrAppId string 调用接口凭证
timeOut int 代理请求超时时间(毫秒)
return CustomInfoJson

GetCustomBasicInfoAsync() public static method

【异步方法】 获取客服基本信息
public static GetCustomBasicInfoAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string 调用接口凭证
timeOut int 代理请求超时时间(毫秒)
return Task

GetCustomOnlineInfo() public static method

获取在线客服接待信息
public static GetCustomOnlineInfo ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : CustomOnlineJson
accessTokenOrAppId string 调用接口凭证
timeOut int 代理请求超时时间(毫秒)
return CustomOnlineJson

GetCustomOnlineInfoAsync() public static method

【异步方法】获取在线客服接待信息
public static GetCustomOnlineInfoAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string 调用接口凭证
timeOut int 代理请求超时时间(毫秒)
return Task

GetMsgList() public static method

获取聊天记录
public static GetMsgList ( string accessTokenOrAppId, System.DateTime startTime, System.DateTime endTime, long msgId, int number, int timeOut = Config.TIME_OUT ) : Senparc.Weixin.MP.AdvancedAPIs.CustomService.GetMsgListResultJson
accessTokenOrAppId string
startTime System.DateTime 起始时间,unix时间戳
endTime System.DateTime 结束时间,unix时间戳,每次查询时段不能超过24小时
msgId long 消息id顺序从小到大,从1开始
number int 每次获取条数,最多10000条
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.CustomService.GetMsgListResultJson

GetMsgListAsync() public static method

【异步方法】获取聊天记录
public static GetMsgListAsync ( string accessTokenOrAppId, System.DateTime startTime, System.DateTime endTime, long msgId, int number, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
startTime System.DateTime 起始时间,unix时间戳
endTime System.DateTime 结束时间,unix时间戳,每次查询时段不能超过24小时
msgId long 消息id顺序从小到大,从1开始
number int 每次获取条数,最多10000条
timeOut int
return Task

GetRecord() public static method

获取用户聊天记录
public static GetRecord ( string accessTokenOrAppId, System.DateTime startTime, System.DateTime endTime, int pageSize = 10, int pageIndex = 1, int timeOut = Config.TIME_OUT ) : GetRecordResult
accessTokenOrAppId string 调用接口凭证
startTime System.DateTime 查询开始时间,会自动转为UNIX时间戳
endTime System.DateTime 查询结束时间,会自动转为UNIX时间戳,每次查询不能跨日查询
pageSize int 每页大小,每页最多拉取1000条
pageIndex int 查询第几页,从1开始
timeOut int 代理请求超时时间(毫秒)
return GetRecordResult

GetRecordAsync() public static method

【异步方法】获取用户聊天记录
public static GetRecordAsync ( string accessTokenOrAppId, System.DateTime startTime, System.DateTime endTime, int pageSize = 10, int pageIndex = 1, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string 调用接口凭证
startTime System.DateTime 查询开始时间,会自动转为UNIX时间戳
endTime System.DateTime 查询结束时间,会自动转为UNIX时间戳,每次查询不能跨日查询
pageSize int 每页大小,每页最多拉取1000条
pageIndex int 查询第几页,从1开始
timeOut int 代理请求超时时间(毫秒)
return Task

GetSessionList() public static method

获取客服的会话列表
public static GetSessionList ( string accessTokenOrAppId, string kfAccount, int timeOut = Config.TIME_OUT ) : GetSessionListResultJson
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.MP.AdvancedAPIs.CustomService.GetSessionListResultJson

GetSessionListAsync() public static method

【异步方法】获取客服的会话列表
public static GetSessionListAsync ( string accessTokenOrAppId, string kfAccount, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。
timeOut int 代理请求超时时间(毫秒)
return Task

GetSessionState() public static method

获取客户的会话状态
public static GetSessionState ( string accessTokenOrAppId, string openId, int timeOut = Config.TIME_OUT ) : GetSessionStateResultJson
accessTokenOrAppId string
openId string 客户openid
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.MP.AdvancedAPIs.CustomService.GetSessionStateResultJson

GetSessionStateAsync() public static method

【异步方法】获取客户的会话状态
public static GetSessionStateAsync ( string accessTokenOrAppId, string openId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
openId string 客户openid
timeOut int 代理请求超时时间(毫秒)
return Task

GetWaitCase() public static method

获取未接入会话列表
public static GetWaitCase ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : GetWaitCaseResultJson
accessTokenOrAppId string
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.MP.AdvancedAPIs.CustomService.GetWaitCaseResultJson

GetWaitCaseAsync() public static method

【异步方法】获取未接入会话列表
public static GetWaitCaseAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
timeOut int 代理请求超时时间(毫秒)
return Task

InviteWorker() public static method

public static InviteWorker ( string accessTokenOrAppId, string kfAccount, string inviteWx, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
kfAccount string
inviteWx string
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.WxJsonResult

InviteWorkerAsync() public static method

public static InviteWorkerAsync ( string accessTokenOrAppId, string kfAccount, string inviteWx, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
kfAccount string
inviteWx string
timeOut int 代理请求超时时间(毫秒)
return Task

UpdateCustom() public static method

设置客服信息
public static UpdateCustom ( string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。如果没有公众号微信号,请前往微信公众平台设置。
nickName string 客服昵称,最长6个汉字或12个英文字符
passWord string 客服账号登录密码,格式为密码明文的32位加密MD5值
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.WxJsonResult

UpdateCustomAsync() public static method

【异步方法】设置客服信息
public static UpdateCustomAsync ( string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号,账号前缀最多10个字符,必须是英文或者数字字符。如果没有公众号微信号,请前往微信公众平台设置。
nickName string 客服昵称,最长6个汉字或12个英文字符
passWord string 客服账号登录密码,格式为密码明文的32位加密MD5值
timeOut int 代理请求超时时间(毫秒)
return Task

UploadCustomHeadimg() public static method

上传客服头像
public static UploadCustomHeadimg ( string accessTokenOrAppId, string kfAccount, string file, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号
file string form-data中媒体文件标识,有filename、filelength、content-type等信息
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Entities.WxJsonResult

UploadCustomHeadimgAsync() public static method

【异步方法】上传客服头像
public static UploadCustomHeadimgAsync ( string accessTokenOrAppId, string kfAccount, string file, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
kfAccount string 完整客服账号,格式为:账号前缀@公众号微信号
file string form-data中媒体文件标识,有filename、filelength、content-type等信息
timeOut int 代理请求超时时间(毫秒)
return Task