Update the live agent script include
Live agent configuration is used in the self-solved deflections (Deflection using KB articles, Deflection using QnA AIS, Deflection using QnA LLM, and Deflection using ITSM VA). When you configure these deflections, update the live agent script include. Update the SSADeflectionHelper script to override the checkInteraction function.
Before you begin
Role required: admin
About this task
An agent interaction is where the interaction is not through a virtual agent interaction. The interaction could be through Walk up experience, phone, video, or a live agent. The base system instrumentation checks whether the employee created an incident or interacted with an agent after reading an article or interacting with a Virtual Agent.
The SSADeflectionHelper script overrides the checkInteraction function and helps in setting up the live agent interaction.
Procedure
-
Navigate to All > System Definition > Script Includes.
-
Open the SSADeflectionHelper script include and modify the script as follows.
-
Override the function checkInteraction from SSADeflectionHelperSNC
JavaScriptcheckInteraction: function(openedFor, windowStart, windowEnd) { var interactionRecord = new GlideRecord('interaction'); // Pulling Virtual Agent User sysId from com.glide.cs.va.sys_user property var vaUser = gs.getProperty('com.glide.cs.va.sys_user'); var windowConditions = 'opened_for=' + openedFor + '^sys_created_on>=' + windowStart + '^sys_created_on<=' + windowEnd; var interactionConditions = 'virtual_agent!=true^ORstateINon_hold,closed_abandoned^ORsys_created_by=system^ORopened_for.web_service_access_only!=false^opened_for.web_service_access_onlyISNOTEMPTY^ORopened_for.internal_integration_user!=false^opened_for.internal_integration_userISNOTEMPTY^assigned_to!=' + vaUser + '^ORassigned_to=NULL'; var encodedQuery = windowConditions + '^' + interactionConditions; interactionRecord.addEncodedQuery(encodedQuery); interactionRecord.setLimit(1); interactionRecord.query(); if (interactionRecord.next()) { return true; } return false; }, -
Update the following line to update the live agent interaction conditions:
JavaScriptvar interactionConditions = 'virtual_agent!=true^ORstateINon_hold,closed_abandoned^ORsys_created_by=system^ORopened_for.web_service_access_only!=false^opened_for.web_service_access_onlyISNOTEMPTY^ORopened_for.internal_integration_user!=false^opened_for.internal_integration_userISNOTEMPTY^assigned_to!=' + vaUser + '^ORassigned_to=NULL';
[Omitted image "liveagent-script-include.png"] Alt text: Live agent script include
-
Parent Topic:ITSM Success Dashboard Admin console
---
title: Update the live agent script include
description: Live agent configuration is used in the self-solved deflections \(Deflection using KB articles, Deflection using QnA AIS, Deflection using QnA LLM, and Deflection using ITSM VA\). When you configure these deflections, update the live agent script include. Update the SSADeflectionHelper script to override the checkInteraction function.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/it-service-management/itsm-success-dashboard-indicators/update-live-agent-script-include.html
release: brazil
product: ITSM Success Dashboard Indicators
classification: itsm-success-dashboard-indicators
topic_type: task
last_updated: "2026-09-10"
reading_time_minutes: 1
breadcrumb: [ITSM Success Dashboard Admin console, Configure, ITSM Success Dashboard indicators, IT Service Management]
---
# Update the live agent script include
Live agent configuration is used in the self-solved deflections \(Deflection using KB articles, Deflection using QnA AIS, Deflection using QnA LLM, and Deflection using ITSM VA\). When you configure these deflections, update the live agent script include. Update the SSADeflectionHelper script to override the *checkInteraction* function.
## Before you begin
Role required: admin
## About this task
An agent interaction is where the interaction is not through a virtual agent interaction. The interaction could be through Walk up experience, phone, video, or a live agent. The base system instrumentation checks whether the employee created an incident or interacted with an agent after reading an article or interacting with a Virtual Agent.
The SSADeflectionHelper script overrides the *checkInteraction* function and helps in setting up the live agent interaction.
## Procedure
1. Navigate to **All** > **System Definition** > **Script Includes**.
2. Open the SSADeflectionHelper script include and modify the script as follows.
1. Override the function *checkInteraction* from SSADeflectionHelperSNC
```
checkInteraction: function(openedFor, windowStart, windowEnd) {
var interactionRecord = new GlideRecord('interaction');
// Pulling Virtual Agent User sysId from com.glide.cs.va.sys_user property
var vaUser = gs.getProperty('com.glide.cs.va.sys_user');
var windowConditions = 'opened_for=' + openedFor + '^sys_created_on>=' + windowStart + '^sys_created_on<=' + windowEnd;
var interactionConditions = 'virtual_agent!=true^ORstateINon_hold,closed_abandoned^ORsys_created_by=system^ORopened_for.web_service_access_only!=false^opened_for.web_service_access_onlyISNOTEMPTY^ORopened_for.internal_integration_user!=false^opened_for.internal_integration_userISNOTEMPTY^assigned_to!=' + vaUser + '^ORassigned_to=NULL';
var encodedQuery = windowConditions + '^' + interactionConditions;
interactionRecord.addEncodedQuery(encodedQuery);
interactionRecord.setLimit(1);
interactionRecord.query();
if (interactionRecord.next()) {
return true;
}
return false;
},
```
2. Update the following line to update the live agent interaction conditions:
```
var interactionConditions = 'virtual_agent!=true^ORstateINon_hold,closed_abandoned^ORsys_created_by=system^ORopened_for.web_service_access_only!=false^opened_for.web_service_access_onlyISNOTEMPTY^ORopened_for.internal_integration_user!=false^opened_for.internal_integration_userISNOTEMPTY^assigned_to!=' + vaUser + '^ORassigned_to=NULL';
```
\[Omitted image "liveagent-script-include.png"\] Alt text: Live agent script include
**Parent Topic:**[ITSM Success Dashboard Admin console](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/it-service-management/itsm-success-dashboard-indicators/admin-console-sd.md)
| title | Update the live agent script include |
| description | Live agent configuration is used in the self-solved deflections \(Deflection using KB articles, Deflection using QnA AIS, Deflection using QnA LLM, and Deflection using ITSM VA\). When you configure these deflections, update the live agent script include. Update the SSADeflectionHelper script to override the checkInteraction function. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/it-service-management/itsm-success-dashboard-indicators/update-live-agent-script-include.html |
| release | brazil |
| product | ITSM Success Dashboard Indicators |
| classification | itsm-success-dashboard-indicators |
| topic_type | task |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | ITSM Success Dashboard Admin consoleConfigureITSM Success Dashboard indicatorsIT Service Management |