sarah_bioni
ServiceNow Employee
ServiceNow Employee

Introduction:
While working on a custom Virtual Agent topic, "AI Search - Fallback," designed to capture the user's last statement and trigger AI Search to fetch catalog items and knowledge articles, I encountered an issue where the Virtual Agent would load indefinitely without returning any results. This article outlines the issue, investigation, and the solution that resolved it.


Issue Overview:

When attempting to use the custom Virtual Agent topic, the following steps led to the problem:

  1. Access the ServiceNow instance.
  2. Navigate to the ESC portal (/esc).
  3. Open the Virtual Agent.
  4. Enter the name of any catalog item.
  5. Result: The Virtual Agent loads indefinitely without returning results.

This issue disrupted the intended AI Search functionality, preventing users from retrieving catalog items and articles as expected.


Root Cause:

After investigating the problem, I discovered that the custom topic was unable to communicate with the required helper classes due to missing Cross-Scope Privileges. Without the necessary permissions, the Virtual Agent could not execute key methods, leading to infinite loading behavior.


Solution:

The issue was resolved by adding Cross-Scope Privileges that allow the custom Virtual Agent topic to interact with essential global scoped classes.

Here’s how I fixed it:

  1. Navigate to Cross-Scope Access:

    • Go to System Applications > Application Cross-Scope Access
  2. Add Cross-Scope Privileges:

    • Set Source Scope to your custom application (where the topic is built).

    • Set Target Scope to Global.

    • Add the following Target Names with Allow access for each:

      • VaTopicRuntimeUtil
      • VAAlSearchHelperVancouver
      • VAAISearchHelperTokyo
  3. Test the Fix:

    • Return to the ESC portal and open the Virtual Agent.
    • Enter the name of any catalog item.
    • Result: The Virtual Agent now successfully fetches and displays catalog items and knowledge articles using AI Search.

I hope this helps others who may encounter a similar issue with Virtual Agent and AI Search integration. Feel free to reach out if you have any questions or need further clarification!

#VirtualAgent #AISearch #CrossScopeAccess #ServiceNow

Version history
Last update:
‎02-19-2025 05:49 AM
Updated by:
Contributors