|
6 | 6 | import me.chanjar.weixin.cp.bean.external.*;
|
7 | 7 | import me.chanjar.weixin.cp.bean.external.contact.WxCpExternalContactBatchInfo;
|
8 | 8 | import me.chanjar.weixin.cp.bean.external.contact.WxCpExternalContactInfo;
|
| 9 | +import org.jetbrains.annotations.NotNull; |
9 | 10 |
|
10 | 11 | import java.util.Date;
|
11 | 12 | import java.util.List;
|
@@ -134,6 +135,14 @@ public interface WxCpExternalContactService {
|
134 | 135 | */
|
135 | 136 | WxCpExternalContactInfo getContactDetail(String userId) throws WxErrorException;
|
136 | 137 |
|
| 138 | + /** |
| 139 | + * 企业和服务商可通过此接口,将微信外部联系人的userid转为微信openid,用于调用支付相关接口。暂不支持企业微信外部联系人(ExternalUserid为wo开头)的userid转openid。 |
| 140 | + * @param externalUserid 微信外部联系人的userid |
| 141 | + * @return 该企业的外部联系人openid |
| 142 | + * @throws WxErrorException . |
| 143 | + */ |
| 144 | + String convertToOpenid(String externalUserid) throws WxErrorException; |
| 145 | + |
137 | 146 | /**
|
138 | 147 | * 批量获取客户详情.
|
139 | 148 | * <pre>
|
@@ -225,9 +234,85 @@ WxCpExternalContactBatchInfo getContactDetailBatch(String userId, String cursor,
|
225 | 234 | * @param takeOverUserid the take over userid
|
226 | 235 | * @return wx cp base resp
|
227 | 236 | * @throws WxErrorException the wx error exception
|
| 237 | + * @deprecated 此后续将不再更新维护,建议使用 {@link #transferCustomer(WxCpUserTransferCustomerReq)} |
228 | 238 | */
|
| 239 | + @Deprecated |
229 | 240 | WxCpBaseResp transferExternalContact(String externalUserid, String handOverUserid, String takeOverUserid) throws WxErrorException;
|
230 | 241 |
|
| 242 | + /** |
| 243 | + * 企业可通过此接口,转接在职成员的客户给其他成员。 |
| 244 | + * <per> |
| 245 | + * external_userid必须是handover_userid的客户(即配置了客户联系功能的成员所添加的联系人)。 |
| 246 | + * 在职成员的每位客户最多被分配2次。客户被转接成功后,将有90个自然日的服务关系保护期,保护期内的客户无法再次被分配。 |
| 247 | + * |
| 248 | + * 权限说明: |
| 249 | + * * 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 |
| 250 | + * 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限 |
| 251 | + * 接替成员必须在此第三方应用或自建应用的可见范围内。 |
| 252 | + * 接替成员需要配置了客户联系功能。 |
| 253 | + * 接替成员需要在企业微信激活且已经过实名认证。 |
| 254 | + * </per> |
| 255 | + * @param req 转接在职成员的客户给其他成员请求实体 |
| 256 | + * @return wx cp base resp |
| 257 | + * @throws WxErrorException the wx error exception |
| 258 | + */ |
| 259 | + WxCpUserTransferCustomerResp transferCustomer(WxCpUserTransferCustomerReq req) throws WxErrorException; |
| 260 | + |
| 261 | + /** |
| 262 | + * 企业和第三方可通过此接口查询在职成员的客户转接情况。 |
| 263 | + * <per> |
| 264 | + * 权限说明: |
| 265 | + * |
| 266 | + * 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 |
| 267 | + * 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限 |
| 268 | + * 接替成员必须在此第三方应用或自建应用的可见范围内。 |
| 269 | + * </per> |
| 270 | + * @param handOverUserid 原添加成员的userid |
| 271 | + * @param takeOverUserid 接替成员的userid |
| 272 | + * @param cursor 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页; |
| 273 | + * @return 客户转接接口实体 |
| 274 | + * @throws WxErrorException the wx error exception |
| 275 | + */ |
| 276 | + WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor) throws WxErrorException; |
| 277 | + |
| 278 | + /** |
| 279 | + * 企业可通过此接口,分配离职成员的客户给其他成员。 |
| 280 | + * <per> |
| 281 | + * handover_userid必须是已离职用户。 |
| 282 | + * external_userid必须是handover_userid的客户(即配置了客户联系功能的成员所添加的联系人)。 |
| 283 | + * 在职成员的每位客户最多被分配2次。客户被转接成功后,将有90个自然日的服务关系保护期,保护期内的客户无法再次被分配。 |
| 284 | + * |
| 285 | + * 权限说明: |
| 286 | + * |
| 287 | + * 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 |
| 288 | + * 第三方应用需拥有“企业客户权限->客户联系->离职分配”权限 |
| 289 | + * 接替成员必须在此第三方应用或自建应用的可见范围内。 |
| 290 | + * 接替成员需要配置了客户联系功能。 |
| 291 | + * 接替成员需要在企业微信激活且已经过实名认证。 |
| 292 | + * </per> |
| 293 | + * @param req 转接在职成员的客户给其他成员请求实体 |
| 294 | + * @return wx cp base resp |
| 295 | + * @throws WxErrorException the wx error exception |
| 296 | + */ |
| 297 | + WxCpUserTransferCustomerResp resignedTransferCustomer(WxCpUserTransferCustomerReq req) throws WxErrorException; |
| 298 | + |
| 299 | + /** |
| 300 | + * 企业和第三方可通过此接口查询离职成员的客户分配情况。 |
| 301 | + * <per> |
| 302 | + * 权限说明: |
| 303 | + * |
| 304 | + * 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 |
| 305 | + * 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限 |
| 306 | + * 接替成员必须在此第三方应用或自建应用的可见范围内。 |
| 307 | + * </per> |
| 308 | + * @param handOverUserid 原添加成员的userid |
| 309 | + * @param takeOverUserid 接替成员的userid |
| 310 | + * @param cursor 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页; |
| 311 | + * @return 客户转接接口实体 |
| 312 | + * @throws WxErrorException the wx error exception |
| 313 | + */ |
| 314 | + WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor) throws WxErrorException; |
| 315 | + |
231 | 316 | /**
|
232 | 317 | * <pre>
|
233 | 318 | * 该接口用于获取配置过客户群管理的客户群列表。
|
@@ -260,6 +345,32 @@ WxCpExternalContactBatchInfo getContactDetailBatch(String userId, String cursor,
|
260 | 345 | */
|
261 | 346 | WxCpUserExternalGroupChatInfo getGroupChat(String chatId) throws WxErrorException;
|
262 | 347 |
|
| 348 | + /** |
| 349 | + * |
| 350 | + * 企业可通过此接口,将已离职成员为群主的群,分配给另一个客服成员。 |
| 351 | + * |
| 352 | + * <per> |
| 353 | + * 注意:: |
| 354 | + * |
| 355 | + * 群主离职了的客户群,才可继承 |
| 356 | + * 继承给的新群主,必须是配置了客户联系功能的成员 |
| 357 | + * 继承给的新群主,必须有设置实名 |
| 358 | + * 继承给的新群主,必须有激活企业微信 |
| 359 | + * 同一个人的群,限制每天最多分配300个给新群主 |
| 360 | + * |
| 361 | + * 权限说明: |
| 362 | + * |
| 363 | + * 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 |
| 364 | + * 第三方应用需拥有“企业客户权限->客户联系->分配离职成员的客户群”权限 |
| 365 | + * 对于第三方/自建应用,群主必须在应用的可见范围。 |
| 366 | + * </per> |
| 367 | + * @param chatIds 需要转群主的客户群ID列表。取值范围: 1 ~ 100 |
| 368 | + * @param newOwner 新群主ID |
| 369 | + * @return 分配结果,主要是分配失败的群列表 |
| 370 | + * @throws WxErrorException the wx error exception |
| 371 | + */ |
| 372 | + WxCpUserExternalGroupChatTransferResp transferGroupChat(String[] chatIds, String newOwner) throws WxErrorException; |
| 373 | + |
263 | 374 | /**
|
264 | 375 | * <pre>
|
265 | 376 | * 企业可通过此接口获取成员联系客户的数据,包括发起申请数、新增客户数、聊天数、发送消息数和删除/拉黑成员的客户数等指标。
|
@@ -397,4 +508,6 @@ WxCpExternalContactBatchInfo getContactDetailBatch(String userId, String cursor,
|
397 | 508 | * @throws WxErrorException the wx error exception
|
398 | 509 | */
|
399 | 510 | WxCpBaseResp markTag(String userid, String externalUserid, String[] addTag, String[] removeTag) throws WxErrorException;
|
| 511 | + |
| 512 | + |
400 | 513 | }
|
0 commit comments