How to check if a VA Topic was triggered from NLU or if a user selected it from topic picker?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2022 07:57 AM
Hello,
I am wanting to add a condition in my virtual agent topic where if the topic was triggered from an NLU, then perform certain actions, if a user manually selects it, then skip those steps. How do I check that in the designer?
Any suggestions appreciated! Thank you!
- Labels:
-
Virtual Agent

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2022 12:00 AM
Hi Nish,
There is a system variable called vaSystem.getSearchText(). According to the docs: "This method returns the last utterance typed by the user and is used to find the current topic."
If you select manually, the variable will not have a value, if you perform a search, it will have a value. Just created a small topic to test it:
The conditions are:
NLU: return !gs.nil(vaSystem.getSearchText())
Manual selection: return gs.nil(vaSystem.getSearchText())
The outcome is this:
NLU search
Manual selection from the Show me everything:
I hope this helps.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2024 09:51 AM
@Richard Kiss1 thanks for this, worked like a charm!