Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ExternalContactWay TransferCustomer TransferResignedCustomer #102

Merged
merged 2 commits into from Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -119,11 +119,23 @@ in at least 2 of Qiniu's internal systems.
<summary>客户联系 API</summary>

* [x] 成员对外信息
* [x] 企业服务人员管理
- [x] 获取配置了客户联系功能的成员列表
- [x] 客户联系「联系我」管理
* [x] 客户管理
- [x] 获取客户列表
- [x] 获取客户详情
- [x] 批量获取客户详情
- [x] 修改客户备注信息
* [x] 在职继承
- [x] 分配在职成员的客户
- [x] 查询客户接替状态
- [ ] 分配在职成员的客户群
* [x] 离职继承
- [ ] 获取待分配的离职成员列表
- [x] 分配离职成员的客户
- [x] 查询客户接替状态
- [ ] 分配离职成员的客户群
* [x] 客户标签管理
- [x] 管理企业标签
- [x] 编辑客户企业标签
Expand Down
154 changes: 154 additions & 0 deletions apis.md.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 32 additions & 1 deletion docs/apis.md
Expand Up @@ -169,7 +169,6 @@ Name|Request Type|Response Type|Access Token|URL|Doc
Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--


# 会话内容存档

## API calls
Expand All @@ -180,3 +179,35 @@ Name|Request Type|Response Type|Access Token|URL|Doc
`execMsgAuditCheckSingleAgree`|`reqMsgAuditCheckSingleAgree`|`respMsgAuditCheckSingleAgree`|+|`POST /cgi-bin/msgaudit/check_single_agree`|[获取会话同意情况(单聊)](https://work.weixin.qq.com/api/doc/90000/90135/91782)
`execMsgAuditCheckRoomAgree`|`reqMsgAuditCheckRoomAgree`|`respMsgAuditCheckRoomAgree`|+|`POST /cgi-bin/msgaudit/check_room_agree`|[获取会话同意情况(群聊)](https://work.weixin.qq.com/api/doc/90000/90135/91782)
`execMsgAuditGetGroupChat`|`reqMsgAuditGetGroupChat`|`respMsgAuditGetGroupChat`|+|`POST /cgi-bin/msgaudit/groupchat/get`|[获取会话内容存档内部群信息](https://work.weixin.qq.com/api/doc/90000/90135/92951)

# 企业服务人员管理 - 联系我

## API calls

Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execListFollowUserExternalContact`|`reqListFollowUserExternalContact`|`respListFollowUserExternalContact`|+|`GET /cgi-bin/externalcontact/get_follow_user_list`|[获取配置了客户联系功能的成员列表](https://developer.work.weixin.qq.com/document/path/92571)
`execAddContactExternalContact`|`reqAddContactExternalContact`|`respAddContactExternalContact`|+|`POST /cgi-bin/externalcontact/add_contact_way`|[配置客户联系「联系我」方式](https://developer.work.weixin.qq.com/document/path/92572#%E9%85%8D%E7%BD%AE%E5%AE%A2%E6%88%B7%E8%81%94%E7%B3%BB%E3%80%8C%E8%81%94%E7%B3%BB%E6%88%91%E3%80%8D%E6%96%B9%E5%BC%8F)
`execGetContactWayExternalContact`|`reqGetContactWayExternalContact`|`respGetContactWayExternalContact`|+|`POST /cgi-bin/externalcontact/get_contact_way`|[获取企业已配置的「联系我」方式](https://developer.work.weixin.qq.com/document/path/92572#%E8%8E%B7%E5%8F%96%E4%BC%81%E4%B8%9A%E5%B7%B2%E9%85%8D%E7%BD%AE%E7%9A%84%E3%80%8C%E8%81%94%E7%B3%BB%E6%88%91%E3%80%8D%E6%96%B9%E5%BC%8F)
`execListContactWayChatExternalContact`|`reqListContactWayExternalContact`|`respListContactWayChatExternalContact`|+|`POST /cgi-bin/externalcontact/list_contact_way`|[获取企业已配置的「联系我」列表](https://developer.work.weixin.qq.com/document/path/92572#%E8%8E%B7%E5%8F%96%E4%BC%81%E4%B8%9A%E5%B7%B2%E9%85%8D%E7%BD%AE%E7%9A%84%E3%80%8C%E8%81%94%E7%B3%BB%E6%88%91%E3%80%8D%E5%88%97%E8%A1%A8)
`execUpdateContactWayExternalContact`|`reqUpdateContactWayExternalContact`|`respUpdateContactWayExternalContact`|+|`POST /cgi-bin/externalcontact/update_contact_way`|[更新企业已配置的「联系我」成员配置](https://developer.work.weixin.qq.com/document/path/92572#%E6%9B%B4%E6%96%B0%E4%BC%81%E4%B8%9A%E5%B7%B2%E9%85%8D%E7%BD%AE%E7%9A%84%E3%80%8C%E8%81%94%E7%B3%BB%E6%88%91%E3%80%8D%E6%96%B9%E5%BC%8F)
`execDelContactWayExternalContact`|`reqDelContactWayExternalContact`|`respDelContactWayExternalContact`|+|`POST /cgi-bin/externalcontact/del_contact_way`|[删除企业已配置的「联系我」方式](https://developer.work.weixin.qq.com/document/path/92572#%E5%88%A0%E9%99%A4%E4%BC%81%E4%B8%9A%E5%B7%B2%E9%85%8D%E7%BD%AE%E7%9A%84%E3%80%8C%E8%81%94%E7%B3%BB%E6%88%91%E3%80%8D%E6%96%B9%E5%BC%8F)
`execCloseTempChatExternalContact`|`reqCloseTempChatExternalContact`|`respCloseTempChatExternalContact`|+|`POST /cgi-bin/externalcontact/close_temp_chat`|[结束临时会话](https://developer.work.weixin.qq.com/document/path/92572#%E7%BB%93%E6%9D%9F%E4%B8%B4%E6%97%B6%E4%BC%9A%E8%AF%9D)

# 在职继承

## API calls

Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execTransferCustomer`|`reqTransferCostomer`|`respTransferCustomer`|+|`POST /cgi-bin/externalcontact/transfer_customer`|[在职继承 分配在职成员的客户](https://developer.work.weixin.qq.com/document/path/92125)
`execGetTransferCustomerResult`|`reqGetTransferCustomerResult`|`respGetTransferCustomerResult`|+|`POST /cgi-bin/externalcontact/transfer_result`|[在职继承 查询客户接替状态](https://developer.work.weixin.qq.com/document/path/94088)

# 离职继承

## API calls

Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execTransferResignedCustomer`|`reqTransferCostomer`|`respTransferCustomer`|+|`POST /cgi-bin/externalcontact/resigned/transfer_customer`|[离职继承 分配离职成员的客户](https://developer.work.weixin.qq.com/document/path/94081)
`execGetTransferResignedCustomerResult`|`reqGetTransferCustomerResult`|`respGetTransferCustomerResult`|+|`POST /cgi-bin/externalcontact/resigned/transfer_result`|[离职继承 查询客户接替状态](https://developer.work.weixin.qq.com/document/path/94082)
89 changes: 89 additions & 0 deletions docs/external_contact.md
Expand Up @@ -229,3 +229,92 @@ Name|JSON|Type|Doc
`ChatID`|`chat_id`|`string`| 没能成功继承的群ID
`ErrCode`|`errcode`|`int`| 没能成功继承的群,错误码
`ErrMsg`|`errmsg`|`string`| 没能成功继承的群,错误描述

### `ExternalContactFollowUserList` 配置了客户联系功能的成员列表

Name|JSON|Type|Doc
:---|:---|:---|:--
`FollowUser`|`follow_user`|`[]string`| 配置了客户联系功能的成员userid列表

### `ExternalContactWay` 配置客户联系「联系我」方式

Name|JSON|Type|Doc
:---|:---|:---|:--
`Type`|`type`|`int`| 联系方式类型,1-单人, 2-多人
`Scene`|`scene`|`int`| 场景,1-在小程序中联系,2-通过二维码联系
`Style`|`style`|`int`| 在小程序中联系时使用的控件样式,详见附表
`Remark`|`remark`|`string`| 联系方式的备注信息,用于助记,不超过30个字符
`SkipVerify`|`skip_verify`|`bool`| 外部客户添加时是否无需验证,默认为true
`State`|`state`|`string`| 企业自定义的state参数,用于区分不同的添加渠道,在调用“获取外部联系人详情”时会返回该参数值,不超过30个字符 <https://developer.work.weixin.qq.com/document/path/92114>
`User`|`user`|`[]string`| 使用该联系方式的用户userID列表,在type为1时为必填,且只能有一个
`Party`|`party`|`[]int`| 使用该联系方式的部门id列表,只在type为2时有效
`IsTemp`|`is_temp`|`bool`| 是否临时会话模式,true表示使用临时会话模式,默认为false
`ExpiresIn`|`expires_in`|`int`| 临时会话二维码有效期,以秒为单位。该参数仅在is_temp为true时有效,默认7天,最多为14天
`ChatExpiresIn`|`chat_expires_in`|`int`| 临时会话有效期,以秒为单位。该参数仅在is_temp为true时有效,默认为添加好友后24小时,最多为14天
`Unionid`|`unionid`|`string`| 可进行临时会话的客户unionid,该参数仅在is_temp为true时有效,如不指定则不进行限制
rudy-tao marked this conversation as resolved.
Show resolved Hide resolved
`Conclusions`|`conclusions`|`Conclusions`| 结束语,会话结束时自动发送给客户,可参考“结束语定义”,仅在is_temp为true时有效,<https://developer.work.weixin.qq.com/document/path/92572#%E7%BB%93%E6%9D%9F%E8%AF%AD%E5%AE%9A%E4%B9%89>

### `Conclusions` 结束语,会话结束时自动发送给客户

Name|JSON|Type|Doc
:---|:---|:---|:--
`Text`|`text`|`Text`| 文本消息
`Image`|`image`|`Image`| 图片
`Link`|`link`|`Link`| 链接
`Miniprogram`|`miniprogram`|`Miniprogram`| 小程序
rudy-tao marked this conversation as resolved.
Show resolved Hide resolved

### `Text` 结束语,会话结束时自动发送给客户

Name|JSON|Type|Doc
:---|:---|:---|:--
`Content`|`content`|`string`| 消息文本内容,最长为4000字节

### `Image` 结束语,会话结束时自动发送给客户

Name|JSON|Type|Doc
:---|:---|:---|:--
`MediaID`|`media_id`|`string`| 图片的media_id
`PicURL`|`pic_url`|`string`| 图片的url

### `Link` 结束语,会话结束时自动发送给客户

Name|JSON|Type|Doc
:---|:---|:---|:--
`Title`|`title`|`string`| 图文消息标题,最长为128字节
`Picurl`|`picurl`|`string`| 图文消息封面的url
`Desc`|`desc`|`string`| 图文消息的描述,最长为512字节
`URL`|`url`|`string`| 图文消息的链接

### `Miniprogram` 结束语,会话结束时自动发送给客户

Name|JSON|Type|Doc
:---|:---|:---|:--
`Title`|`title`|`string`| 小程序消息标题,最长为64字节
`PicMediaID`|`pic_media_id`|`string`| 小程序消息封面的mediaid,封面图建议尺寸为520*416
`Appid`|`appid`|`string`| 小程序appid,必须是关联到企业的小程序应用
rudy-tao marked this conversation as resolved.
Show resolved Hide resolved
`Page`|`page`|`string`| 小程序page路径

### `reqListContactWayExternalContact` 获取企业已配置的「联系我」列表请求参数

Name|JSON|Type|Doc
:---|:---|:---|:--
`StartTime`|`start_time`|`int`| 「联系我」创建起始时间戳, 默认为90天前
`EndTime`|`end_time`|`int`| 「联系我」创建结束时间戳, 默认为当前时间
`Cursor`|`cursor`|`string`| 分页查询使用的游标,为上次请求返回的 next_cursor
`Limit`|`limit`|`int`| 每次查询的分页大小,默认为100条,最多支持1000条

### `reqUpdateContactWayExternalContact` 更新企业已配置的「联系我」方式请求参数

Name|JSON|Type|Doc
:---|:---|:---|:--
`ConfigId`|`config_id`|`string`| 企业联系方式的配置id
rudy-tao marked this conversation as resolved.
Show resolved Hide resolved
`Remark`|`remark`|`string`| 联系方式的备注信息,不超过30个字符,将覆盖之前的备注
`SkipVerify`|`skip_verify`|`bool`| 外部客户添加时是否无需验证
`Style`|`style`|`int`| 样式,只针对“在小程序中联系”的配置生效
`State`|`state`|`string`| 企业自定义的state参数,用于区分不同的添加渠道,在调用“获取外部联系人详情”时会返回该参数值,不超过30个字符 <https://developer.work.weixin.qq.com/document/path/92114>
`User`|`user`|`[]string`| 使用该联系方式的用户userID列表,在type为1时为必填,且只能有一个
`Party`|`party`|`[]int`| 使用该联系方式的部门id列表,只在type为2时有效
`ExpiresIn`|`expires_in`|`int`| 临时会话二维码有效期,以秒为单位。该参数仅在is_temp为true时有效,默认7天,最多为14天
`ChatExpiresIn`|`chat_expires_in`|`int`| 临时会话有效期,以秒为单位。该参数仅在is_temp为true时有效,默认为添加好友后24小时,最多为14天
`Unionid`|`unionid`|`string`| 可进行临时会话的客户unionid,该参数仅在is_temp为true时有效,如不指定则不进行限制
`Conclusions`|`conclusions`|`Conclusions`| 结束语,会话结束时自动发送给客户,可参考“结束语定义”,仅在is_temp为true时有效,<https://developer.work.weixin.qq.com/document/path/92572#%E7%BB%93%E6%9D%9F%E8%AF%AD%E5%AE%9A%E4%B9%89>