How can we Help?

Talkdesk for ServiceNow Click-to-Call

Follow

If you're using Talkdesk for ServiceNow, 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 of Talkdesk for ServiceNow is installed on your ServiceNow instance. Your ServiceNow instance needs to be on the Orlando release or newer.

On the other hand, please note that this feature is currently compatible with Callbar App (Electron) only.

 

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.

SN_Click_to_Call_1.png

  1. In ServiceNow, navigate to System Definition [1] > Scripts - Background [2].
  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');
}
}


  1. 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 Callbar.

 

Using the Feature

To start using the click-to-call feature, first you need to log in to the CTI client and Callbar from your ServiceNow instance:

SN_Click_to_Call_2.png

  1. In ServiceNow, click on the phone icon [1] in the bottom-left corner (Agent Workspace), or the top-right corner (Classic UI).
  2. Enter your Talkdesk account name.
  3. Enter the user credentials.
  4. Log in to Callbar.

SN_Click_to_Call_3_-_Agent_Workspace.png

Agent Workspace

SN_Click_to_Call_4_Classic_UI.png

Classic UI

 

  1. 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:

SN_Click_to_Call_5.png

  1. In ServiceNow, navigate to System Definitions [1] > Dictionary [2].

SN_Click_to_Call_6.png

  1. Search for Type [3], “phone number” [4], and then choose the field where you want to add the UI macro.

SN_Click_to_Call_7.png

  1. If the “Attributes” field [5] is not visible on the form, click on Advanced view [6].

SN_Click_to_Call_8.png

  1. In the “Attributes” section, add field_decorations=x_talkd_td_call_with_talkdesk; [7].
  2. Next, click on Save [8].

For more information on dictionary attributes in ServiceNow, we recommend checking this page.

 

If you need further assistance, please contact your Customer Success Manager or support@talkdesk.com 

All Articles ""
Please sign in to submit a request.