Open a Topic Automatically onclick of a button

Sai Chetan
Tera Contributor

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

@Mark Roethof Can you please help on this?

Thanks,

Sai chetan

9 REPLIES 9

Mark Roethof
Tera Patron
Tera Patron

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

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

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

LinkedIn

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();
  });

Nice idea!

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn