Recast.ai is a chatbot / AI platform that allows to easily train a bot in order to detect the user intent and extract relevant data.

For a complete tutorial about Recast.ai give a look here. The Recast node sends the text of the incoming message to the Recast.ai servers, then:

For example, create an intent want-drink and train with these phrases

I want a martini
May I have a martini
Can I have a moscow mule
May I have a mojito

and mark the words “martini”, “moscow mule” and “mojito” as a new entity called drink, then prepare a flow like this

example-recast.png

If the user says “I want a martini”, the topic will be switched to “want-drink” and the output will be

{
  payload: {
    intent: 'want-drink',
    variables: {
      pronoun: 'I',
      number: 1,
      drink: 'martini'
    }
}

Generally after a Recast.ai node it’s useful a Rules node to test the topic variable and redirect the flow based on user’s int