- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2020 10:46 PM
Hi,
I have a requirement to get the portal URL in virtual agent script.Like i need to check weather its HR portal or IT Portal in greetings message topic.
Solved! Go to Solution.
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2020 10:09 PM
Hi Kamer,
As per your details provided please try below code and let me know.Its working fine for me with below solution:Add this below code in greeting topic inside script action

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2020 11:07 PM
Hi there,
See this article I wrote a few weeks back with detailed explanation on how you can achieve this. With: vaContext.
Virtual Agent - Conditions based on different Service Portals
The article is on conditions, though principle is the same.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article 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
‎04-29-2020 11:10 PM
Awesome! Bookmarked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2020 11:09 PM
Snipped from the article:
Virtual Agent scripts - Context variables
From the Docs:
"You can use variables in system parameters within the web client URL. These variables can be used anywhere in the conversation using the vaContext object. Use these options to create links to Virtual Agent with predefined variables.
https://<instance>.service-now.com/$sn-va-web-client-app.do?sysparm_city=rome
The example link contains a parameter, sysparm_city=rome. In addition to opening a Virtual Agent conversation, using this link creates a variable called city with a value of rome. This variable can be accessed in a script using vaContext.city."
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article 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
‎04-29-2020 11:44 PM
Basically i have a requirement to route live agent to particular queues from connect support option.So greeting message is start of conversation so i am writing script in its condition as below