cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
1186
Views
0
Helpful
12
Replies

Gadget invoked when Supervisor trying to force Logout agent

smeegada1
Spotlight
Spotlight
  1. Custom Gadget is getting invoked when Supervisor is trying to Force Logout agent so after looking at locallogs i noticed "label":"Supervisor Initiated" is set so when am checking IF condition for "label":"Supervisor Initiated" to skip the gadget, label is getting as EMPTY.Any idea?
1 Accepted Solution

Accepted Solutions

Hi,

Not for the logout condition for the reasons why I had stated earlier, the desktop is being logged out so there isn't much that can be done. You would need to have a separate server listening to the events to add any logout logic.

Thanx,
Denise

View solution in original post

12 Replies 12

dekwan
Cisco Employee
Cisco Employee
Hi,

Is this gadget on the supervisor side or the agent side. I am assuming this is on the agent side. What is the code that you are using to get the label? In the developer tools' console, do you see "Supervisor Initiated" in the label field of the event?

Thanx,
Denise

Hi,,

Gadget is on Agent side,I do see following in Agent Locallog when supervisor trying to Force logout agent so i tried writing logic based on label below.In developer tool console i am getting label as empty so not sure what am missing.

 

      <reasonCode>
        <category>LOGOUT</category>
        <code>999</code>
        <forAll>true</forAll>
        <id>20</id>
        <label>Supervisor Initiated</label>
        <systemCode>true</systemCode>

Hi,

If you are seeing the label in the Agent's locallog, then it should be. It is very possible you are getting two agent state events where one has the supervisor initiated reason code and one without. How you tried to print out all of the different labels you are getting? Also, how are you getting the label code wise.

Thanx,
Denise

I think you may be right because i tried printing alert as soon as agent Login to finesse and getting EMPTY for label with below code.

var rCode = user.getReasonCodeLabel();

 

Following is printing in Locallogs with Agent(User) info not Supervisor, so do you know how can i find the request is from Supervisor.

  <data>
    <user>
      <dialogs>/finesse/api/User//Dialogs</dialogs>
      <extension></extension>
      <firstName>AGENTNAME</firstName>
      <lastName>AGENTNAME</lastName>
      <loginId>AGENTID</loginId>
      <loginName>eAGENTID</loginName>
      <mediaType>1</mediaType>
      <pendingState></pendingState>
      <reasonCode>
        <category>LOGOUT</category>
        <code>999</code>
        <forAll>true</forAll>
        <id>20</id>
        <label>Supervisor Initiated</label>
        <systemCode>true</systemCode>
        <uri>/finesse/api/ReasonCode/20</uri>
      </reasonCode>
      <reasonCodeId>20</reasonCodeId>
      <roles>
        <role>Agent</role>
      </roles>
      <settings>
        <wrapUpOnIncoming>REQUIRED</wrapUpOnIncoming>
      </settings>
      <state>LOGOUT</state>
      <stateChangeTime>2018-10-05T18:21:27.295Z</stateChangeTime>
      <teamId>TEAMID</teamId>
      <teamName>TEAMNAME</teamName>
      <uri>/finesse/api/User/AGENTID</uri>
    </user>
  </data>

 

 

 

I have printed all labels in NOT_READY and LOGOUT but don't see 'Supervisor Initiated' configured i think this is system generated with code 999.

Hi,

That is the right code and it works fine for reading the reason code label when I tested it out using not ready reasons. I am pretty sure that the reason why it isn't working is because that agent is being logged out. So a lot of the container/desktop is being torn down. Gadgets that are supposed to be invoked on log out won't be reliable. It is a race condition.

Thanx,
Denise

Thanks for all your help, Do you think of any other condition where we can get at least some info to build logic?

Hi,

Not for the logout condition for the reasons why I had stated earlier, the desktop is being logged out so there isn't much that can be done. You would need to have a separate server listening to the events to add any logout logic.

Thanx,
Denise

Hi Dekwan,Good Morning,

  I have executed multiple scenarios and noticed we are getting Supervisor Initiated in user.getReasonCodeLabel() when supervisor ForceLogut agent when agent is in READY status but not getting Supervisor Initiated in user.getReasonCodeLabel() when agent in NOT_READY status.Any insight?

Hi,

You mention that is the situation for user.getReasonCodeLabel, but how about the Finesse events itself? If I recall my previous testing, the actual event shows Supervisor Initiated when the agent is logged out from NOT_READY state.

Thanx,
Denise

When i enable console logs i see following in both when Agent is READY AND NOT_READY.

 

        <category>LOGOUT</category>
        <code>999</code>
        <forAll>true</forAll>
        <id>20</id>
        <label>Supervisor Initiated</label>
        <systemCode>true</systemCode>
        <uri>/finesse/api/ReasonCode/20</uri>

 

But when i print user object, in READY scenario in user.getReasonCodeLabel() we will get Supervisor Initiated but in NOT_READY am getting Agent Not_ready reason code like Break.....

 

Does this answer your question?

Hi,

Since you are seeing that XML in the console logs, it looks like Finesse is sending the right event to the desktop. So, you are probably running into the race condition I mentioned before where the desktop is in the process of logging out, so it isn't updating the user object anymore.

Thanx,
Denise