Open Multiple Session Tabs Per Customer

Apr 30, 2012 at 10:35 PM

A client of ours would like to be able to open the same customer in multiple session tabs.  What they are running into is the following (this a call center):

1. Customer calls in and the agent collects information during the call
2. The call ends and the agent is wrapping up call notes
3. Customer calls back in (same customer, agent) and since the session is still open in CCA it opens the new call in the same session tab even though it has a different CallId etc.

Basically, we want to be able to have the same customer in multiple sessions within CCA.  Is this possible and where do I start looking to make this change?

Thanks,

Jeremy

May 9, 2012 at 1:34 PM

Just in case somebody else comes across this requirement.  I used Reflector to look at the OpenSession method in Microsoft.Uii.Desktop.Core and it does a GetSession() based on the CustomerId.  What I did is whenever we pull back a CustomerRecord from the CustomerSearch Control, I generate a new, unique CustomerId and assigned that as the CustomerId.

This has stopped CCA from re-using customer sessions.  However, what it may have pointed out (and maybe it is by design) but when I close a Session it doesn't actually dispose of that Session & the related Context.  When the customer calls back in, that same session id & context is loaded into CCA.  THis was causing issues with how we track call recordings & durations because the callid didn't exist in the session in these cases.

Jeremy

May 14, 2012 at 3:07 AM

UII will hold onto the “closed” session until it rolls off the stack and is collected by the GC layer of .net.. unless your crossing an adapter among a few different sessions, then it will not as its still referenced by something.

As for getting a unique customer session, you are correct in how to do it.

As for attaching the call, if your using the CTI subsystem in UII, the CallID is associated with the session and refers to a call in the Calls object of the CallStateManager. If the session is re-opened via cti request, that call ID is replaced, if its opened via search request, the state of that call is closed.

Mattb-MSFT

May 31, 2012 at 4:27 PM

Matt,

Again, thank you for all the advice/code samples etc with all of my questions.  They have helped tremedously.  One quick question, maybe quick.  Is there a preferred method or best practice that you've seen with CCA to properly close the Internet Explorer instance associated with a given session?

Since we are using a couple of Web Adapters, the iexplore.exe sessions still don't seem to close out until we close out the Agent Desktop.  While this doesn't cause too much of an issue with the Agent Desktop, as the iexplore.exe processes continue to stay alive as sessions are closed out eventually there are enough instances open where it does start to cause performance issues as the memory consumption continues to climb until most of the memory is used up and Interent Explorer freezes when a new session is being opened.

Thanks,

Jeremy

Jun 6, 2012 at 3:42 PM

Make sure that you are not running in protected mode in IE,  and you are not directly creating, in your own code, an instance of WebBrowserExtended.  Aside from that IE should close when you close the session or desktop
If that is not happening,
What version if IE,  what OS, what sort of sessions are you running ( just global or are you creating instance sessions as well )

Mattb-MSFT

Jun 7, 2012 at 12:34 PM

Matt,

All of the key URL's being accessed by CCA are in the Local Intranet or Trusted Sites Zone.  These 2 zones do have Protected Mode Off, however Protected Mode is still enabled on the main Internet Zone itself.

The client is running Windows 7 SP 1 x64.  They are running Microsoft Internet Explorer 9 as well.

1. In terms of session we have 1 Global Session that displays the CRM Dashboard

2. When a Customer Session starts Uii opens an empty session

3. Based on information obtained during the customer lookup we generate a

  • Dynamic App for the Customer Record (no custom adapter, just a single default action using URL Replacement)
  • Dynamic App for Activity (we do use a web adapter, but this always calls the default action and uses URL replacement to navigate)
  • Dynamic App for Request (case in CRM), we use another adapter here with a single action as well
  • Code for my adapters:  https://skydrive.live.com/redir?resid=D0F6DD7F2C617FCD!130&authkey=!AGcISNb7OFIejhA

4.  In the Activity Web Adapter, I do use IHtmlDocument and other mshtml controls in order to execute JScript within the page.  In the Request adapter, I use a Hybrid adapter so I can utiltize the DataDrivenAdapter to execute Uii Automations from a custom non-hat adapter. 

I don't think I am setting up a new WebBrowserExtended.  The activity adapter in the link above has a lot of extra logging as we're still getting some tabs to appear blank.  I added the logging to capture what is was navigating too. 

One interesting thing I found, not related to my original question, is when I do get a blank tab the 1st page navigated to is res://ieframe.dll/navcancl.htm#about:blank.  The logs indicate the adapter is going through the rest of the navigation steps and does eventually load the right URL, it just doesn't display anything.

Thanks Matt

Jeremy

 

 

 

Jun 8, 2012 at 4:27 PM

You will need to turn off protected mode for all the zones..
The behavior of IE is that if any site is referenced is outside a zone with protected mode turned off it promotes the full session to protected mode.  So, if your page is using a stats site, or an ad site, or really accessing any URL in the internet zone the whole session goes protected.
What I would ask that you try to do is to turn off protected mode in IE (completely) and see if that resolves the issue.


The second thing that may be an issue :
I see you are also creating a DDA inside the web application adapter,   but not calling dispose on it… 
DDA’s tie a reference to the WebBrowserExtened control , which may be the root of your issue.
Try adding a block of code like this to your adapter:

~RequestWebAdapter()
{
    if (_dda != null)
    {
        try
        {
            _dda.Dispose();
        }
        catch { }
    }
}

So first, try turning off protected mode in general to verify that that is not the actual problem,  then apply the second recommendation if you continue to see ghosts.

 

Mattb-msft