Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Need to add a hand icon on the Work Order task Panel

SAS21
Tera Guru

Here is the requirement  - 

Allow Dispatchers to Claim Work Order TasksProvide dispatchers with the ability to visually claim a Work Order Task within Dispatcher Workspace.

Dispatchers shall be able to claim an unclaimed Work Order Task.

The system shall provide a visual indicator distinguishing claimed and unclaimed Work Order Tasks.

  • Unclaimed:  use a ‘Green Hand’ icon by the dispatch
  • Claimed: Define the same icon in a different color

Claimed status shall be visible to all dispatchers viewing Dispatcher Workspace

The solution shall reduce duplicate dispatcher effort by identifying claimed tasks before assignment. (eliminate the issue with multiple dispatchers picking up the work at the same time)

 

Below are the steps i am trying -

Created Two custom fields - on wm_task table and added these fields to Dispatcher Workspace Task Card

  • Is Claimed (u_is_claimed) — Type: True/False (Default: false)

  • Claimed By (u_claimed_by) — Type: Reference (sys_user)

Workspace Declarative Action ("Claim Task" Button) - here is the script 

var targetSysId = current.sys_id || (input ? (input.sys_id || input.sysIds) : null);

if (targetSysId) {
var wot = new GlideRecord('wm_task');
if (wot.get(targetSysId)) {
// Double-check real-time database state to handle race conditions
if (wot.u_is_claimed == true || !gs.nil(wot.u_claimed_by)) {
gs.addErrorMessage('This task has already been claimed by ' + wot.u_claimed_by.getDisplayValue() + '.');
} else {
wot.setValue('u_claimed_by', gs.getUserID());
wot.setValue('u_is_claimed', true);
wot.update();
gs.addInfoMessage('Task successfully claimed.');
}
}
}

 

Not sure about how to add green hand  and blue icons to task panel . Appreciate the help. Tried field decorators but it shows only the existing icons

 

4 REPLIES 4

Skylar_Barth
ServiceNow Employee

Hi there,

Would you be able to elaborate on the use case. Do you have multiple dispatchers covering the same territory? Is there a way to reduce dispatcher overlap? Have you considered approaching this by having the dispatcher click the task, and in the contextual side panel on the right hand side, view the activity feed and add work notes that 'they are looking into this'?

Hi @Skylar_Barth ,

Thanks for the suggestion!

Yes, we do have multiple dispatchers covering the same territory due to our current operational scale, and re-territoring isn't an option at this stage.

Checking the contextual side panel and adding work notes adds too many clicks for our dispatchers, who handle high task volumes. They need an instant, 1-click mechanism to claim a task and an at-a-glance visual icon right on the card list so other dispatchers don't even bother clicking into claimed tasks.

Any advice on how to get custom icon badges rendered on the Dispatcher Workspace task card components?

did you try to play around with >>>  Field Service > Dispatcher Workspace Configuration > Calendar Event Body Iconography

 

you could update the value field with your custom fields, you need to add the image to db_image tables first

JoshuaChenMTL_0-1787262650761.png

 

.
Add me on LinkedIn 🙂 https://www.linkedin.com/in/joshuachen0510/

masonreed11
Tera Contributor

Field decorators won’t let you add custom green/blue icons. Use a custom Workspace component or UI Builder logic to conditionally display a hand icon based on : u_is_claimed—green for unclaimed and blue for claimed. Also keep the claim validation server-side to prevent two dispatchers from claiming the same task at the same time.