- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2020 06:05 AM
Is there a method to get the current Virtual Agent [Interaction] record in a virtual agent script?
I am trying to access the current interaction record at the end of a conversation to determine if a live chat has occurred or not (based on assigned to either being the Virtual Agent Bot or a real person)
So far i have tried the obvious stuff based on the documentation out there,but nothing specifically mentions this capability.
The 'current' and 'vaSystem' objects do not appear tied directly to the interaction unless i'm accessing them incorrectly
Anyone ran into a similar situation and solved this?
[Update]
vaVars._interaction_record_sysid will give you the interaction sys_id
and
vaVars.global_vCurrentTopicId will get you the current conversation id
Solved! Go to Solution.
- Labels:
-
Virtual Agent
- 6,836 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2020 04:51 AM
I updated the main topic with a solution, thanks for the help everyone

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2020 08:29 AM
One would think that if they're going to reveal these details to customers when they request them, it'd save a whole lot of headache to simply document them formally...
Honestly, we need a wiki for all the undocumented VA knowledge from this community. Mark's got an awesome list of things he's worked on, including other useful variables and functions.
p.s. Object.keys(obj) was actually one of the things I did originally when I spent time looking into it but I'm not a real developer so I didn't want to sound stupid just in cased I missed something in my amateur analysis of it 😬

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2021 01:05 AM
I'm facing the same issue. It doesn't work.
Any alternate approach?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2021 03:14 AM
This might help you:
50+ (Un)documented Virtual Agent variables (vaInputs, vaVars, vaContext, vaSystem)
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2024 02:55 AM
I am working on the same, still it is not working