Virtual agent html bot response i'm not able to add the onclick event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 03:22 AM
Hi All,
i need to switch topic on click on a text i tried the below code on click event is not triggered
- Labels:
-
Virtual Agent
- 1,923 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 10:44 AM
Hi there,
I do not think we can have onclick events from HTML responses in VA. If someone knows, that would open a lot of possibilities for further developments.
However, there is a workaround that could work for your use case.
Try the following as your <a> tag:
<a href="/$sn-va-web-client-app.do?sysparm_nostack=true&sysparm_stack=no&sysparm_skip_load_history=true&sysparm_topic=a491bb0adb13d4d0a09249ee3b9619ce">Contact Live Agent</a>
And replace the value of the "sysparm_topic=" with the *sys_id of your Live Agent topic.
*To get the sys_id of your Live Agent topic, you can go to the "sys_cs_topic" table.
**You might need to add more parameters to handle unexpected behavior. For example your branding key(sysparm_branding_key ).
With the above I was able to simulate switching topics after clicking in the link. But you might need to be cautious with unexpected behavior. For example, in my case I did not get the "closing message" after finishing the Live Agent conversation (you might need to force it).
Kind regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2020 11:05 PM
GREG,
Already implemented the "
<a href="/$sn-va-web-client-app.do?sysparm_nostack=true&sysparm_stack=no&sysparm_skip_load_history=true&sysparm_topic=a491bb0adb13d4d0a09249ee3b9619ce">Contact Live Agent</a>
", but the problem is, it is opening in a new conversation. and we want to be part of the same conversation.
Thanks,
Prakash

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2020 02:12 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2020 12:00 PM
Suddenly I realize my own use case for this and completely empathize with the frustrating limitation...
I have a topic for high impact incidents/outages and if a quick query returns any results, I want my greeting message to include a message notifying the user and letting them access that topic to see details and create a child ticket. But the thing is, I still need it to return the topic picker - vaSystem.sendTopicPickerControl(greetingMessage) - in addition to a button/link to switch topics.
I can't rely on using an a tag/link because we have users in MS Teams not using the portal widget.
I also don't want to burden users with an additional click by using a Static Choice input to either start the topic or display the topic picker. There's not many other use cases for it, but we need an option for asynchronous user input - i.e. present a Static Choice, but still continue with the topic flow.
For the time being, I'm just displaying a message like "There are X outages... type in 'view outages' to see more details.'