cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
996
Views
0
Helpful
14
Replies
Highlighted
Enthusiast

10.5 Supervisor getting Agent Dialog Data

I'm working on a Supervisor gadget that allows for the Supervisor to click on an agent in their team and retrieve information.

A large majority of the functionality is working just fine except for being able to traverse into the Agent's User object and pull the active Dialogs. I can't seem to find the combination of methods to get me there.

My real question is, is there a "more correct" way of getting at the Active Dialogs for an Agent via the Supervisor than what I'm trying below?

When I debug, I can see the selected Agent _id populating and the onLoad event firing so I know I'm at least pulling the Agent ID and such for the base agent but I start hitting undefined errors on accessing "dialogs" in the _handleSelectedDialogsLoaded method, regardless of how I reference it.

I've tried a variety of parameters, combinations, and other structures from examples and samples, the code below is current state so I'm wondering if someone can see something I'm missing:

function getSelectedAgentActiveCall() {

  _selectedAgent = finn.teams[selectedTeam].roster[selectedAgent]._raw;

  _userDialogs = _selectedAgent.getDialogs({

  onLoad : _handleSelectedDialogsLoaded(),

  onError : _handleSelectedDialogsError()}

  });

}

function _handleSelectedDialogsLoaded(dialogs){

  _dialogCollection = dialogs.getCollection();

  for (var dialogId in _dialogCollection ) {

  if(_dialogCollection.hasOwnProperty(dialogId)){

  _dialog = _dialogCollection[dialogId];

  console.log('The dialog : ' + dialogId + ' has a DNIS of : ' + _dialog.getDNIS());

  }

  }

}

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi,

Let me make sure I am understanding this correctly. In your supervisor gadget, you want to get the information for each agent on the team. For each agent, you want to get their list of dialogs.

The supervisor is not authorized to see the list of dialogs for the agent. The supervisor can only get the agent information (name, extension, state, etc).

Thanx,

Denise

View solution in original post

14 REPLIES 14
Highlighted
Enthusiast

One frustrating aspect is that this is a fairly trivial operation using the Finesse Rest API (/finesse/api/User/<AgentId>/Dialogs) but reworking all of the code necessary to utilize that method is not, and the Cisco library does all of this anyway.

I suspect I'm just missing something either in my callbacks or in the object creation.

Am I just approaching this incorrectly? Is anyone else doing this a different way?

Thanks.

Highlighted

Hi,

Let me make sure I am understanding this correctly. In your supervisor gadget, you want to get the information for each agent on the team. For each agent, you want to get their list of dialogs.

The supervisor is not authorized to see the list of dialogs for the agent. The supervisor can only get the agent information (name, extension, state, etc).

Thanx,

Denise

View solution in original post

Highlighted

Thanks for the reply Denise,

I've been working off of what's documented for the JS API here:

JsDoc Reference - finesse.restservices.Dialogs

The authorization/limitation on Supervisor visibility to agent dialogs doesn't appear to be documented, at least not with the methods themselves, do you know if/where it is?

I can traverse the REST API and get there so it seems somewhat arbitrary that a Supervisor would be blocked.

Highlighted

Hi,

Unfortunately, it doesn't seem like the authorization/limitations were documented in the JSDoc. I will pass this information on to the development team. Most of the JS APIs correlate to a Finesse API and those document the security constraints.

The user object has the uri for the dialogs, but the supervisor doesn't have the authorization to call that uri.

Using the REST APIs, I tried to access an agent's /User/<agentId>/Dialogs using supervisor credentials and was blocked from doing so.

Thanx,

Denise

Highlighted

When I went across the API i was using an Administrator and the Supervisor is indeed blocked.

Though I will say that the language in the REST API isn't clear that a Supervisor does not count as an "Administrator" nor are the permissions defined anywhere else that I can locate.

How specifically is the Finesse 'administrator' controlled? I'm assuming this looks back at specific roles in the ICM/AD config but that's not really explicitly stated either.

The verbiage I am referring to is: "Agents can only get a list of their own dialogs. Administrators can get a list of dialogs associated with any user." From: User—Get List of Dialogs (Voice Only by Default)

I am assuming that Supervisor and Agent are equivalent in that sentence, but earlier in the same document, there are statements which do differentiate Agents and Supervisors:

There's a use case out here for allowing a Supervisor to see the active Dialog of Supervised Agents.

Highlighted

Hi,

A user can have different roles, there is administrator, agent, supervisor. Supervisors are users who supervise team(s). This is configured in UCCE. I don't remember there being a way to configure a user to be an administrator in UCCE, so the administrator is the user who can log into the administrator console.

Thanx,

Denise

Highlighted

In this security model, in order to use the Finesse REST API to access data I either need to expose my Administrator user to the world via JS or build server-side proxy components to handle an anonymous request that authenticates on the back-end. Neither is a trivial consideration.

It is unclear what was use-case/requirement was being fulfilled by restricting a Supervisor's access the Dialogs of their agents. Any ideas?

Highlighted

The use case of the supervisor accessing the dialogs of their agents was not requested (at least enough for it to be prioritized higher). Most supervisors only want to know about the agent state and the duration in that state.

Highlighted

Hello Denise,

Thanks for actively responding to all the posts in this forum. I am trying to do almost exactly the same thing Foneguy is trying to do via Java script APIs (Finesse gadgets). That is trying to get Dialog states for a agent from the supervisor view. I am able to get the state and user name however,my requirement is to be able to get info like "Call Type" and "Dialed Number" for a given  agent in case his state changes to talking. Currently In CTIOS we are able to pull such information related to the agent from the supervisor view. Actually this request is stemming from what supervisors were able to do in CTIOS vs finesse.  Are we unable to achieve this in finesse ? We are currently on 11.5 Version of finesse.

Highlighted

Hi,

Correct. A Finesse supervisor doesn't have this kind of information exposed about their agent and therefore cannot even build a custom gadget.

Thanx,

Denise

Highlighted

Hi Denise,

When the agent state changes , the team state of the agent changes in the supervisor's view. I am trying to capture the calltype of the agent under the supervisor by capturing the getDialog api . But I am not getting the agent's id  under the dialog service

dialog = user.getDialogs({

                onCollectionAdd: handleNewDialog,

                onCollectionDelete: handleEndDialog,

                onLoad : handleDialogsLoaded

            });

.Is there any way to get the agent's information from the above service?

Highlighted

Hi,

Sorry, I'm not quite following what you are trying to do. As a supervisor, you are trying to get the agent's call type? The supervisor has no access to the agent's calls so it isn't possible.

Thanx,

Denise

Highlighted

Hi Denise,

Yes, I was trying to capture the calltype of agent from a supervisor's view.

Regards,

Poonam

Highlighted

Hi Poonam,

Thanks for the clarification. To confirm, that is not possible with Finesse.

Thanx,

Denise

Content for Community-Ad