In Virtual Agent, how can I script the "Exit full topic list" ?

JLeong
Mega Sage

Hi Guys,

I have a requirement to add a Back button at the end of the topic list. So when a user reaches the end of the topic list, there is an option to click back:

find_real_file.png

I created a small topic:

find_real_file.png

 

find_real_file.png

 

For some reason when I use the Back option and then ask questions, the NLU doesn't work. I get the "Is there anything else I can assist you with?" right away instead of looking for a topic or a KB article.

find_real_file.png

Thanks in advance.

 

 

1 ACCEPTED SOLUTION

IC2
Tera Expert

Hi JLeong,

The first thing I would recommend is to use the out of the box back button available in the Virtual Agent window. This way you avoid unexpected behaviour when developing a back button option yourself.

find_real_file.png

If this is not a valid solution, you could try adding the following to your Topic:

Before your "Back to Discovery" script action, add a "reset topic script" with the following code:

find_real_file.png

(function execute() {
    vaVars._topic_current = null;
})()

This should reset the conversation and stop the flow from continuing to the "anything else topic".

Let me know if it helps,

Kind regards,

View solution in original post

6 REPLIES 6

Thank you so much, never thought to use ASCII characters. Makes such a difference

JLeong
Mega Sage

Solution worked! Thank you so much!