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,922 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 03:25 AM
I am facing same issue. Can someone help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 06:04 AM
I would say generally avoid using the HTML bot response where possible and look outside it for alternatives if you do run into a problem like this.
Do you need to be using HTML? I'm guessing your example provided is intentionally simpler than your actual use case, but can you work your use case into other bot responses, like a choice list (even if just one choice)? Then you can just use the choice input to feed a Script Response where you can do the topic switch.
p.s. I've read in a different post here that the following code is a better alternative to switchTopic():
(function execute() {
vaVars.global_search_text = 'name of the topic';
vaSystem.topicDiscovery();
})()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 06:13 AM
Hi Chris,
i was looking for onclick event on the greeting message when user clicks on the onclick link contact live agent is to be triggered.
Welcome to the site contact live agent(Link to contact live agent topic)
regards,
shiva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 06:38 AM