NLU bypass

In some specific cases you may want to capture a text that is not necessarly in your intents. It can be a problem description, the user name, an address,... any unpredictable text
In thoses cases you will want to bypass the NLU and continue the dialog whatever the user message
Here is how you can do it

In your dialog flow, at the step where you need to ask for free text, add a "Bot Sows" object.

4504

Then click on Show more options to view the advanced settings

4500

Activate the NLU bypassing feature and define a bypass phrase.
Note: This phrase will be used by the NLU instead of the real user input so pick a quite complex phrase that should not come easily in the discussion. in this case we have chosen Free text NLU bypass phrase which has really small chances to occur accidentally in a conversation.

4490

Now we can add the next steps of our dialog flow with the following objects:

  • a "User says" object to detect the bypass phrase
  • a "Bot says" as the next bot answer, you can keep it empty
  • a "Bot does" where you put two lines of code to capture the real user input and use it as you want
4546

We create an intent with the exact same bypass phrase that you have defined before and train your bot.

4482

Here is a sample code that you can use in your "Bot does" object. Most important thing to remember is that the user input will be available in a variable called output.input

var name = output.input;
output.answer = 'Nice to meet you ' + name;

Once finished, here is the result that you will get.

242

Pretty cool huh?
Although your bot has never been trained to learn first or last names, he will accept the text provided by the user in this context as a name and smoothly continue the conversation 🙂