Counting number of idle agents from different queues in Architect

Hi,

I've already opened a thread on community.genesys.com but not sure if I can better check it here on developer forum.

I'm doing a count of idle agents from different queues (through a data action) through providing a list of queues (as you can't get this in one go by providing multiple queues in analytics API/data action but HAVE to be queried one by one). Here below are the steps I'm taking.

1- queue collection
2- looping though data action for the idle agents
3- putting the idle agents in a collection = AddItemAt(MakeList(ToInt(Task.idle_agents)), Task.index, ToInt(Task.idle_agents))
4- getting the item at the specified index = GetAt(Task.total_idle_collection, Task.index)
5- making a total = if(IsNotSetOrEmpty(Task.counting_total), 0, Task.counting_total) + Task.total_idle

Everything is working fine but ONLY for first two queues in the collection (I set the count/result of total to TTS). Once it loops to 3rd queue I get the result from data action but above mentioned total count fails and follows the error handling path.

Can anyone suggest what should be going wrong or if I'm making a mistake somewhere?

KR, Asad

Finally fixed it myself. There was an issue in the first collection mentioned above (making list with idle_agents wasn't the correct manner :slight_smile: ).

Hi,

Glad you were able to figure it out. I am closing this topic. Please free to open another topic if you have any other questions or concerns.

Best