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.
Hi,
ReplyDeleteWhen I use the code you mentioned, I get the following errors:
For this line of code:
// Invoke the conversation event when the conversation starts in Lync Client
_lyncClient.ConversationManager.ConversationAdded +=
new EventHandler(
OnConversationAdded);
I get this error:
No overload for 'OnConversationAdded' matches delegate 'EventHandler'
For this line of code:
// Get the properties for this conversation.
IDictionary properties = e.Conversation.Properties;
I get this error:
Using the generic type 'IDictionary' requires 2 type arguments
How do I go about resolving these errors.
For the first bit, replace that code with this:
Delete// Invoke the conversation event when the conversation starts in Lync Client
_lyncClient.ConversationManager.ConversationAdded += OnConversationAdded;
for the second bit, just delete those two lines you put in here, and you should be good to go!
Sorry guys. My formatting stuff up the CSharp code, specifically "<" and ">" were not visible. I have updated the code and the formatting.
ReplyDeleteHello Amreek ,
ReplyDeleteDoes this adapter work For Skype For Business
Yes it does.
DeleteHello Amreek ,
ReplyDeleteDo we have Automatic Call Distributor (ACD) features included with CTI under integration?
Thanks for sharing, nice post! Post really provice useful information!
ReplyDeleteAn Thái Sơn chia sẻ trẻ sơ sinh nằm nôi điện có tốt không hay võng điện có tốt không và giải đáp cục điện đưa võng giá bao nhiêu cũng như mua máy đưa võng ở tphcm địa chỉ ở đâu uy tín.
Greetings from Florida! I’m bored at work, so I decided to browse your site on my iPhone during lunch break. I love the information you provide here and can’t wait to take a look when I get home. I’m surprised at how fast your blog loaded on my cell phone .. I’m not even using WIFI, just 3G. Anyways, awesome blog!
ReplyDeleteCRM Software