Open a Topic Automatically onclick of a button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2020 03:01 AM
Hi,
We have a report an Incident button in our portal. When a user click on that button it should open the Virtual Agent with Report an Incident topic. we were able to Open VA on click of the button, but unable to start the topic automatically. Is there any way this can done
Thanks,
Sai chetan
- Labels:
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2020 03:03 AM
Hi there,
To open a topic directly, you could add to the URL: sysparm_topic=your_topic_sysid
For example:
https://your-instance.service-now.com/$sn-va-web-client-app.do?sysparm_skip_load_history=true&sysparm_topic=425acd711bbb9810c554dbdee54bcbd4
One way for getting the sys_id is opening the sys_cs_topic table.
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
‎10-29-2020 03:05 AM
Just curious, can you share what you did with the button to open VA? Maybe it's a nice method 🙂
Kind regards,
Mark
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
‎10-29-2020 03:20 AM
Hi Mark,
Thanks for your reply. In my report an Incident widget I am broadcasting 1 event like this
$rootScope.$broadcast('customEvent', obj);
In the Virtual Agent widget I am listening for the broadcast and after broadcast i am triggering toggleWindow() method which in turn open/closes the VA like this
$rootScope.$on('customEvent', function(event,obj) {
$ctrl.toggleWindow();
});

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2020 03:21 AM
Nice idea!
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field