-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathservice.proto
138 lines (113 loc) · 3.04 KB
/
service.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
syntax = "proto3";
option go_package = "./service";
message PutTask {
bytes customData = 1;
string taskUUID = 2;
}
message Init {
enum PredictiveType {
DEFAULT = 0;
AR_OPTIMIZED = 1; // PDS uses abandoned calls control rate for answered calls. Works for a large number of operators (more than 20).
BF_OPTIMIZED = 2; // PDS uses agent busy factor control algorithm. Works for a large number of operators (more than 20).
AR_SMALL_GROUP = 3; // PDS uses abandoned calls control rate for answered calls. Works only when the number of agents is less than 20.
AR_AUTO_BALANCED = 4; // PDS uses abandoned calls control rate for answered calls. Works as a combination of AR_OPTIMIZED and AR_SMALL_GROUP algorithms.
}
Statistic init_stat = 1;
sint32 account_id = 2;
string api_key = 3;
oneof rule {
sint32 rule_id = 4;
string rule_name = 18; // Rule name available only with application
}
string reference_ip = 5;
sint32 queue_id = 6;
string session_id = 10; // optional. use to continue processing after disconnect
double maximum_error_rate = 12; // default: 0.02
double minimum_busy_factor = 20; // default: 0.8
PredictiveType predictive_type = 21;
ACD acd_version = 15;
enum ACD {
V1 = 0;
SQ = 1;
}
oneof application {
sint32 application_id = 16; // for working with SQ
string application_name = 19;
}
TaskMultiplier task_multiplier = 17; //for progressive
}
message Statistic {
double avgTimeTalkSec = 1;
double percentSuccessful = 2;
double avgDialTimeSec = 3;
double avgTotalTimeSec = 4;
}
message ErrRate {
double maximum_error_rate = 1;
}
message BusyFactor {
double minimum_busy_factor = 1;
}
message RequestMessage {
enum Type {
PUT_TASK = 0;
INIT = 1;
SET_STATISTIC = 2;
SET_ERROR_RATE = 3;
SET_TASK_MULTIPLIER = 4;
SET_BUSY_FACTOR = 5;
PING = 10;
}
Type type = 1;
PutTask task = 2;
Init init = 3;
Statistic statistic = 4;
ErrRate errRate = 5;
TaskMultiplier taskMultiplier = 6;
BusyFactor busyFactor = 7;
}
message GetTask {
sint32 count = 1;
}
message InitResponse {
string session_id = 1;
}
message TaskEvent {
enum Type {
STARTED = 0;
}
string taskUUID = 1;
Type type = 2;
}
message ServiceMessage {
enum Type {
GET_TASK = 0;
INIT_RESPONSE = 1;
TASK_EVENT = 2;
PONG = 10;
}
Type type = 1;
GetTask request = 2;
InitResponse init = 3;
TaskEvent event = 4;
}
enum CompleteType {
SUCCESS = 0;
FAIL = 1;
DIAL_COMPLETE = 2;
}
message CompleteRequest {
string agent = 1;
string task_uuid = 2;
CompleteType type = 3;
}
message HealthCheckRequest {
string agent = 1;
}
message TaskMultiplier {
float multiplier = 1;
}
service PDS {
rpc Start (stream RequestMessage) returns (stream ServiceMessage);
rpc StartProgressive (stream RequestMessage) returns (stream ServiceMessage);
}