customer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 5 Imported by: 0

README

客户连接

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCorpTagItem

type AddCorpTagItem struct {
	Name  string `json:"name"`
	Order int    `json:"order,omitempty"`
}

AddCorpTagItem 添加标签项

type AddCorpTagRequest

type AddCorpTagRequest struct {
	GroupId   string           `json:"group_id,omitempty"`
	GroupName string           `json:"group_name,omitempty"`
	Order     int              `json:"order,omitempty"`
	Tag       []AddCorpTagItem `json:"tag"`
	Agentid   int64            `json:"agentid,omitempty"`
}

AddCorpTagRequest 添加企业客户标签请求

type BatchGetByUserRequest

type BatchGetByUserRequest struct {
	UseridList []string `json:"userid_list"`
	Cursor     string   `json:"cursor,omitempty"`
	Limit      int      `json:"limit,omitempty"`
}

BatchGetByUserRequest 批量获取客户详情请求

type BatchGetByUserResult

type BatchGetByUserResult struct {
	ExternalContactList []ExternalContactBatchInfo `json:"external_contact_list"`
	NextCursor          string                     `json:"next_cursor"`
}

BatchGetByUserResult 批量获取客户详情结果

type CreateStrategyRequest

type CreateStrategyRequest struct {
	ParentId     int                 `json:"parent_id,omitempty"`
	StrategyName string              `json:"strategy_name"`
	AdminList    []string            `json:"admin_list"`
	Privilege    *StrategyPrivilege  `json:"privilege,omitempty"`
	Range        []StrategyRangeItem `json:"range"`
}

CreateStrategyRequest 创建规则组请求

type Customer

type Customer struct {
	// contains filtered or unexported fields
}

Customer 客户联系

func NewCustomer

func NewCustomer(account contracts.AccountInterface) *Customer

func (*Customer) ExternalContact

func (c *Customer) ExternalContact() *ExternalContact

ExternalContact 客户管理

func (*Customer) GroupChat

func (c *Customer) GroupChat() *GroupChat

GroupChat 客户群管理

func (*Customer) Strategy

func (c *Customer) Strategy() *Strategy

Strategy 客户联系规则组管理

func (*Customer) Tag

func (c *Customer) Tag() *Tag

Tag 客户标签管理

type DelCorpTagRequest

type DelCorpTagRequest struct {
	TagId   []string `json:"tag_id,omitempty"`
	GroupId []string `json:"group_id,omitempty"`
	Agentid int64    `json:"agentid,omitempty"`
}

DelCorpTagRequest 删除企业客户标签请求

type EditCorpTagRequest

type EditCorpTagRequest struct {
	Id      string `json:"id"`
	Name    string `json:"name,omitempty"`
	Order   int    `json:"order,omitempty"`
	Agentid int64  `json:"agentid,omitempty"`
}

EditCorpTagRequest 编辑企业客户标签请求

type EditStrategyRequest

type EditStrategyRequest struct {
	StrategyId   int                 `json:"strategy_id"`
	StrategyName string              `json:"strategy_name,omitempty"`
	AdminList    []string            `json:"admin_list,omitempty"`
	Privilege    *StrategyPrivilege  `json:"privilege,omitempty"`
	RangeAdd     []StrategyRangeItem `json:"range_add,omitempty"`
	RangeDel     []StrategyRangeItem `json:"range_del,omitempty"`
}

EditStrategyRequest 编辑规则组请求

type ExternalAttr

type ExternalAttr struct {
	Type int    `json:"type"`
	Name string `json:"name"`
	Text *struct {
		Value string `json:"value"`
	} `json:"text,omitempty"`
	Web *struct {
		Url   string `json:"url"`
		Title string `json:"title"`
	} `json:"web,omitempty"`
	MiniProgram *struct {
		Appid    string `json:"appid"`
		Pagepath string `json:"pagepath"`
		Title    string `json:"title"`
	} `json:"miniprogram,omitempty"`
}

ExternalAttr 外部联系人扩展属性项

type ExternalContact

type ExternalContact struct {
	// contains filtered or unexported fields
}

ExternalContact 客户管理

func NewExternalContact

func NewExternalContact(account contracts.AccountInterface) *ExternalContact

func (*ExternalContact) BatchGetByUser

BatchGetByUser 批量获取客户详情

func (*ExternalContact) Get

func (c *ExternalContact) Get(externalUserid string, cursor string) (*ExternalContactDetail, error)

Get 获取客户详情

func (*ExternalContact) GetFollowUserList

func (c *ExternalContact) GetFollowUserList() ([]string, error)

GetFollowUserList 获取配置了客户联系功能的成员列表

func (*ExternalContact) List

func (c *ExternalContact) List(userid string) ([]string, error)

List 获取客户列表

func (*ExternalContact) Remark

func (c *ExternalContact) Remark(req RemarkRequest) error

Remark 修改客户备注信息

func (*ExternalContact) ToServiceExternalUserid

func (c *ExternalContact) ToServiceExternalUserid(externalUserid string) (string, error)

ToServiceExternalUserid 代开发应用external_userid转换

func (*ExternalContact) UnionidToExternalUserid

func (c *ExternalContact) UnionidToExternalUserid(req UnionidToExternalUseridRequest) ([]ExternalUseridInfo, error)

UnionidToExternalUserid unionid转换为external_userid

type ExternalContactBatchInfo

type ExternalContactBatchInfo struct {
	ExternalContact ExternalContactInfo `json:"external_contact"`
	FollowInfo      FollowUser          `json:"follow_info"`
}

ExternalContactBatchInfo 批量获取的客户详情项

type ExternalContactDetail

type ExternalContactDetail struct {
	ExternalContact ExternalContactInfo `json:"external_contact"`
	FollowUser      []FollowUser        `json:"follow_user"`
	NextCursor      string              `json:"next_cursor"`
}

ExternalContactDetail 客户详情

type ExternalContactInfo

type ExternalContactInfo struct {
	ExternalUserid  string           `json:"external_userid"`
	Name            string           `json:"name"`
	Position        string           `json:"position"`
	Avatar          string           `json:"avatar"`
	CorpName        string           `json:"corp_name"`
	CorpFullName    string           `json:"corp_full_name"`
	Type            int              `json:"type"`
	Gender          int              `json:"gender"`
	Unionid         string           `json:"unionid"`
	ExternalProfile *ExternalProfile `json:"external_profile,omitempty"`
}

ExternalContactInfo 外部联系人信息

type ExternalProfile

type ExternalProfile struct {
	ExternalAttr []ExternalAttr `json:"external_attr,omitempty"`
}

ExternalProfile 外部联系人扩展属性

type ExternalUseridInfo

type ExternalUseridInfo struct {
	CorpName       string `json:"corp_name"`
	ExternalUserid string `json:"external_userid"`
}

ExternalUseridInfo external_userid信息

type FollowUser

type FollowUser struct {
	Userid         string          `json:"userid"`
	Remark         string          `json:"remark"`
	Description    string          `json:"description"`
	Createtime     int64           `json:"createtime"`
	Tags           []FollowUserTag `json:"tags,omitempty"`
	RemarkCorpName string          `json:"remark_corp_name"`
	RemarkMobiles  []string        `json:"remark_mobiles"`
	OperUserid     string          `json:"oper_userid"`
	AddWay         int             `json:"add_way"`
	WechatChannels *WechatChannels `json:"wechat_channels,omitempty"`
	State          string          `json:"state"`
}

FollowUser 跟进成员信息

type FollowUserTag

type FollowUserTag struct {
	GroupName string `json:"group_name"`
	TagName   string `json:"tag_name"`
	TagId     string `json:"tag_id"`
	Type      int    `json:"type"`
}

FollowUserTag 跟进成员标签

type GetCorpTagListRequest

type GetCorpTagListRequest struct {
	TagId   []string `json:"tag_id,omitempty"`
	GroupId []string `json:"group_id,omitempty"`
}

GetCorpTagListRequest 获取企业标签库请求

type GroupChat

type GroupChat struct {
	// contains filtered or unexported fields
}

GroupChat 客户群管理

func NewGroupChat

func NewGroupChat(account contracts.AccountInterface) *GroupChat

func (*GroupChat) AddJoinWay

func (g *GroupChat) AddJoinWay(req GroupChatJoinWayRequest) (string, error)

AddJoinWay 配置客户群进群方式

func (*GroupChat) DelJoinWay

func (g *GroupChat) DelJoinWay(configId string) error

DelJoinWay 删除客户群进群方式配置

func (*GroupChat) Get

Get 获取客户群详情

func (*GroupChat) GetJoinWay

func (g *GroupChat) GetJoinWay(configId string) (*GroupChatJoinWay, error)

GetJoinWay 获取客户群进群方式配置

func (*GroupChat) List

List 获取客户群列表

func (*GroupChat) OpengidToChatId

func (g *GroupChat) OpengidToChatId(opengid string) (string, error)

OpengidToChatId 客户群opengid转换

func (*GroupChat) UpdateJoinWay

func (g *GroupChat) UpdateJoinWay(req GroupChatJoinWayUpdateRequest) error

UpdateJoinWay 更新客户群进群方式配置

type GroupChatAdmin

type GroupChatAdmin struct {
	Userid string `json:"userid"`
}

GroupChatAdmin 群管理员

type GroupChatDetail

type GroupChatDetail struct {
	ChatId        string            `json:"chat_id"`
	Name          string            `json:"name"`
	Owner         string            `json:"owner"`
	CreateTime    int64             `json:"create_time"`
	Notice        string            `json:"notice"`
	MemberList    []GroupChatMember `json:"member_list"`
	AdminList     []GroupChatAdmin  `json:"admin_list"`
	MemberVersion string            `json:"member_version"`
}

GroupChatDetail 客户群详情

type GroupChatGetRequest

type GroupChatGetRequest struct {
	ChatId   string `json:"chat_id"`
	NeedName int    `json:"need_name,omitempty"`
}

GroupChatGetRequest 获取客户群详情请求

type GroupChatJoinWay

type GroupChatJoinWay struct {
	ConfigId       string   `json:"config_id"`
	Scene          int      `json:"scene"`
	Remark         string   `json:"remark"`
	AutoCreateRoom int      `json:"auto_create_room"`
	RoomBaseName   string   `json:"room_base_name"`
	RoomBaseId     int      `json:"room_base_id"`
	ChatIdList     []string `json:"chat_id_list"`
	QrCode         string   `json:"qr_code"`
	State          string   `json:"state"`
	MarkSource     bool     `json:"mark_source"`
}

GroupChatJoinWay 客户群进群方式详情

type GroupChatJoinWayRequest

type GroupChatJoinWayRequest struct {
	Scene          int      `json:"scene"`
	Remark         string   `json:"remark,omitempty"`
	AutoCreateRoom int      `json:"auto_create_room,omitempty"`
	RoomBaseName   string   `json:"room_base_name,omitempty"`
	RoomBaseId     int      `json:"room_base_id,omitempty"`
	ChatIdList     []string `json:"chat_id_list"`
	State          string   `json:"state,omitempty"`
	MarkSource     *bool    `json:"mark_source,omitempty"`
}

GroupChatJoinWayRequest 配置客户群进群方式请求

type GroupChatJoinWayUpdateRequest

type GroupChatJoinWayUpdateRequest struct {
	ConfigId       string   `json:"config_id"`
	Scene          int      `json:"scene"`
	Remark         string   `json:"remark,omitempty"`
	AutoCreateRoom int      `json:"auto_create_room,omitempty"`
	RoomBaseName   string   `json:"room_base_name,omitempty"`
	RoomBaseId     int      `json:"room_base_id,omitempty"`
	ChatIdList     []string `json:"chat_id_list"`
	State          string   `json:"state,omitempty"`
	MarkSource     *bool    `json:"mark_source,omitempty"`
}

GroupChatJoinWayUpdateRequest 更新客户群进群方式请求

type GroupChatListItem

type GroupChatListItem struct {
	ChatId string `json:"chat_id"`
	Status int    `json:"status"`
}

GroupChatListItem 客户群列表项

type GroupChatListRequest

type GroupChatListRequest struct {
	StatusFilter int          `json:"status_filter"`
	OwnerFilter  *OwnerFilter `json:"owner_filter,omitempty"`
	Cursor       string       `json:"cursor,omitempty"`
	Limit        int          `json:"limit"`
}

GroupChatListRequest 获取客户群列表请求

type GroupChatListResult

type GroupChatListResult struct {
	GroupChatList []GroupChatListItem `json:"group_chat_list"`
	NextCursor    string              `json:"next_cursor"`
}

GroupChatListResult 获取客户群列表结果

type GroupChatMember

type GroupChatMember struct {
	Userid        string                  `json:"userid"`
	Type          int                     `json:"type"`
	Unionid       string                  `json:"unionid,omitempty"`
	JoinTime      int64                   `json:"join_time"`
	JoinScene     int                     `json:"join_scene"`
	Invitor       *GroupChatMemberInvitor `json:"invitor,omitempty"`
	GroupNickname string                  `json:"group_nickname"`
	Name          string                  `json:"name,omitempty"`
	State         string                  `json:"state,omitempty"`
}

GroupChatMember 群成员

type GroupChatMemberInvitor

type GroupChatMemberInvitor struct {
	Userid string `json:"userid"`
}

GroupChatMemberInvitor 邀请者

type MarkTagRequest

type MarkTagRequest struct {
	Userid         string   `json:"userid"`
	ExternalUserid string   `json:"external_userid"`
	AddTag         []string `json:"add_tag,omitempty"`
	RemoveTag      []string `json:"remove_tag,omitempty"`
}

MarkTagRequest 编辑客户企业标签请求

type OwnerFilter

type OwnerFilter struct {
	UseridList []string `json:"userid_list"`
}

OwnerFilter 群主过滤

type RemarkRequest

type RemarkRequest struct {
	Userid           string   `json:"userid"`
	ExternalUserid   string   `json:"external_userid"`
	Remark           string   `json:"remark,omitempty"`
	Description      string   `json:"description,omitempty"`
	RemarkCompany    string   `json:"remark_company,omitempty"`
	RemarkMobiles    []string `json:"remark_mobiles,omitempty"`
	RemarkPicMediaid string   `json:"remark_pic_mediaid,omitempty"`
}

RemarkRequest 修改客户备注信息请求

type Strategy

type Strategy struct {
	// contains filtered or unexported fields
}

Strategy 客户联系规则组管理

func NewStrategy

func NewStrategy(account contracts.AccountInterface) *Strategy

func (*Strategy) Create

func (s *Strategy) Create(req CreateStrategyRequest) (int, error)

Create 创建新的规则组

func (*Strategy) Del

func (s *Strategy) Del(strategyId int) error

Del 删除规则组

func (*Strategy) Edit

func (s *Strategy) Edit(req EditStrategyRequest) error

Edit 编辑规则组及其管理范围

func (*Strategy) Get

func (s *Strategy) Get(strategyId int) (*StrategyInfo, error)

Get 获取规则组详情

func (*Strategy) GetRange

GetRange 获取规则组管理范围

func (*Strategy) List

func (s *Strategy) List(cursor string, limit int) (*StrategyListResult, error)

List 获取规则组列表

type StrategyGetRangeRequest

type StrategyGetRangeRequest struct {
	StrategyId int    `json:"strategy_id"`
	Cursor     string `json:"cursor,omitempty"`
	Limit      int    `json:"limit,omitempty"`
}

StrategyGetRangeRequest 获取规则组管理范围请求

type StrategyGetRangeResult

type StrategyGetRangeResult struct {
	Range      []StrategyRangeItem `json:"range"`
	NextCursor string              `json:"next_cursor"`
}

StrategyGetRangeResult 获取规则组管理范围结果

type StrategyInfo

type StrategyInfo struct {
	StrategyId   int               `json:"strategy_id"`
	ParentId     int               `json:"parent_id"`
	StrategyName string            `json:"strategy_name"`
	CreateTime   int64             `json:"create_time"`
	AdminList    []string          `json:"admin_list"`
	Privilege    StrategyPrivilege `json:"privilege"`
}

StrategyInfo 规则组详情

type StrategyListItem

type StrategyListItem struct {
	StrategyId int `json:"strategy_id"`
}

StrategyListItem 规则组列表项

type StrategyListResult

type StrategyListResult struct {
	Strategy   []StrategyListItem `json:"strategy"`
	NextCursor string             `json:"next_cursor"`
}

StrategyListResult 获取规则组列表结果

type StrategyPrivilege

type StrategyPrivilege struct {
	ViewCustomerList        bool `json:"view_customer_list"`
	ViewCustomerData        bool `json:"view_customer_data"`
	ViewRoomList            bool `json:"view_room_list"`
	ContactMe               bool `json:"contact_me"`
	JoinRoom                bool `json:"join_room"`
	ShareCustomer           bool `json:"share_customer"`
	OperResignCustomer      bool `json:"oper_resign_customer"`
	OperResignGroup         bool `json:"oper_resign_group"`
	SendCustomerMsg         bool `json:"send_customer_msg"`
	EditWelcomeMsg          bool `json:"edit_welcome_msg"`
	ViewBehaviorData        bool `json:"view_behavior_data"`
	ViewRoomData            bool `json:"view_room_data"`
	SendGroupMsg            bool `json:"send_group_msg"`
	RoomDeduplication       bool `json:"room_deduplication"`
	RapidReply              bool `json:"rapid_reply"`
	OnjobCustomerTransfer   bool `json:"onjob_customer_transfer"`
	EditAntiSpamRule        bool `json:"edit_anti_spam_rule"`
	ExportCustomerList      bool `json:"export_customer_list"`
	ExportCustomerData      bool `json:"export_customer_data"`
	ExportCustomerGroupList bool `json:"export_customer_group_list"`
	ManageCustomerTag       bool `json:"manage_customer_tag"`
}

StrategyPrivilege 规则组权限

type StrategyRangeItem

type StrategyRangeItem struct {
	Type    int    `json:"type"`
	Userid  string `json:"userid,omitempty"`
	Partyid int    `json:"partyid,omitempty"`
}

StrategyRangeItem 规则组管理范围节点

type Tag

type Tag struct {
	// contains filtered or unexported fields
}

Tag 客户标签管理

func NewTag

func NewTag(account contracts.AccountInterface) *Tag

func (*Tag) AddCorpTag

func (t *Tag) AddCorpTag(req AddCorpTagRequest) (*TagGroup, error)

AddCorpTag 添加企业客户标签

func (*Tag) DelCorpTag

func (t *Tag) DelCorpTag(req DelCorpTagRequest) error

DelCorpTag 删除企业客户标签

func (*Tag) EditCorpTag

func (t *Tag) EditCorpTag(req EditCorpTagRequest) error

EditCorpTag 编辑企业客户标签

func (*Tag) GetCorpTagList

func (t *Tag) GetCorpTagList(req GetCorpTagListRequest) ([]TagGroup, error)

GetCorpTagList 获取企业标签库

func (*Tag) MarkTag

func (t *Tag) MarkTag(req MarkTagRequest) error

MarkTag 编辑客户企业标签

type TagGroup

type TagGroup struct {
	GroupId    string    `json:"group_id"`
	GroupName  string    `json:"group_name"`
	CreateTime int64     `json:"create_time"`
	Order      int       `json:"order"`
	Deleted    bool      `json:"deleted"`
	Tag        []TagItem `json:"tag"`
}

TagGroup 标签组

type TagItem

type TagItem struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	CreateTime int64  `json:"create_time"`
	Order      int    `json:"order"`
	Deleted    bool   `json:"deleted"`
}

TagItem 标签项

type UnionidToExternalUseridRequest

type UnionidToExternalUseridRequest struct {
	Unionid string `json:"unionid"`
	Openid  string `json:"openid,omitempty"`
}

UnionidToExternalUseridRequest unionid转换请求

type WechatChannels

type WechatChannels struct {
	Nickname string `json:"nickname"`
	Source   int    `json:"source"`
}

WechatChannels 视频号信息

Jump to

Keyboard shortcuts

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