Unified Service Desk: Implement USD Outbound (ClickToCall) functionality from Session Overview

In the Unified Service Desk (USD), you can perform inbound and outbound calls by integrating the CRM system with telephony providers such as NICE InContact, CISCO Finesse, Ring Central etc. The outbound calls are usually referred to as “Click to Call” or “Click to Dial”. These telephony providers expose the REST or SOAP APIs that perform the outbound calls to the external systems. The external systems then use these APIs to perform a POST/PUT request to place the outbound call.  

The outbound call can be placed in USD through multiple ways. few of them are: 

  1. Through Session Overview mobile number field. 
  2. Through the phone field on the CRM field (a button), configure Windows navigation rule, and triggering the UII action through an Action Call. 
  3. Through a custom button and triggering the UII action through an action call. 

In this blog, we will implement outbound calls through the Session Overview mobile number field. 

Create Hosted Control: 

Create a hosted control for the custom CTI Connector with the following configuration: 

image001

image003

In the Hosting Tab: 

MakeCallConnector is my custom CTI Connector built using the Visual Studio CRM SDK TemplatesUSD CTI Connector project type.

The assembly type is Assembly.ClassName => In our case, it is MakeCallConnector.MakeCallConnector. 

image005

Create UII Action: 

UII actions are the core of the unified service desk hosted controls. They perform specific actions when called. 

In the case of outbound, we define a custom UII action against the custom CTI connector. This action is implemented in the custom code. 

image007

In the Contact Session Overview -> Display field: 

For the mobile number field, provide the Command parameter as follows. The command parameter indicates to trigger the UII action MakeCall that is connected to the CTI Connector hosted control.

<Image Style=”{DynamicResource ImageLogo}” Source=”{Binding Source=msdyusd_Phone16, Converter={StaticResource CRMImageLoader}}” /> 

    <TextBlock  TextWrapping=”Wrap” Padding=”5,0,0,5″ FontSize=”12″ Text=”Mobile: ” Foreground=”#262626″  VerticalAlignment=”Center”> 

  <Hyperlink Command=”CCA:ActionCommands.DoActionCommand” CommandParameter=”http://uii/CTIConnector/MakeCall?callto:tel:[[contact.mobilephone]u+x]”  FontWeight=”Regular” AutomationProperties.Name=”Telephone Number [[contact.mobilephone]+x]”  Foreground=”#FF3B79B7″ FontSize=”12″>[[contact.mobilephone]+x]</Hyperlink> 

       </TextBlock> 

</StackPanel> 

In the CTI connector code, override the DoAction method of the CTI Desktop Manager. 

namespace MakeCallConnector 

{ 

    partial class MakeCallConnector 

    { 

        /// <summary> 

        /// Required designer variable. 

        /// </summary> 

        private System.ComponentModel.IContainer components = null; 

 

        /// <summary> 

        /// Clean up any resources being used. 

        /// </summary> 

        /// <param name=”disposing“>true if managed resources should be disposed; otherwise, false.</param> 

        protected override void Dispose(bool disposing) 

        { 

            if (disposing && (components != null)) 

            { 

                components.Dispose(); 

            } 

            base.Dispose(disposing); 

        } 

 

        protected override void DoAction(RequestActionEventArgs args) 

        { 

            //The action handler allows UII to accept actions from “non CTI aware” applications in the UII Space.  

            // In this case, we will show an example of outgoing call command from the search provider.  

 

            // Check to see if the requested action is “MakeCall”  

            if (args.Action.Equals(“MakeCall”, StringComparison.InvariantCultureIgnoreCase)) 

            { 

                // The UII Call ID that we would like to make call.  

                if (!string.IsNullOrEmpty(args.Data)) 

                { 

                    try 

                    {                         

                        var number = args.Data.Replace(“callto:tel:”“”); 

                        MakeCall(number); 

                    } 

                    catch (Exception ex) 

                    { 

                        // Error here.  

                    } 

                } 

            } 

 

            // … other handlers here as necessary   

 

            base.DoAction(args); 

        } 

 

        private void MakeCall(string number) 

        { 

//throw new NotImplementedException(); 

        } 

} 

 

You can implement your Outbound code functionality in the MakeCall method. 

To debug, compile the project, and place the MakeCallConnector.dll and MakeCallConnector.pdb file in USD client installation path – C:\Program Files\Microsoft Dynamics CRM USD\USD 

In the project properties under Debug, provide the path of the USD client executable file: 

C:\Program Files\Microsoft Dynamics CRM USD\USD\UnifiedServiceDesk.exe 

image008

Place breakpoints in your code. Start debugging. 

 

image010

This will launch the USD client.  

In USD, open a contact session where a session overview displays the mobile number. Click on the phone number. 

image011

In the Debug Tab, you’ll notice the Action that is being called from the CTI Connector. 

image012

This will hit the breakpoint in the code. 

Conclusion: 

The outbound call in USD can be integrated through different IVR platforms and implemented in different ways using USD’s core components. USD also provides the ability to customize and write the integration code to connect to various IVR APIs.   

  

Posted in: CRM

Leave a Reply

Your email address will not be published.