Richard Kiss1
Kilo Guru

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.

find_real_file.png

 

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:

find_real_file.png

 

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:

find_real_file.png

 

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.

find_real_file.png

 

 Nothing changed on the portal, but in Teams the info showed up:

find_real_file.png

 

So this must be it. I've created a new, simple greeting topic and tested my theory. It looked like this:

find_real_file.png

 

Really simple. There are only three pieces of code there, one for Setting the global search text:

(function execute() {
vaVars.global_search_text = vaInputs.get_search_text.getValue();
})()

One for showing an info message:

(function execute() {
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):

(function execute() {
vaSystem.topicDiscovery();
})()
 
Does it break something?
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:
find_real_file.png
 
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:
find_real_file.png
 
 
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:
(function execute() {
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.
 
 
 
Comments
Ash44
Tera Contributor

The little extra has been great thanks @Richard Kiss1.

 

I have built out a topic which helps build the customer search term using this. Which not only improves the chance of the correct topic being triggered but improves the fallback knowledge search as well.

Version history
Last update:
‎08-29-2022 06:44 AM
Updated by: