Sessiontransfer - how to get started?

Jun 13, 2013 at 2:58 PM
Hi all,

is anybody able to share some experiences when it comes to the UII SessionTransfer? The Call Transfer is realized but we have to be able to transfer the whole UiiSession.

We are currently stuck on "how to get started".

We noticed the UII CRM Entities regarding this topic and we know that the AgentStateService comes into play somehow but we dont get the whole picture.

any help is highly appreciated

thanks in advance

Jun 14, 2013 at 3:53 PM
ok, got it ..
Nov 22, 2013 at 12:22 PM
Hi Niklas,

Can you shed some more lights on this ?

Dec 3, 2013 at 2:00 PM
Well, let me try that... Our production code differs a lot from the base implementation but i will try to sketch the idea of that base implementation.

Basically the sessions are transfered via the 'UII Session Transfer' Entity. The handling of that Entity is managed by the AgentStateEntityManager (Microsoft.Uii.CrmEntityManager.AgentStateEntityManager) which is used by the AgentStateService (check Microsoft.Uii.AifServices.IAgentStateService and Microsoft.Uii.AifServices.AgentStateService)

What you want to do when transfering a session is searialize its informations and save it using the AgentStateService. Something like
var sessionInformation = _localSessionManager.ActiveSession.Save(true);
agentStateSevice.SetSessionTransferInformation(toAgentId, fromPhoneNumber, sessionInformation);
This will persist the session so that you can rehydrate it on the receivers site.

Here we decided to implement that by ourself although i think there are some rails and handling methods contained in the framework and if i remember right, the default implementation of the AgentStateService is called by the regular OpenSession procedure.

Basically on a new contact we check, if there are any saved session matching the incoming contact. If thats the case, we deserialize the saved sessionInformation into a Session object from where we can simply open that session again.

We also implemented some features where all dynamic applications and their states can be recovered after the session transfer. So the receiver will see an KnowledgeBase article that was used during the original session (for example).

I know thats all not that detailed maybe you want to try the following:

-Do your own implementation of the AgentStateManager ( can be a mock to get started ) and configure it via the AgentDesktops App.config
-Add some Breakpoints to get a feeling when which method is called by the Framework when open a regular Session.

Thats how we started. You will soon see if the built in functionality fits your needs of if you will end up implement your own stuff there.