cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
972
Views
0
Helpful
5
Replies

Finesse Javascript API: user.getQueue use for Agent.

chgajjar
Cisco Employee
Cisco Employee

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?

1 Accepted Solution

Accepted Solutions

never-mind i got it using user.getUserId().

View solution in original post

5 Replies 5

dekwan
Cisco Employee
Cisco Employee

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

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)

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

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?

never-mind i got it using user.getUserId().