cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
766
Views
5
Helpful
1
Replies

Custom Finesse Gadget - Log out issue

sathesujit
Level 1
Level 1

Hello experts,

I have a custom Finesse gadget where I am making a 3rd party webservice call when agent logs out of finesse.

The way I have implemented it is by adding a web service call under handleUserChange method as shown below..

My problem is - 

Intermittently (or I should say 95% of the time), finesse is duplicating the web service call. I see 2 requests coming from finesse at the same time to the web service that should be invoked only once on agent log out. (I have other web service calls that are invoked from the same gadget depending on agent states.. and they all work fine .. Issue seems tobe only with the one that is invoked on Log out..)

If I run this in debug mode in the browser, then I see my web service call on the finesse browser is getting invoked only once but on the server side I see 2 HTTP Post requests coming in at exactly same time with exactly same data...

Need to resolve this asap as this is a production issue.

 

Thanks in advance for all the help..

Regards,

Sujit Sathe

CDW

/**
* Handler for all User updates
*/
handleUserChange = function(userevent) {
clientLogs.log("handleUserChange()");
//handle logout actions in this block
var currentState = user.getState();
if(myCurrentExtn == null){
myCurrentExtn = user.getExtension();
}
if(myCurrentLoginName == null){
myCurrentLoginName = user.getData().loginName;
}
if(currentState == "LOGOUT"){
//alert('logout action');
//alert('calling invalidateAgentSession');
deleteAgentSession(user.getData().loginName, userExtension);
}
};

1 Reply 1

dekwan
Cisco Employee
Cisco Employee

Hi,

 

The logout scenario is a tricky one. It is a race condition to be completely honest because the Finesse desktop is tearing down.

 


@sathesujit wrote:

If I run this in debug mode in the browser, then I see my web service call on the finesse browser is getting invoked only once but on the server side I see 2 HTTP Post requests coming in at exactly same time with exactly same data...


I would suggest using Fiddler or wireshark to see who is invoking the second request, especially since you say that the call is only being invoked once on the Finesse browser. It will be good to know if it is an issue on the Finesse side or your server side.

 

But ultimately, even if it is on the Finesse side, it will be very difficult to fix because as I said above, the desktop is being torn down.

 

Thanx,

Denise