@@ -1266,6 +1266,7 @@ service WFM {
1266
1266
// If the rule will belong to a wfm agent, the agent group must be supplied instead to get a relevant set of candidate scheduling activities.
1267
1267
// Member non skill activity of each scheduling activity will be included in the response.
1268
1268
// The on call scheduling activity will always be included.
1269
+ // Reason codes will be included with the returned scheduling activities.
1269
1270
// Errors:
1270
1271
// - grpc.Invalid: the @parent_of_rule is invalid.
1271
1272
// - grpc.NotFound: @parent_of_rule doesn't exist
@@ -1285,6 +1286,7 @@ service WFM {
1285
1286
// Lists all the scheduling activities for the org making the request.
1286
1287
// Their member non skill activities and pause codes will always be included.
1287
1288
// Scheduling activities are not checked for an active or inactive state, and neither are their member activities.
1289
+ // Reason codes will be included with the returned scheduling activities.
1288
1290
// Errors:
1289
1291
// - grpc.Internal: error occurs when getting the activities or its members.
1290
1292
rpc ListSchedulingActivities (ListSchedulingActivitiesRequest ) returns (ListSchedulingActivitiesResponse ) {
@@ -1300,6 +1302,7 @@ service WFM {
1300
1302
}
1301
1303
1302
1304
// Gets the on call scheduling activity for the org sending the request.
1305
+ // Reason codes will be included with the returned scheduling activity.
1303
1306
// Required permissions:
1304
1307
// NONE
1305
1308
// Errors:
@@ -2190,6 +2193,81 @@ service WFM {
2190
2193
};
2191
2194
}
2192
2195
2196
+ // Creates the given reason code for the org sending the request.
2197
+ // If @reason_code.is_default is true and there is already a default reason code for the @reason_code.scheduling_activity_sid, the existing default reason code must be set to is_default=false first.
2198
+ // Required permissions:
2199
+ // NONE
2200
+ // Errors:
2201
+ // - grpc.AlreadyExists: the @reason_code is set to default, but there is already a default reason code for the scheduling activity.
2202
+ // - grpc.Internal: error occours when creating the reason code.
2203
+ rpc CreateReasonCode (CreateReasonCodeRequest ) returns (CreateReasonCodeResponse ) {
2204
+ option (google.api.http ).post = "/api/v1alpha1/wfm/createreasoncode" ;
2205
+ option (google.api.http ).body = "*" ;
2206
+ option (annotations.authz ) = {
2207
+ sets : [
2208
+ {
2209
+ permissions : [PERMISSION_WFM]
2210
+ }
2211
+ ]
2212
+ };
2213
+ }
2214
+
2215
+ // Updates the given reason code for the org sending the request.
2216
+ // If @reason_code.is_default is true and there is already a default reason code for the @reason_code.scheduling_activity_sid, the existing default reason code must be set to is_default=false first.
2217
+ // Required permissions:
2218
+ // NONE
2219
+ // Errors:
2220
+ // - grpc.AlreadyExists: the @reason_code is set to default, but there is already a default reason code for the scheduling activity.
2221
+ // - grpc.Internal: error occours when updating the reason code.
2222
+ rpc UpdateReasonCode (UpdateReasonCodeRequest ) returns (UpdateReasonCodeResponse ) {
2223
+ option (google.api.http ).post = "/api/v1alpha1/wfm/updatereasoncode" ;
2224
+ option (google.api.http ).body = "*" ;
2225
+ option (annotations.authz ) = {
2226
+ sets : [
2227
+ {
2228
+ permissions : [PERMISSION_WFM]
2229
+ }
2230
+ ]
2231
+ };
2232
+ }
2233
+
2234
+ // Gets the default reason code for the given @scheduling_activity_sid and the org sending the request.
2235
+ // If there is currently no default reason code for the scheduling activity, returns nil instead.
2236
+ // Required permissions:
2237
+ // NONE
2238
+ // Errors:
2239
+ // - grpc.Internal: error occours when getting the default reason code.
2240
+ rpc GetDefaultReasonCode (GetDefaultReasonCodeRequest ) returns (GetDefaultReasonCodeResponse ) {
2241
+ option (google.api.http ).post = "/api/v1alpha1/wfm/getdefaultreasoncode" ;
2242
+ option (google.api.http ).body = "*" ;
2243
+ option (annotations.authz ) = {
2244
+ sets : [
2245
+ {
2246
+ permissions : [PERMISSION_WFM]
2247
+ }
2248
+ ]
2249
+ };
2250
+ }
2251
+
2252
+ // Lists the reason codes for @scheduling_activity_sids and the org sending the request.
2253
+ // If include_inactive is set to true, inactivate reason codes will be included in the response.
2254
+ // Otherwise, only active reason codes will be included.
2255
+ // Required permissions:
2256
+ // NONE
2257
+ // Errors:
2258
+ // - grpc.Internal: error occours when listing the reason codes.
2259
+ rpc ListReasonCodes (ListReasonCodesRequest ) returns (ListReasonCodesResponse ) {
2260
+ option (google.api.http ).post = "/api/v1alpha1/wfm/listreasoncodes" ;
2261
+ option (google.api.http ).body = "*" ;
2262
+ option (annotations.authz ) = {
2263
+ sets : [
2264
+ {
2265
+ permissions : [PERMISSION_WFM]
2266
+ }
2267
+ ]
2268
+ };
2269
+ }
2270
+
2193
2271
// Deletes shift instances with the corresponding @shift_instance_sids for the org sending the request.
2194
2272
// Only deletes draft shifts. To delete published shifts use the DeletePublishedShifts endpoint.
2195
2273
// Errors:
@@ -5674,6 +5752,8 @@ message SchedulingActivity {
5674
5752
commons.SchedulingActivityClassification activity_classification = 5 ;
5675
5753
// List of all the pause codes that this activity allows.
5676
5754
repeated string pause_codes = 6 ;
5755
+ // List of all reason codes associated with this activity.
5756
+ repeated commons.ReasonCode reason_codes = 7 ;
5677
5757
}
5678
5758
5679
5759
// Request message for the ListCandidateSchedulingActivitiesReq RPC
@@ -6677,6 +6757,58 @@ message ListConfigEntitiesRes {
6677
6757
}
6678
6758
}
6679
6759
6760
+ // Request message for CreateReasonCode RPC.
6761
+ message CreateReasonCodeRequest {
6762
+ // Reason code to create.
6763
+ commons.ReasonCode reason_code = 1 ;
6764
+ }
6765
+
6766
+ // Response message for CreateReasonCode RPC.
6767
+ message CreateReasonCodeResponse {
6768
+ // ID of the newly created reason code.
6769
+ int64 reason_code_id = 1 [jstype = JS_STRING ];
6770
+ }
6771
+
6772
+ // Request message for UpdateReasonCode RPC.
6773
+ message UpdateReasonCodeRequest {
6774
+ // Reason code to update.
6775
+ commons.ReasonCode reason_code = 1 ;
6776
+ }
6777
+
6778
+ // Response message for UpdateReasonCode RPC.
6779
+ message UpdateReasonCodeResponse {}
6780
+
6781
+ // Request message for GetDefaultReasonCode RPC.
6782
+ message GetDefaultReasonCodeRequest {
6783
+ // SID of the scheduling actvity to get the default reason code for.
6784
+ int64 scheduling_activity_sid = 1 [jstype = JS_STRING ];
6785
+ }
6786
+
6787
+ // Response message for GetDefaultReasonCode RPC.
6788
+ message GetDefaultReasonCodeResponse {
6789
+ // The default reason code, if one exists.
6790
+ commons.ReasonCode default_reason_code = 1 ;
6791
+ }
6792
+
6793
+ // Request message for ListReasonCodes RPC.
6794
+ message ListReasonCodesRequest {
6795
+ // Scheduling Activity SIDs to get the reason codes for.
6796
+ repeated int64 scheduling_activity_sids = 1 ;
6797
+ // If True, includes inactive reason codes in the response.
6798
+ // If False, only active reason codes will be included.
6799
+ bool include_inactive = 2 ;
6800
+ }
6801
+
6802
+ // Response message for ListReasonCodes RPC.
6803
+ message ListReasonCodesResponse {
6804
+ message ReasonCodes {
6805
+ // A list of reason codes
6806
+ repeated commons.ReasonCode reason_codes = 1 ;
6807
+ }
6808
+ // A map from the scheduling activity sid to their reason codes.
6809
+ map <int64 , ReasonCodes > reason_codes_by_scheduling_activity = 1 ;
6810
+ }
6811
+
6680
6812
// Message type specifying the parameters of a diagnostic
6681
6813
message Diagnostic {
6682
6814
// The diagnostic level describes the class of the diagnostic message.
@@ -7131,6 +7263,8 @@ message ShiftSegment {
7131
7263
SchedulingActivity scheduling_activity = 8 ;
7132
7264
// Per-skill call stats.
7133
7265
repeated ShiftSegmentCallStat call_stats_by_skill_collection = 9 ;
7266
+ // The reason code ID associated with the shift segment.
7267
+ int64 reason_code_id = 10 [jstype = JS_STRING ];
7134
7268
}
7135
7269
7136
7270
// Request message for the GetPublishedSchedule RPC
0 commit comments