Service Operations Workspace - Agent Assist Default Search Results

Ben Draeger
Tera Expert

Hi all, 

 

I'm setting up Agent Assist for Requested Item (sc_req_item) item table in SOW, I've been able to add Assist for the table using the following guide: https://www.servicenow.com/docs/bundle/yokohama-it-service-management/page/product/service-operation...

 

I am having some issues with replicating the default search functionality though, so that when Agents open Assist it automatically searches based off the RITM short description. 

 

I've duplicated the existing Incident table configuration for the search as below and was hoping to leverage the same Search Context, so the same sources are being searched as Incidents, but maybe that's where I've gone wrong? 

BenDraeger_0-1742779623204.png

BenDraeger_1-1742779652380.png

 

Has anyone been able to replicate the functionality and able to advise what I'm missing? 

1 ACCEPTED SOLUTION

I reached out to ServiceNow support, and they found the issue. 

 

The short description field had been removed from the Service Operations Workspace view in our development environment and this was the cause. Once the field was re-added to the form view it auto-populated agent assist search with the value and returned results. 

View solution in original post

3 REPLIES 3

Ramya V
Kilo Sage

Hi @Ben Draeger ,

 

To add a new Agent Assist tab configuration, follow these steps:

  1. Navigate to All > Contextual Search > Table Configuration.

  2. On the form, select the Table Name for which you want to configure Agent Assist.
    Choose the UI Type as Workspace. Select a Search Context.
    Right-click the header and click Save.

  3. Copy the Sys ID of the saved record for future reference.

    RamyaV_0-1744194619430.png

     

     

  4. Navigate to the UX Screen (sys_ux_screen) table and locate the record with the Screen Name ‘Agent Assist SNC.’

  5. In the Screen Condition field, add the name of the table for which you are enabling Agent Assist.

     
    RamyaV_1-1744194619031.png

     

     

  6. In the Macroponent Configuration field, update the script (refer to the image below) by incorporating the table name and the Sys ID copied in Step 3. Save the form.

     
    RamyaV_2-1744194619043.png

     

     

  7. Scroll to the Related Lists section and open the record under the UX Screen Condition related list.

  8. In the Script field, edit the conditions to include or exclude records where you want the Agent Assist tab to be available.

     
    RamyaV_3-1744194619054.png

     

  9. Result is:

       

RamyaV_4-1744194619463.png

 

 

Please mark this response as Accepted Solution and/or Helpful if it resolves your issue.

Hi Ramya, 

 

Thanks for replying, I'm still seeing the same issue. The Agent Assist tab is appearing on Requested Items in the Service Operations Workspace, but it does not auto-search the short description, similar to Incidents. 

BenDraeger_2-1744242271663.png

 

 

Table configuration:

BenDraeger_0-1744242037034.png

sys_id of table config: 66ff82dcc3e86e50934a35477d0131b3

 

UX Screen:

BenDraeger_1-1744242088813.png

Updated screen condition to:

controller.sowrecordctrl.inputs.inputTable=incident^ORcontroller.sowrecordctrl.inputs.inputTable=problem^ORcontroller.sowrecordctrl.inputs.inputTable=problem_task^ORcontroller.sowrecordctrl.inputs.inputTable=change_request^ORcontroller.sowrecordctrl.inputs.inputTable=change_task^ORcontroller.sowrecordctrl.inputs.inputTable=kb_knowledge^ORcontroller.sowrecordctrl.inputs.inputTable=interaction^ORcontroller.sowrecordctrl.inputs.inputTable=em_alert^ORcontroller.sowrecordctrl.inputs.inputTable=universal_request^ORcontroller.sowrecordctrl.inputs.inputTable=sc_req_item

Updated Macroponent Config to:

{
    "bare": {
        "type": "JSON_LITERAL",
        "value": true
    },
    "cxsTableConfig": {
        "type": "JSON_LITERAL",
        "value": {
            "change_request": "60aeafe0231333001488dc1756bf6559",
            "change_task": "16deafa4231333001488dc1756bf654b",
            "em_alert": "8cecfe6c53101300cdbdddeeff7b1208",
            "incident": "b41ff94577300110b3771aceca5a992e",
            "interaction": "c2985ba653111110b569ddeeff7b1289",
            "kb_knowledge": "5cb4030e73e2330021741c86fbf6a7e1",
            "problem": "31d5064687a233000e3dd61e36cb0b7b",
            "problem_task": "fc0af15f872233000e3dd61e36cb0b75",
            "sc_req_item": "66ff82dcc3e86e50934a35477d0131b3",
            "universal_request": "f98d43a0877e00105c29af1e36cb0be3"
        }
    },
    "fields": {
        "binding": {
            "address": [
                "record",
                "form",
                "fields"

Updated UX Screen Condition script to:

(function checkScreenVisibility(params) {
    var recGr = new GlideRecord(params.data.table);
    var isNewRecord = params.data.sysId == -1;
    if (!isNewRecord && !recGr.get(params.data.sysId)) {
        return false;
    }

    if (params.data.table == 'incident') {
        return (recGr.active || isNewRecord) && (gs.hasRole('itil') || gs.hasRole('sn_incident_write'));
    } else if (params.data.table == 'change_task' || params.data.table == 'change_request') {
        return (recGr.active || isNewRecord) && (gs.hasRole('itil') || gs.hasRole('sn_change_write'));
    } else if (params.data.table == 'problem') {
        return (recGr.active || isNewRecord) && (gs.hasRole('itil') || gs.hasRole('sn_problem_write'));
    } else if (params.data.table == 'problem_task') {
        return (recGr.active || isNewRecord) && (gs.hasRole('itil') || gs.hasRole('sn_problem_write') || gs.hasRole('problem_task_analyst'));
    } else if (params.data.table == 'interaction') {
        return (recGr.active || isNewRecord) && (gs.hasRole('itil') || gs.hasRole('interaction_agent'));
    } else if (params.data.table == 'kb_knowledge') {
        return (recGr.canWrite() || (new global.KBViewModel().isVersioningEnabled() && new global.KnowledgeUIAction().getEditableFields().includes("short_description"))) && recGr.workflow_state != 'pending_retirement' && recGr.workflow_state != 'retired' && recGr.workflow_state != 'outdated' && recGr.canCreate() && recGr.canWrite();
    } else if (params.data.table == 'em_alert') {
        return gs.hasRole('evt_mgmt_user');
    } else if (params.data.table == 'universal_request') {
        return ((recGr.active && !recGr.primary_task) || isNewRecord) && (gs.hasRole('sn_uni_req.routing_agent'));
    } else if (params.data.table == 'sc_req_item') {
        return (recGr.active || isNewRecord) && (gs.hasRole('itil'));
	}

    return false;

})(inputProperties);

 

Something I did notice is there in our instance we have two UX Screens with the same Screen Name: 'Agent Assist SNC':

BenDraeger_3-1744242338573.png

I updated the record that closely matched your screenshots, but both are active. 

 

I reached out to ServiceNow support, and they found the issue. 

 

The short description field had been removed from the Service Operations Workspace view in our development environment and this was the cause. Once the field was re-added to the form view it auto-populated agent assist search with the value and returned results.