mirror of
https://github.com/silenceper/wechat.git
synced 2026-11-16 05:12:03 +08:00
feat(kf): 获取客户基础信息支持 need_enter_session_context 及进入会话上下文返回 (#894)
This commit is contained in:
1 file changed
+21
@@ -14,6 +14,24 @@ const (
|
|||||||
// CustomerBatchGetOptions 客户基本信息获取请求参数
|
// CustomerBatchGetOptions 客户基本信息获取请求参数
|
||||||
type CustomerBatchGetOptions struct {
|
type CustomerBatchGetOptions struct {
|
||||||
ExternalUserIDList []string `json:"external_userid_list"` // external_userid列表
|
ExternalUserIDList []string `json:"external_userid_list"` // external_userid列表
|
||||||
|
// NeedEnterSessionContext 是否需要返回客户48小时内最后一次进入会话的上下文信息
|
||||||
|
// 0-不返回 1-返回。默认不返回
|
||||||
|
NeedEnterSessionContext int `json:"need_enter_session_context"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// CustomerWechatChannelsSchema 进入会话的视频号信息,从视频号进入会话才有值
|
||||||
|
type CustomerWechatChannelsSchema struct {
|
||||||
|
Nickname string `json:"nickname"` // 视频号名称,视频号场景值为1、2、3时返回此项
|
||||||
|
ShopNickname string `json:"shop_nickname"` // 视频号小店名称,视频号场景值为4、5时返回此项
|
||||||
|
Scene uint32 `json:"scene"` // 视频号场景值。1:视频号主页,2:视频号直播间商品列表页,3:视频号商品橱窗页,4:视频号小店商品详情页,5:视频号小店订单页
|
||||||
|
}
|
||||||
|
|
||||||
|
// CustomerEnterSessionContextSchema 48小时内最后一次进入会话的上下文信息
|
||||||
|
// 请求的need_enter_session_context参数设置为1才返回
|
||||||
|
type CustomerEnterSessionContextSchema struct {
|
||||||
|
Scene string `json:"scene"` // 进入会话的场景值,获取客服账号链接开发者自定义的场景值
|
||||||
|
SceneParam string `json:"scene_param"` // 进入会话的自定义参数,获取客服账号链接返回的url,开发者按规范拼接的scene_param参数
|
||||||
|
WechatChannels CustomerWechatChannelsSchema `json:"wechat_channels"` // 进入会话的视频号信息,从视频号进入会话才有值
|
||||||
}
|
}
|
||||||
|
|
||||||
// CustomerSchema 微信客户基本资料
|
// CustomerSchema 微信客户基本资料
|
||||||
@@ -23,6 +41,9 @@ type CustomerSchema struct {
|
|||||||
Avatar string `json:"avatar"` // 微信头像。第三方不可获取
|
Avatar string `json:"avatar"` // 微信头像。第三方不可获取
|
||||||
Gender int `json:"gender"` // 性别
|
Gender int `json:"gender"` // 性别
|
||||||
UnionID string `json:"unionid"` // unionid,需要绑定微信开发者帐号才能获取到,查看绑定方法: https://open.work.weixin.qq.com/kf/doc/92512/93143/94769#%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E5%BE%AE%E4%BF%A1%E5%AE%A2%E6%88%B7%E7%9A%84unionid
|
UnionID string `json:"unionid"` // unionid,需要绑定微信开发者帐号才能获取到,查看绑定方法: https://open.work.weixin.qq.com/kf/doc/92512/93143/94769#%E5%A6%82%E4%BD%95%E8%8E%B7%E5%8F%96%E5%BE%AE%E4%BF%A1%E5%AE%A2%E6%88%B7%E7%9A%84unionid
|
||||||
|
// EnterSessionContext 48小时内最后一次进入会话的上下文信息
|
||||||
|
// 请求的need_enter_session_context参数设置为1才返回
|
||||||
|
EnterSessionContext CustomerEnterSessionContextSchema `json:"enter_session_context"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CustomerBatchGetSchema 获取客户基本信息响应内容
|
// CustomerBatchGetSchema 获取客户基本信息响应内容
|
||||||
|
|||||||
Reference in new issue
Block a user