
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2020 11:48 AM
Hello, We are Implementing VA in Paris and AWA for live chat. Users are connecting to live chat thru the virtual agent UI. We noticed that the Anything Else topic is triggered after the live chat conversation is ended by the live agent. And if the user clicks "No", for there's nothing else s/he needs help with, then the live chat survey is displayed within the VA UI.
Is there a way to not trigger the Anything Else topic after a live chat session ends, and instead trigger the live chat survey?
This way we won't miss users from taking the live chat survey or confuse the Anything else topic thinking they are still chatting with the live agent.
Thank you.
Solved! Go to Solution.
- Labels:
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2020 03:22 AM
Hi Yasmin,
Maybe you could try the following:
1. Create a context variable going to Collaboration > Chat Setup
2. Add this new variable to your Transfer Live Agent Topic Properties, under Live Agent Variables:
3. In your "End conversation Script", after you close the conversation, set this new variable to true:
(function execute() {
vaSystem.endConversation();
vaVars.LiveAgent_Close_Conversation = true;
})()
4. Create A Custom Anything else topic.
4.1. Add the LiveAgent_Close_Coversation variable to its Live Agent variables:
4.2 Add a Condition at the start of the flow that checks if the Live_Agent_Close_Conversation is true:
The condition script would look like this:
(function execute() {
if(vaVars.LiveAgent_Close_Conversation == true){
return true
}
})()
4.3 Add a Script Action that resets the Live_Agent_Close_Conversation before ending the worfklow. This way the Anything else topic can be triggered for other topics:
(function execute() {
vaVars.LiveAgent_Close_Conversation = "";
})()
5. Go to Collaboration > Virtual Agent > General Settings and set this new topic as your Anything else topic.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2020 08:39 AM
Thank you Mark, test and share any findings.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2020 09:24 AM
So just did 3 small tests.
- 1 with a Script Action, with code:
(function execute() {
vaSystem.endConversation();
})()
- 2 with a Topic block which contains this code.
- 3 switching (topicDiscovery and topicSwitch) to the Closing conversation.
2 and 3 don't work... after finishing the topic block / the topic switched to, the anything else / survey are triggered.
1 though... having this code directly in your topic... works! The chat is ended immediately.
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
11-11-2020 01:17 PM
So, I tested creating a regulat topic that transfers to live chat and then ends the conversation using the vaSystem.endConversation() function, but still getting the anything else AND/OR VA feedback topic. Sometimes I get the anything else, sometimes I get the VA feedback topic. In any case it is as if it skips the end conversation function.
The functions within each node are as follows:
Not sure why it's still triggering the anything else and/or feedback topic.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2020 09:03 AM
I'm thinking that the solution here would be to add a validation within the VA feedback topic to check if user had a live chat session in the past hour or so. And if so, do NOT trigger the VA feedback topic. Has anyone tried doing such validation? Any ideas on scipts for that?
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2020 03:22 AM
Hi Yasmin,
Maybe you could try the following:
1. Create a context variable going to Collaboration > Chat Setup
2. Add this new variable to your Transfer Live Agent Topic Properties, under Live Agent Variables:
3. In your "End conversation Script", after you close the conversation, set this new variable to true:
(function execute() {
vaSystem.endConversation();
vaVars.LiveAgent_Close_Conversation = true;
})()
4. Create A Custom Anything else topic.
4.1. Add the LiveAgent_Close_Coversation variable to its Live Agent variables:
4.2 Add a Condition at the start of the flow that checks if the Live_Agent_Close_Conversation is true:
The condition script would look like this:
(function execute() {
if(vaVars.LiveAgent_Close_Conversation == true){
return true
}
})()
4.3 Add a Script Action that resets the Live_Agent_Close_Conversation before ending the worfklow. This way the Anything else topic can be triggered for other topics:
(function execute() {
vaVars.LiveAgent_Close_Conversation = "";
})()
5. Go to Collaboration > Virtual Agent > General Settings and set this new topic as your Anything else topic.