View Source WeChat.CustomService (wechat v0.15.1)

客服帐号管理

官方文档

Summary

Types

完整客服账号,格式为:账号前缀@公众号微信号

客服昵称

客服账号登录密码

Types

@type kf_account() :: String.t()

完整客服账号,格式为:账号前缀@公众号微信号

@type nickname() :: String.t()

客服昵称

@type password() :: String.t()

客服账号登录密码

格式为密码明文的32位加密MD5值。该密码仅用于在公众平台官网的多客服功能中使用,若不使用多客服功能,则不必设置密码。

Functions

Link to this function

add_kf_account(client, kf_account, nickname, password)

View Source
@spec add_kf_account(WeChat.client(), kf_account(), nickname(), password()) ::
  WeChat.response()

添加客服帐号 - 官方文档

每个公众号最多添加100个客服账号。

Link to this function

del_kf_account(client, kf_account, nickname, password)

View Source
@spec del_kf_account(WeChat.client(), kf_account(), nickname(), password()) ::
  WeChat.response()

删除客服帐号 - 官方文档

@spec get_kf_list(WeChat.client()) :: WeChat.response()

获取所有客服账号 - 官方文档

获取公众号中所设置的客服基本信息,包括客服工号、客服昵称、客服登录账号。

Link to this function

update_kf_account(client, kf_account, nickname, password)

View Source
@spec update_kf_account(WeChat.client(), kf_account(), nickname(), password()) ::
  WeChat.response()

修改客服帐号 - 官方文档

Link to this function

upload_head_img(client, kf_account, path)

View Source
@spec upload_head_img(WeChat.client(), kf_account(), path :: Path.t()) ::
  WeChat.response()

设置客服帐号的头像 - 官方文档

头像图片文件必须是jpg格式,推荐使用640*640大小的图片以达到最佳效果。

Link to this function

upload_head_img(client, kf_account, filename, data)

View Source
@spec upload_head_img(
  WeChat.client(),
  kf_account(),
  filename :: String.t(),
  data :: binary()
) ::
  WeChat.response()

设置客服帐号的头像(binary) - 官方文档

头像图片文件必须是jpg格式,推荐使用640*640大小的图片以达到最佳效果。