customerservice

package
v2.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeFuInfo

type KeFuInfo struct {
	KfAccount     string `json:"kf_account"`         // 完整客服帐号,格式为:帐号前缀@公众号微信号
	KfNick        string `json:"kf_nick"`            // 客服昵称
	KfID          int    `json:"kf_id"`              // 客服编号
	KfHeadImgURL  string `json:"kf_headimgurl"`      // 客服头像
	KfWX          string `json:"kf_wx"`              // 如果客服帐号已绑定了客服人员微信号, 则此处显示微信号
	InviteWX      string `json:"invite_wx"`          // 如果客服帐号尚未绑定微信号,但是已经发起了一个绑定邀请, 则此处显示绑定邀请的微信号
	InviteExpTime int    `json:"invite_expire_time"` // 如果客服帐号尚未绑定微信号,但是已经发起过一个绑定邀请, 邀请的过期时间,为unix 时间戳
	InviteStatus  string `json:"invite_status"`      // 邀请的状态,有等待确认“waiting”,被拒绝“rejected”, 过期“expired”
}

KeFuInfo 客服基本信息

type KeFuOnlineInfo

type KeFuOnlineInfo struct {
	KfAccount    string `json:"kf_account"`
	Status       int    `json:"status"`
	KfID         int    `json:"kf_id"`
	AcceptedCase int    `json:"accepted_case"`
}

KeFuOnlineInfo 客服在线信息

type Manager

type Manager struct {
	*context.Context
}

Manager 客服管理者,可以管理客服

func NewCustomerServiceManager

func NewCustomerServiceManager(ctx *context.Context) *Manager

NewCustomerServiceManager 实例化客服管理

func (*Manager) Add

func (csm *Manager) Add(kfAccount, nickName string) (err error)

Add 添加客服账号

func (*Manager) Delete

func (csm *Manager) Delete(kfAccount string) (err error)

Delete 删除客服帐号

func (*Manager) InviteBind

func (csm *Manager) InviteBind(kfAccount, inviteWX string) (err error)

InviteBind 邀请绑定客服帐号和微信号

func (*Manager) List

func (csm *Manager) List() (customerServiceList []*KeFuInfo, err error)

List 获取所有客服基本信息

func (*Manager) OnlineList

func (csm *Manager) OnlineList() (customerServiceOnlineList []*KeFuOnlineInfo, err error)

OnlineList 获取在线客服列表

func (*Manager) SendTypingStatus

func (csm *Manager) SendTypingStatus(openid string, cmd TypingStatus) (err error)

SendTypingStatus 下发客服输入状态给用户

func (*Manager) Update

func (csm *Manager) Update(kfAccount, nickName string) (err error)

Update 修改客服账号

func (*Manager) UploadHeadImg

func (csm *Manager) UploadHeadImg(kfAccount, fileName string) (err error)

UploadHeadImg 上传客服头像

type TypingStatus

type TypingStatus string

TypingStatus 输入状态类型

const (
	// Typing 表示正在输入状态
	Typing TypingStatus = "Typing"
	// CancelTyping 表示取消正在输入状态
	CancelTyping TypingStatus = "CancelTyping"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL