The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Questions on vaVars, vaContext in virtual agent

geogeorge
Tera Expert

Hi Team,

 

We are configuring virtual agent and we can see some users using vaVars, vaContext or vaSystem as some variables in scripting in Virtual agent. Where these functions are stored ??? and I can see some of them are using

vaVars.Enable_Liveagent in some of the cases and what exactly this checking?
1 ACCEPTED SOLUTION

Rafael Batistot
Kilo Patron

Hi @geogeorge 

 

These are predefined objects available in Virtual Agent topic scripting (in the Scripting blocks or Script actions).

They are not ServiceNow global objects, meaning you won’t find them in the system dictionary, business rules, or script includes. Instead, they are injected at runtime by the Virtual Agent framework.

 

  • vaVars → Stores topic-level variables (the values captured or defined while the user interacts with the bot).
  • vaContext → Holds contextual information about the current conversation (like channel, user, or conversation state).
  • vaSystem → Contains system-level information used internally by the Virtual Agent (e.g., metadata about conversation flow, backend handling, etc.).

 

So, these aren’t “stored” in the DB as script includes. They are built-in objects provided by the Virtual Agent runtime engine.


See the reference 

 

https://www.servicenow.com/docs/bundle/zurich-conversational-interfaces/page/administer/virtual-agen...

 

View solution in original post

5 REPLIES 5

Rafael Batistot
Kilo Patron

Hi @geogeorge 

 

These are predefined objects available in Virtual Agent topic scripting (in the Scripting blocks or Script actions).

They are not ServiceNow global objects, meaning you won’t find them in the system dictionary, business rules, or script includes. Instead, they are injected at runtime by the Virtual Agent framework.

 

  • vaVars → Stores topic-level variables (the values captured or defined while the user interacts with the bot).
  • vaContext → Holds contextual information about the current conversation (like channel, user, or conversation state).
  • vaSystem → Contains system-level information used internally by the Virtual Agent (e.g., metadata about conversation flow, backend handling, etc.).

 

So, these aren’t “stored” in the DB as script includes. They are built-in objects provided by the Virtual Agent runtime engine.


See the reference 

 

https://www.servicenow.com/docs/bundle/zurich-conversational-interfaces/page/administer/virtual-agen...

 

geogeorge
Tera Expert

Hi @Rafael Batistot ,

 

I can see that vaVars have been used in some of my existing topics. Even though I couldn't identify where they are defined, what exactly do vaVars do? Is this something that we should define, or is it system-defined?

@geogeorge 

 

No, you don’t need to define vaVars yourself — ServiceNow provides it automatically.

What you define are the properties inside vaVars, such as vaVars.ticketNumber or vaVars.preferredLanguage.

If you try to use vaVars.someKey without setting it first, it will just be undefined.

 

geogeorge
Tera Expert

@Rafael Batistot 

 

So you are saying some of them are already defined right?


Can I see those oob defined vaVars values?