beliczazsolt | 2022-07-19 11:25:31 UTC | #1
Hi all, I am using the Java SDK to update agent utilization in bulk and run into a problem (possibly a bug?). If i update the utilization with having at least 1 interrupting media for channels, the update works well. However, if there is a channel where I dont want any interruption (this is quite common), the API rejects the request stating "An unsupported media type was specified." For example: This is rejected (notice that callback interruption is empty): class Utilization { utilization: {call=class MediaUtilization { maximumCapacity: 1 interruptableMediaTypes: [chat, email] includeNonAcd: false }, chat=class MediaUtilization { maximumCapacity: 3 interruptableMediaTypes: [email] includeNonAcd: false }, callback=class MediaUtilization { maximumCapacity: 3 interruptableMediaTypes: [] includeNonAcd: false }, message=class MediaUtilization { maximumCapacity: 3 interruptableMediaTypes: [callback] includeNonAcd: false }, email=class MediaUtilization { maximumCapacity: 3 interruptableMediaTypes: [chat] includeNonAcd: false }} } And this one works (i added a media for callback as well so it is not empty) class Utilization { utilization: {call=class MediaUtilization { maximumCapacity: 1 interruptableMediaTypes: [chat, email] includeNonAcd: false }, chat=class MediaUtilization { maximumCapacity: 3 interruptableMediaTypes: [email] includeNonAcd: false }, callback=class MediaUtilization { maximumCapacity: 3 interruptableMediaTypes: [chat] includeNonAcd: false }, message=class MediaUtilization { maximumCapacity: 3 interruptableMediaTypes: [callback] includeNonAcd: false }, email=class MediaUtilization { maximumCapacity: 3 interruptableMediaTypes: [chat] includeNonAcd: false }} } I assume an empty list should be accepted by the API, is this a bug or do we need to provide a specific entry when no media is required to interrupt? I queried a valid user via the API explorer and it indeed returns empty array when there is nothing there so this should work { "utilization": { "call": { "maximumCapacity": 1, "interruptableMediaTypes": [], "includeNonAcd": true }, ....
thanks, Zsolt
beliczazsolt | 2022-07-19 12:35:51 UTC | #2
It appears the sdk sends [""] while it should be [] and I suspect this is the reason the request is rejected. I am not sure if there is an easy way to change this.
Eos_Rios | 2022-07-19 13:27:21 UTC | #3
Have you tried leaving the entire attribute off when the value should be empty?
callback=class MediaUtilization { maximumCapacity: 3 includeNonAcd: false
beliczazsolt | 2022-07-19 15:15:08 UTC | #4
Yea, just figured it out myself. I did use an empty array to set it properly but the API clearly didnt like it. Now i run a check and if the array is empty, I completely skip the interrupt part and it works. The API error is not too helpful :)
system | 2022-08-19 14:12:39 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 15579