04-30-2018 01:25 PM
Hi folks,
i am trying to develop a gadget which does alerting on Agent screen when there is a call in queue assigned to the Agent.
i was trying to use User.GetQueues() to get the list of queues per agent, but found it only works for Supervisor and not for agent.
I am using finesse 9.1.1 but does still stands true for higher finesse versions?
is there any other way i can implement User.GetQueues() type of function to get queue statistics for agent.
i am able to retrieve queue statistics using Agent credentials from http://<finesse>/finesse/api/User/12001/Queues.
but not from java script, is this expected?
Solved! Go to Solution.
05-02-2018 11:39 AM
never-mind i got it using user.getUserId().
05-02-2018 10:05 AM
Hi Chintan,
Hm. I don't remember there being a role restriction for that JavaScript API, but 9.1.1 is pretty old and I don't remember if a change was made afterwards in terms of role.
Are you saying that using the same code, you are able to get information when a user logs in, but not an agent? I am asking this to make sure that the code is working correctly.
In terms of another way to implement it. Since you said that the REST API is working, you can call the REST API directly in your JavaScript. The Finesse JavaScript API does the same thing, but just helps parse the data back. You can see the ExternalRestApiSampleGadget to get an idea, but you won't be able to use it directly because its not compatible with 9.1.1.
Thanx,
Denise
05-02-2018 10:42 AM
Hi Denise,
below is what exactly i was looking for:
Cisco finesse : use of Queue Statistics gadget in Agent Role
so when i try to invoke User.GetQueues() using Agent Role i get below:
23:08:34: Header : [ClientServices] MasterPublisher._subscribeNode() - Error subscribing to node '/finesse/api/User/12001/Queues': <error xmlns="jabber:client" code="404" type="cancel"><item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error>
but when i try to invoke that using agent who has Supervisor Role: it works.
i am pretty sure the code is correct, just wanted to check if this limitation is still there on higher versions like 11.6(1)
05-02-2018 11:19 AM
Hi Chintan,
In Finesse 11.6, agents can have the queues statistics gadget on the agent desktop. The queue statistics gadget uses the getQueues method. So, my assumption is that it will work. You can verify by testing your code on a free DevNet sandbox: https://developer.cisco.com/docs/finesse/#!sandbox, but I will warn you that the gadget code is not compatible with 9.1.1 so modifications will need to be made.
I am unable to try it myself right now or else I would have checked for you.
Thanx,
Denise
05-02-2018 11:29 AM
i understand Denise, i would test it using finesse 11.6.
quick question, how would i get the Agent ID to use in finesse gadget from javascript API?
05-02-2018 11:39 AM
never-mind i got it using user.getUserId().
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide