Get the NLU Intent value

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2023 06:29 AM
Hi,
Is there way in the Virtual Agent topic initially to grab the NLU intent value that re-directed the user to the VA topic?
Regards,
Ayman

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2023 11:35 AM
Did some research on this one and don't think it is possible to grab the NLU Intent value inside a Virtual Agent topic. The best you could do would be to grab the Search text the user entered by using vaSystem.getSearchText(). There is currently no NLU Inference APIs that would help you run this search inside a Script action step.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2024 02:14 AM
Hi ayman_h. I am looking for a similar solution. How to return NLU intent value in VA response when using VA bot integration API? Any leads on that?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2024 04:50 AM
@javeriaarif705_ there is no quick way of doing this. You can use what Chris D suggested, that should work but I haven't tried this yet
1. Grab the utterance the user used by using vaSystem.getSearchText()
2. Lookup the open_nlu_predict_intent_feedback table using the end user ID, utterance used, 'auto selected = true' and the date time
3. Grab the first intent returned

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2023 07:06 AM
If you have the topic name and NLU Intent-to-Topic is a 1:1 relationship, why do you need to get the intent from the topic?
That said, it's a little indirect, but you should be able to use the open_nlu_predict_intent_feedback table. You can't get directly from a conversation (task) to the intent, but you use the Created By (vaInputs.user.user_name) in combination with the Utterance (vaSystem.getSearchText()) and (Selected | Auto-Selected = True) to get the intent if you sort the results descending by Created and grab the first one.