支持可配置的会话自动分配策略
- 租户可设置负载最低或轮询,以及每位坐席最大进行中会话数 - 自动分配按策略过滤在线一线客服,满并发则保持排队 - 系统设置「客服分配规则」页可保存上述配置
This commit is contained in:
@@ -156,7 +156,7 @@ type Announcement struct {
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// TenantSetting 租户级系统设置(欢迎语、工作时间、通知开关等)。
|
||||
// TenantSetting 租户级系统设置(欢迎语、工作时间、通知开关、分配策略等)。
|
||||
type TenantSetting struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
TenantID uint `gorm:"uniqueIndex;not null" json:"tenant_id"`
|
||||
@@ -170,6 +170,12 @@ type TenantSetting struct {
|
||||
NotifyNewSession bool `gorm:"default:true" json:"notify_new_session"`
|
||||
NotifyOfflineLeave bool `gorm:"default:true" json:"notify_offline_leave"`
|
||||
NotifyDailyReport bool `gorm:"default:false" json:"notify_daily_report"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
// AssignStrategy 自动分配策略:least_load(默认)| round_robin
|
||||
AssignStrategy string `gorm:"size:30;default:least_load" json:"assign_strategy"`
|
||||
// MaxActivePerAgent 每位坐席最大进行中会话数;0 表示不限制
|
||||
MaxActivePerAgent int `gorm:"default:0" json:"max_active_per_agent"`
|
||||
// RRLastAgentID 轮询策略的上次分配坐席游标
|
||||
RRLastAgentID *uint `json:"-"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user