If you're using Talkdesk ServiceNow Connector, you can enable the click-to-call feature to allow your agents to make a call directly from ServiceNow through a simple click on a call button.
Requirements
- To set up the click-to-call feature, please make sure that version 2.8.0 (or newer) of Talkdesk ServiceNow Connector is installed on your ServiceNow instance. Your ServiceNow instance needs to be on the Orlando release or newer.
- Make sure you have been through the application installation guide available in “Supporting Links and Docs” in the ServiceNow store, and configured steps 2.1 and 2.4 accordingly.
Notes:
- Agents might have the Talkdesk Click-to-Call Extension installed, but it cannot be used within the same domain of the Talkdesk connector. Meaning that it cannot be used in ServiceNow as it will conflict with the connector and cause it to disconnect. To be able to use the Talkdesk Click-to-Call Extension on other sites other than ServiceNow, you need to access the Talkdesk Click-to-Call Extension Options and exclude the ServiceNow domain from the extended detection exception scope.
- For phone numbers in ServiceNow to be properly fetched and hyperlinked for use with Talkdesk Click-to-Call, they must be specified either in international, national formatting, or in the standard E.164 format i.e., plus sign (+), country code, area code, and number. If you need to provide a number in local national format, you should also specify the country as an optional parameter.
Enabling the Feature
In the ServiceNow instance, please run the following script in the global scope, to deactivate all the current Field Decorators, and add the UI macro on all Phone Number type fields.
Notes:
- This step must be executed by a ServiceNow administrator.
- Only one Field Decorator can be applied to Phone Number type fields. Because of that, the script will deactivate all field decorators already applied to Phone Number type fields, except Call with Talkdesk. This one will remain active.
- In ServiceNow, navigate to System Definition [1] > Scripts - Background [2].
- Paste this script into the “Run script” text box [3]
/*
NOTE: This script has to run in a ServiceNow instance as a background script
in the global scope with the version 2.8.0 of Talkdesk application installed.
*/
//Deactivate all the field decorators except the 'Call with Talkdesk'
var deactivateFD = new GlideRecord("sys_declarative_action_assignment");
deactivateFD.addQuery("model", "=", "15920e6d534723003eddddeeff7b1244");
deactivateFD.addQuery("field_type”, "=", "ph_number");
deactivateFD.addQuery("label", "!=", "Call with Talkdesk”);
deactivateFD.query();
while (deactivateFD.next()) {
deactivateFD.active = false;
deactivateFD.update();
}
//------------------------
//Add the UI macro on all phone number type fields
var addUIMacro = new GlideRecord("sys_dictionary");
addUIMacro.addEncodedQuery("internal_type=ph_number");
addUIMacro.query();
while (addUIMacro.next()) {
var attributes = addUIMacro.attributes;
if (addUIMacro.attributes.includes('field_decorations') && addUIMacro.attributes.includes('x_talkd_td_call_with_talkdesk')) {
gs.log('UI Macro already added');
} else if (addUIMacro.attributes.includes('field_decorations=') && !addUIMacro.attributes.includes('x_talkd_td_call_with_talkdesk')) {
var newAttribute = attributes.replace('field_decorations=', 'field_decorations=x_talkd_td_call_with_talkdesk;');
addUIMacro.attributes = newAttribute;
addUIMacro.update();
gs.log('UI Macro added');
} else {
var newAttribute = 'field_decorations=x_talkd_td_call_with_talkdesk,';
addUIMacro.attributes = newAttribute + attributes;
addUIMacro.update();
gs.log('UI Macro added');
}
}
- Click on Run script [4] and make sure the scope is global.
The next step is to configure the login to the CTI Client and Conversations.
Using the Feature
To start using the click-to-call feature, first you need to log in to the CTI client and Conversations from your ServiceNow instance:
- In ServiceNow, click on the phone icon [1] in the bottom-left corner (Agent Workspace), or the top-right corner (Classic UI).
- Enter your Talkdesk account name.
- Enter the user credentials.
- Log in to Conversations.
Agent Workspace
Classic UI
- Next, simply click on the phone icon [2] that can be found next to all the Phone Number type fields, either in the Classic UI or the Agent Workspace.
If a new Phone Number type field is created after the script is run, that field will show the phone icon in the Agent Workspace, but not in the Classic UI. This happens because UI macros are not automatically added to new fields in the Classic UI, so it will be necessary to add the macro after creating the new field. To do this, you can either run the script again or add the UI macro to the new field as follows:
- In ServiceNow, navigate to System Definitions [1] > Dictionary [2].
- Search for Type [3], “phone number” [4], and then choose the field where you want to add the UI macro.
- If the “Attributes” field [5] is not visible on the form, click on Advanced view [6].
- In the “Attributes” section, add field_decorations=x_talkd_td_call_with_talkdesk; [7].
- Next, click on Save [8].
For more information on dictionary attributes in ServiceNow, we recommend checking this page.
Contact Pop
In an inbound call, Conversations will ring and show standard information about the incoming call, such as the caller's number and Call ID. If the incoming number is on Talkdesk's database and in sync with your ServiceNow account, it will display ServiceNow's badge in Conversations which, once clicked, opens the contact in ServiceNow.
You don't need further configurations, as the Contact Pop feature is automatically available to you if you’re using the Talkdesk for ServiceNow integration. For more information, check the Client Integration Screen Pop article.