Virtual Agent Context Variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 04:06 AM
Hi there,
I'm trying to determine the current portal URL by using a context variable, however, the variable always return undefined and I cannot seem to figure out why. Any help would be greatly appreciated!
Context Variable (I have removed answer and tried, remove 'getSession' and tried but no luck) is the attachment.
Condition script on virtual agent topic:
gs.log("Context plswork: " + vaContext.portalCheck, "BenTest");
if(vaContext.plsWork.includes("locker"))
return false;
else
return true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 10:04 PM
Was this ever resolved? I'm also trying to do this without changing the URL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 10:07 PM
Hi Sarah,
you can access the portal using the below, the below will execute when the portal is esc if not returns false.
if(vaContext.portal == 'esc')
return true;
else
return false;
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2022 12:20 PM
Similar to the original question, we are not going to update the web client URL, like seen described here. We are hoping to determine the portal from the URL: https://<your-instance>.service-now.com/<portal>.
Href and GlideURI within the VA properties script does not work in getting the portal/URL.