Is hiding the Show Me Everything button possible in Virtual Agent? Will it break something?
As others here on the forum I had the requirement to hide the Show me everything button from the initial greeting message.
The questions here mostly do not have an answer marked as correct, sometimes there is a warning that hiding that button will actually break the NLU prediction functionality. The documentation on this is also close to non-existing, so no luck there either. So I made my own research, and found the following.
Is it possible?
It should be possible to use the VA perfectly fine without ever triggering anything what the Show me everything button does. How do I know? Because our system is connected to MS Teams, and the VA works differently there. As you all know, on the portal, when you open the VA chat, you are automatically presented with the greeting message before you could type anything.
But on MS Teams, it is different. When you select the VA user to interact with it you are free to type and send your message without the agent being notified that you already started interacting with it. For example here the survey was done, the conversation ended, I started a new one by typing:
Now if you use Teams like this, NLU kicks in, try to predict intents etc., etc., the same old story. But no greeting message, no Show me everything button, and everything works, nothing breaks. So it is possible. If we could somehow implement something similar to this on the portal, it would be awesome.
How it's done?
So I took a look at the OOB Greeting topic (after duplicating it). Right in the beginning there is a decision:
If the search text is set ( the condition says !gs.nil(vaVars.global_search_text) ) its goes the Topic Discovery branch, if it is not set, it goes the other way. The other way is the Show me everything button branch. So if we don't have a search text when the Greeting topic runs, it offers you the button, if you already have one when the Greetings topic initiated then it doesn't.
So maybe because on the portal you can not type before the Greetings but on Teams you can that is the difference? So I added a Text bot response just to see if my suspicion was correct or not.
Nothing changed on the portal, but in Teams the info showed up:
So this must be it. I've created a new, simple greeting topic and tested my theory. It looked like this:
Really simple. There are only three pieces of code there, one for Setting the global search text:
vaVars.global_search_text = vaInputs.get_search_text.getValue();
One for showing an info message:
var hasText = 'Is there a global search text: ' + !gs.nil(vaVars.global_search_text);
var searchText = '. The search text is: ' + vaVars.global_search_text;
return hasText + searchText;
And one to call the Topic Discovery (this is OOB):
vaSystem.topicDiscovery();
It works exactly the same way as in MS Teams, as I suspected. Search phrase stored in the global variable, NLU picks up the intent nicely:
And if you search for something gibberish, the search term is successfully passed in to the Search Fallback. The Search Fallback (and AI search fallback using the vaSystem.getSearchText() method to get the search text (query). According to the docs: "This method returns the last utterance typed by the user and is used to find the current topic.". So it should be fine:
So that's all. It is possible, and no, it will not break the agent. If using it like this is good for MS Teams, it is good for us.
A little extra I've discovered is that you can call the TopicDiscovery method with a string input parameter like this:
vaSystem.topicDiscovery(vaInputs.get_search_text.getValue());
It works exactly the same way as setting the value for vaVars.global_search_text and then calling the method without input parameters. The system also sets up the value of the vaSystem.getSearchText() method's value. Nice.
https://www.servicenow.com/community/virtual-agent-nlu-articles/is-hiding-the-show-me-everything-button-possible-in-virtual/ta-p/2306980