Muralidharan BS
Mega Sage
Mega Sage

To enable the end conversation button in VA

 

I encountered a challenge where I needed to redirect users to a specific topic, even when they didn't select it themselves.

 

There are several methods to achieve this, some with their potential drawbacks.

 

vaSystem.topicDiscovery( <topic name or keyword>, true/false)

  • This performs a search on the name/keyword and returns the most appropriate topic.

vaSystem.switchTopicById( <sysid of the topic> )

  • Well documented and the sysid should be passed from - sys_cs_topic table

vaSystem.switchTopicByName( <name of the topic> )

  • Just works as above and pass in the name of the topic instead of sysid

vaSystem.switchTopic( <name of the topic> )

  • un-documented version but it works. The end conversation button used to be disabled but seems not happening anymore. Better to avoid it as we have better options

 

Using the direct link to the topic disables the 'end conversation' button. This issue seems to occur because the class of the div element includes '<menu-item new-conversation-clicker disabled>', which is likely causing the disablement. But there is an alternative

 

Using this URL will display a disabled end conversation button

 

https://instace.service-now.com/$sn-va-web-client-app.do?sysparm_topic=<topic sysid>

 

Insert a different parm to the URL to enable the button - sysparm_default_topic

 

https://instace.service-now.com/$sn-va-web-client-app.do?sysparm_default_topic=<topic sysid>

 

This should do the trick.

 

Thanks,

Murali

Comments
Chris D
Mega Sage
Mega Sage

Hey, just stumbled upon this in the Quebec documentation - looks like ServiceNow added a better option for native topic switching!

vaSystem.switchTopicByName() This method enables the user to jump from the current conversation topic to a specified topic, when triggered by topic switching. During topic switching,c the user can start or end the conversation, transfer to a live agent, and resume in
vaSystem.switchTopicById() This method enables the user to switch from the current conversation topic to another based on the

 (yes, those are incomplete in the documentation...)

Hallelujah! Topic switching by initiating NLU (which is what topicDiscovery does) is unnecessary overhead so I'm glad to find out it was only a temporary workaround. (I'll need to go back and find all my topicDiscovery topics in a few months and clean this up...)

Muralidharan BS
Mega Sage
Mega Sage

Hi Chris,

Yes I noticed it, also to mention, vaSystem.topicDiscovery(); stopped working in Quebec for me. 

Chris D
Mega Sage
Mega Sage

Yikes... that's not good. I guess I'll really need to go back and change all these prior to our upgrade. Thanks for sharing!

Andy54
Tera Contributor

Hi Murali01, we have customized greeting topic and I am facing the same issue. We would want the user to have the option to End the conversation anytime during the greetings topic. However when I am trying any of the mentioned solutions (topicdiscovery or the switchTopic methods) within the greetings topic I am getting error messages. Any idea how to make this work?

Muralidharan BS
Mega Sage
Mega Sage

Hi @Andy54, A few newer OOB switch methods released in San Diego have resolved this issue. If you are in San Diego or newer then try this 

vaSystem.switchTopicByName('name of the topic')

or 

vaSystem.switchTopicById('sysid of the topic')

or

vaSystem.topicDiscovery('string to search for the topic')
	

 

more info about these methods here - Virtual Agent scripts (servicenow.com)

 

Thanks

Murali

Kenn Denn
Tera Contributor

This is great info, thank you!

AnilM99
Tera Expert

Hi @Murali

Is it possible to add End Conversation button in Teams bot,

we are facing major problem in our company, many of the people are facing the issue to stop or end the conversation.

we know about exit and stop but other people are not aware of typing those key words. so i would like to use button for smooth flow.

 

Thanks,

Anil!

Version history
Last update:
‎06-11-2024 05:31 AM
Updated by:
Contributors