" /> mscrm connector - Genesys CTI User Forum

Author Topic: mscrm connector  (Read 5546 times)

Offline smile

  • Sr. Member
  • ****
  • Posts: 286
  • Karma: 6
mscrm connector
« on: December 22, 2014, 01:26:26 PM »
Advertisement
Hi All

There is new product from Aria instead of Gplus adapter called 'IWS MS CRM Connector'. Does anybody has  experience with it? For example i want to know is it possible to pass some crm fields into userdata (like cti-to-mscrm-attribute-map but in opposite way).
Thanks

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: mscrm connector
« Reply #1 on: December 22, 2014, 06:16:45 PM »
Hi Smile,

I do not have direct experience with the connecetor you speak of.

However I did want to mention that I have done IWS / CRM / Dynamics integrations before.  I have achieved this by embedding a WebBrowser control in IWS and loading CRM URLs in the control.  Note there is some memory management issues that must be overcome - but it has worked nicely for me in the past.

To trade data back and forth I have worked with CRM guys to expose some web service methods that I can consume in my IWS code - so I can request data from them, and send data to them.

From agent point of view it seems as if one application is being used (IWS, but with CRM embedded inside) - pretty good experience.

Regards,
Andrew

Offline smile

  • Sr. Member
  • ****
  • Posts: 286
  • Karma: 6
Re: mscrm connector
« Reply #2 on: December 23, 2014, 08:50:03 AM »
This is really good experience. So, did you use standard ms crm entities? Does it look nice inside IWS window?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: mscrm connector
« Reply #3 on: December 23, 2014, 10:59:31 AM »
We have used embedded webbrowser within IWS and have encountered a lot of issues and problems related to it, happens to be integration with MSCRM as well.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: mscrm connector
« Reply #4 on: December 23, 2014, 01:12:21 PM »
Issues like what? I am planning to do one and would like to know in advance what big problems could this bring...

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: mscrm connector
« Reply #5 on: December 23, 2014, 01:18:50 PM »
Main problem was in performance (reaction speed, memory consumption, etc.)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: mscrm connector
« Reply #6 on: December 23, 2014, 02:00:06 PM »
But an issue on IWS itself? Meaning, not designed to such basic task?

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: mscrm connector
« Reply #7 on: December 23, 2014, 07:30:15 PM »
I think I still owe you some code Cavagnaro.

We experienced massive memory consumption issues.  We have an MS support contract and opened a case with MS regarding it.  There are a lot of posts on MSDN related sites regarding the WebBrowser control having memory leaks.  One crowd swears it does, the other says it does not.

During our MS Support case, the .net CLR team and WPF teams were engaged.  It was determined yes there was a memory leak in un-managed resources the WebBrowser control was using.

We would reach up to about IWS using 1Gb of memory before our systems became so painfully slow that IWS had to be quit/re-opened.

MS provided some advice on how to work around the memory leak, it has worked wonderfully for us.

I will dig up some more details and provide them.  Additionally, there are other web frameworks (some free, some not) that can be used instead of using System.Windows.Controls.WebBrowser - we were pretty close to buying one.

Regards,
Andrew

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: mscrm connector
« Reply #8 on: December 23, 2014, 07:48:41 PM »
:o :o
That code would be awesome  ;D
With this connector you don't have those memory leaks anymore?

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: mscrm connector
« Reply #9 on: December 23, 2014, 08:01:34 PM »
Can't comment on the connector directly because we have never used it before.  I will round up the code today.

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: mscrm connector
« Reply #10 on: December 23, 2014, 10:20:14 PM »
I don't want to get in trouble for posting Genesys code samples here, so I will just paste some code.  This code can be added to the IWS sample Genesyslab.Desktop.Modules.InteractionExtensionSample.MySample pretty easily. 

It at least demonstrates what needs to be done to avoid to memory leak in .net 3.5 (IWS 8.1.x).  As ridiculous as it sounds, navigating to about:blank prior to disposing of the WebBrowser control is what we needed to do in order to avoid massive memory leaks with the control.

I just did some copy/paste and additions, so hopefully there are no typos!

In MySampleView.xaml, make the entire UserControl tag contain only this DockPanel control:

[code]
    <!-- blank dockpanel where our WebBrowser control will be added -->
    <DockPanel x:Name="dockPanelWebBrowser" DockPanel.Dock="Top" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
    </DockPanel>
[/code]

In MySampleView.cs, add some new variables:

[code]
        // create a WebBrowser object
        private WebBrowser webBrowser;

        // flag indicating if web browser control has been navigated to blank - should navigate to blank when destroying control
        // to help minimize memory leaks
        private bool isWebBrowserNavigatedToBlank = false;
[/code]

Add some code to the end of the constructor to instantiate the WebBrowser control and add it to the DockPanel
[code]
// instantiate new WebBrowser when constructor is run
webBrowser = new WebBrowser();

// add web browser to our dock panel
dockPanelWebBrowser.Children.Add(webBrowser);

// navigate somewhere, get this from a service call, attached data, textbox, whatever
NavigateToURL(webBrowser, "http://www.google.com");     
[/code]

Inside the Destroy() method, add the following code.  This is important to avoid memory leaks.  It will force the WebBrowser control to navigate to about:blank prior to the view being destroyed:

[code]
try
            {

                if (!isWebBrowserNavigatedToBlank)
                {
                    webBrowser.Navigated += NavigatedToAboutBlank;
                    NavigateToURL(webBrowser, "about:blank");
                    return;
                }

                webBrowser.Navigated -= NavigatedToAboutBlank;
                webBrowser.Dispose();
                webBrowser = null;
            }
            catch (Exception)
            {
            }
[/code]

Add event code for NavigatedToAboutBlank:
[code]
        private void NavigatedToAboutBlank(object sender, NavigationEventArgs e)
        {
            isWebBrowserNavigatedToBlank = true;
            this.Destroy();
        }
[/code]

Add a method to do all our navigation for us:
[code]
        private void NavigateToURL(WebBrowser webBrowser, String url)
        {
            try
            {
                webBrowser.Navigate(new Uri(url)); 
            }
            catch (Exception)
            {
            }
        }
[/code]