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: