cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1147
Views
3
Helpful
3
Replies

Notification Service connection with multiple logins

mark.rennie1
Level 1
Level 1

Hi,

We are integrating our 3rd party CRM software to Finesse using Java.  When an agent logs in to our application we will log the agent in to Finesse (Rest API call) and create a connection to the Notification Service (XMPP).

When they log out correctly from a session of our application we log them out of Finesse by making the appropriate logout REST API call and by cleaning up the XMPP connection.

However in practice there will be times when agents will not log out of our application properly and they will just close the application window.  In these scenarios our application will not perform the logout and cleanup of the notification service connection until our application's user session expires (e.g. This can be set to a number of minutes). 

If an agent starts a new session of our application before that timeout then we will attempt to log them back in to Finesse again and create a 2nd XMPP connection.  From what I understand the 2nd REST login request will be permitted even although they are already logged in - I think that's fine.  My concern is the 2nd XMPP connection we will create - I assume this will suffer from the fact we already have a connection running for that user and the event delivery is therefore not going to be reliable and will cause issues.


Is this a limitation/problem of Finesse? Does the Cisco Finesse desktop suffer from this problem?  I assume an agent could close the Finesse desktop without logging out correctly and then open a new browser window and attempt to login again right away.  If this is the case does the Finesse desktop deal with this scenario and how?

Thanks,
Mark

3 Replies 3

dekwan
Cisco Employee
Cisco Employee

Hi,

For the Finesse out of the box desktop, when a user closes the browser before logging out or their browser crashes, the connection (BOSH in this case) is disconnected from the notification service since the browser (who established the connection) is closed. So when an agent opens the browser window and goes to the desktop again, it is establishing a new connection, but it is still a single one since the crash disconnected the previous one. Finesse does have presence driven logout, which you pointed out can take minutes. If the agent logs in before the presence driven logout kicks in, the agent will not be in LOGOUT state. For all situations, Finesse does a GET on the user and looks at its state. If the state is LOGOUT, Finesse calls the LOGIN API. If it is not, Finesse loads the page according to the information from the GET as well as other GET APIs (dialogs, etc).

Does that explanation make sense?

Thanx,

Denise

Thanks Denise - your responses are very helpful.


We hadn't considered making a GET call on the user prior to our agent login attempt.  However from what you described I think it makes sense to do that prior to our login request to determine if the agent is already logged in.  If the agent isn't in logout state then we will assume they are logged in and take their current state from the GET response, if not then we will make a login REST request.  This should be a straightforward addition to our application's logic during a login attempt.

Unlike the Finesse OOTB desktop our application will not be able to log the agent out when they close the browser - The logout will happen but after X minutes.  If the agent logs into our application within this time interval we will need to see if there is a way to invalidate the already existing XMPP connection during this 2nd attempt to login.  We are using Smack so this may just be a Java/XMPP problem to solve.

When you mentioned Finesse has presence driven logout on a timer - how is this configured? Is there a property to set the time this kicks in at?

Thanks,
Mark

Hi,

The presence driven logout is automatically built in to Finesse. It is not configurable and can take up to 3 minutes to log out the agent (it depends on when the server detects the presence unavailability).

Please take a look at the Desktop Presence and Forced Logout section of the Developer guide for more detailed information.

Since your application is a java application and using smack, I think the best solution is to handle this 2nd attempt login there. I can see a design being something as simple as keeping a list of all open connections. When you want to create a connection, you check the list to see if there is an open connection. If so, disconnect that before making a new one. If not, go ahead and create the connection.

Let me know if you need more details about the Presence Driven Logout after reading the Desktop Presence and Forced Logout page.

Thanx,

Denise

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: