Using the Unified Service Desk Generic Adapter for CTI

2 Comments

Unified Service Desk contains functionality for Computer Telephony Integration (CTI). Here we will go through an example of using the USD Generic Listener with a sample application to simulate an incoming phone call.

To set up the generic listener, go to USD in Dynamics 365 and create a new Hosted Control.

To install the phone call simulator, go here and download the Sample CTI application:

Extract the files, and you will see:

This will open:

Confirm the setting in Visual Studio to download missing packages:

You may need to update the Newtonsoft.Json package:

Run the application. You will see below. Note:

  • ANI = Automatic Number Identification, which provides the recipient of the phone call with the number of the caller
  • DNIS = Dialed Number Identification Service, that identifies for the call recipient the number that was actually dialed

We could use this information in our example, but instead we will enter a phone number into the app. Now, in Dynamics 365, we have a contact, Bob Smith, with a phone number:

Pass this using our sample application using the key “phone” and the value of the phone number:

In USD, open the debugger. You will see a phone call has been recieved:

At this point, USD does not know what to do with the incoming call.

Now, create a FetchXML query to look up who this caller is.

We will replace the hardcoded phone number shortly:

Create a Windows Navigation Rule.

Create a new CTI search from the FetchXML and use the replacement parameter for the phone number passed in:

This should now be added to the Windows Navigation Rule:

We can now set what happens based on the results returned:

  • Create Session, Load Match then Do Action
  • Create Session then Do Action
  • Do Action
  • Next Rule

We can choose what to do based on how many results we get back from our CTI Search query, i.e. if we get back a no matches, a single match, and multiple matches.

We will select to create a session, then load the match, and finally do any actions we have attached to the routing rule under Actions:

Then create a new action:

Create a new hosted control to display the contact, if it does not exist:

Set the destination to be the contact record:

Restart USD and send the same contact from the call simulator. A session will start and the contact record will be displayed automatically:

 

 

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

2 Responses to Using the Unified Service Desk Generic Adapter for CTI

  1. Hi Carl,

    I’d like to ask you a question regarding the CTI Search.

    In my requirement I’m not going to search for a Contact using the caller phone number, but I’ll filter my search using a customized field. So far, it was all fine.

    The problem is, this customized field that I use on my search is not accessible to all the end users on USD, as it is protected with Field Security Level (end user can’t read it on D365).

    This means that my Window Navigation Rule that executes the CTI Search will never find a Contact, depending on the user that’s running USD.

    Field Security Profile is doing it’s work so this is not actually an error, but I wonder if it would be possible to find a workaround and “impersonate” the CTI Search when a call arrives on my USD.

    To let you know, all my CTI Hosted Controls (root, manager and controls) are developed.

    Kind regards,
    Tiago

    • Hi Tiago,

      Good question. I don’t know about impersonating the actual CTI search. How about this for a workaround. In the nav rule, under Actions call a custom hosted control, custom action, that does the FetchXML/Retrieve lookup impersonated from there. Once found, add the customer id to the replacement parameters, and you can then route the call in the next action. It’s more work, unfortunately. Curious how it goes.

      Carl

Leave a Reply

Your email address will not be published. Required fields are marked *