Session Timer (Custom Hosted Control)
In Unified Service Desk, the session timer (
Timer) hosted control displays the elapsed time in seconds since a session was started, and uses different colors to specify the threshold time limits.
Timer hosted control isn’t one of the predefined hosted controls; it’s a custom control that is available when you deploy one of the sample Unified Service Desk applications on your Common Data Service platform instance. The
Timer hosted control is displayed in the status panel of your client application whenever a session is started.
Actions for the Timer hosted control
The following actions are supported by the
GetSessionSeconds: Returns the total time, in seconds, that the session lasted.
GetSessionUsageInSeconds: Returns the total time, in seconds, when the customer service rep was active in the current session.
You can use these two actions in your action calls to return session timer values. However, before you can use these actions in your action calls, you’ll have to manually add these UII actions to the
Timerhosted control instance. More information: Add a UII action to a hosted control
The values are returned and displayed under the
$Returnreplacement parameter. To test the values returned by these two actions:
Start Unified Service Desk client and connect to your Common Data Service platform instance.
Click the My Work menu, and then click a case record to open a session.
Click Settings () at the top-right corner to display the
On the Direct Action tab, select
Timerfrom the Hosted Control list, the action name from the Action list, and click Run Direct Action (). Repeat this step for the other action.
Click Refresh () to refresh the replacement parameter grid. Expand the
$Returnparameter to view the value (time in seconds) returned by the
Configure threshold limits and colors for the Timer hosted control
You can configure the threshold time limits and colors for the
Timer hosted control by specifying the values in an
XML format in the
Extensions XML field of the hosted control definition. The threshold color defines the color that the session timer is displayed in after the specified threshold time values have elapsed since the session started. Use hexadecimal color codes to specify the threshold color.
For example, the following XML defines the background color of the time string to be gray, the time string to change to orange when 60 seconds have elapsed, and then finally change to red when 90 seconds have elapsed since the current session started.
<thresholds> <threshold backgroundcolor="#E4E4E4" /> <threshold foregroundcolor="#FF9900" seconds="60"/> <threshold foregroundcolor="#FF0000" seconds="90"/> </thresholds>
To configure threshold limits and colors for the Timer hosted control:
Sign in to Unified Service Desk Administrator.
Select Hosted Controls under Basic Settings.
Search for the Timer hosted control to open its definition.
In the Timer hosted control definition form, update the XML in the Extensions XML field to specify the threshold limit and corresponding colors.
Save the hosted control definition.