NLU Intent & Entity Extraction as a Raw Expression

Hi I would need to get my Bot to reply to specific Intent+Entity combinations in different ways.
Since the bot could be asked " I need help with “service A” / “service B” or “service C” " the intent would be all the same (get help), and it would be handy to direct the flow to a specific node based on the entity (service A, B or C)

What’s the best way to achieve the result without using the “intent service A, B or C” method?

Would using a transition + Raw expression like this get it done? === ‘my_custom_intent’ && == ‘my_custom_entity’

Thanks in advance

Hi @DaKea91,

This could be done using an action. Because your action will have access to the NLU processing(event.nlu) you could create a simple Javascript code that will analyse the event and then redirect the user to a specific node.

Here is a code example that could help you with the redirection part

Have a great day,


Thanks @Seb I’ll look further into your suggestion.
So far I’ve solved using a string like this selecting raw expression in the transition menu: === ‘my_intent’ && event.nlu.slots.‘MY_CUSTOM_SLOT’ === ‘my_entity’