Get last utterance from user with vaSystem.getSearchText()

MB Richards
Tera Contributor

I know that the user's last VA utterance is stored in vaSystem.getSearchText() 

 

I am using this script within a Topic, so I can access that string, and I created the associated script variable.  But the variable "desc" is returning "null".  This seems straightfoward - what am I doing wrong?

 

Script:

(function execute() {
     var desc = vaSystem.getSearchText();
     return desc;
})()

 

Script Variable

desc

 

For example, within the topic, I want to save the string "I need admin rights" (typed after the greeting) as a variable:

 

MBRichards_0-1723666861642.png

Thanks in advance!

6 REPLIES 6

@madhumithap2209 I don't see a screenshot of your added user_typed script variable.  See my other response for screenshots of that!  

Hi @MB Richards 

I am exactly facing the same issue. I am doing some customization in anything else topic. I tried the same way you have given above, but, still I am not getting anything from getSearchText(). Attached all the screenshots for your reference.

 

Your help would be appreciated.