It provides the adapters and modules to manipulate CRM UI elements, agent scripting, configuration toolbars and a CTI adapter. For more information on USD please check https://technet.microsoft.com/en-us/library/dn646899(v=crm.6).aspx
For this tutorial, we are only interested in CTI adapters. The following 2 types of adapters can be used to integrate USD with CTI systems.
- Generic listener adapter:
USD provides this adapter out of the box. This adapter listens for HTTP request on a port 5000 (http://localhost:5000/). On receiving a request, the generic listener adapter extracts a query string from the URL and uses the query string as parameters to raise a CTI screen pop up in USD.
User Interface Integration(UII) CTI framework provides the component to build custom CTI adapters. The customer adapter can provide a lot of functionality to manage calls and agent state. Here is the link on how to build a custom CTI adapter for USD.
We will be using the generic listener adapter to achieve USD and Lync integration.
Prerequisite
- Access to CRM2013 (I m using a on premise CRM)
- Lync client installed on the development machine
- Microsoft Lync 2013 SDK installed on the development machine (Download)
- USD (Unified Service Desk) installed on the development machine
The following article lists the step by step instructions to install USD.
https://technet.microsoft.com/en-au/library/dn646908.aspx. The USD installation involves:
- Installing USD client (UnifiedServiceDesk.msi)
- Deploying USD Solution using Package Deployer (CRM2013-USD-PackageDeployer.exe) For this tutorial, deploy “CRM 2013 SP1” solution
Process Flow Diagram
- Customer makes a phone call
- Phone call pop up appears in the Lync Client
- A custom middleware application receives the conversation event and posts a HTTP request on “http://localhost:5000” with customer phone number.
http://localhost:5000/?phone=+61456564323 - USD generic listener pickup the event, extract the query parameter and use these parameters to pop contact record
Configuring the generic listener adapter in CRM
Make sure that all the prerequisite steps have been completed- Logon to CRM and navigate to “Settings>>Hosted Controls”
- Click “New” enter the fields as shown in the screen shot below
USD component, Display Group,Assembly URL and Assembly Type are the important fields and should contain the exactly same values.
Assembly URL : Microsoft.Crm.UnifiedServiceDesk.GenericListener
Assembly Type: Microsoft.Crm.UnifiedServiceDesk.GenericListener.DesktopManager - Save the record.
Creating a Lync Connector (Middleware application)
A Lync connector application will capture the conversation event of the Lync client when a phone call is made or received. This application is a client side application.I am creating the Lync connector as a WPF application. I don’t need a user interface for the connector for this blog but may use it add more functionality to it in future.
- Create a new WPF application project and name it “LyncConnector”.
- Add “Microsoft.Lync.Model.dll” as reference to the project. The file will be available in the following location.
\Microsoft Lync\SDK\Assemblies\Desktop
- The following code is going in the “MainWindow.xaml.cs file. Code:
- Compile and Run the code
Test the integration
- Make sure Lync client is running
- Make sure Lync Connector application is running.
- Logon to USD and click on the setting >>Debug
- Delete all the entries in the “Action Calls” tab by clicking the delete button as shown in the screen shot below.
- Make a phone call or ask someone to ring you on Lync. If everything is working properly, a new event will appear in Action Calls tab as shown in the screen shot.
So here you go, we have successfully passed the caller's phone number to USD.
That is it for today. In the next tutorial we will use this phone number to pop up the contact record.