Collect input not working
Last updated
Last updated
Whenever the text in your input validation
block is not recognized or saved correctly, this is usually caused by one of two things:
The NLP is working. Each input validation
block has an option to disable the NLP. This means that the answer will be saved in the variable of the input validation and the NLP engine will not try to match an intent.
Below is a great example:
Here, the NLP was enabled in the input validation
asking 'What would you like to eat'? The sentence 'Can I order some fries' triggered the same intent and thus input validation
again, resulting in a loop. This can be fixed by using match entities, where the word 'fries' will be picked up and saved.
Make sure you create a match entity with the same name as a variable in the input validation
:
With that entity in place, we get a better and more user friendly result:
And we see that the variable is saved correctly :
Another example can be seen below, where the first name triggers a greeting:
This is because the NLP in enabled in the Input Validation. This means that the NLP will search for expressions that match the input, and in this case the 'Greeting' intent is triggered. This can be easily fixed by disabling the NLP:
With disabling the NLP, the NLP engine will not run based on the given input and will immediately save the user input in the variable, and the flow will continue:
Another common issue for input validation is the parser:
It could be that the answer given by the user is not compatible with the answer the bot is expecting according to the parser. For example, a date is not being recognized correctly. Then make sure the date being given by the user is in the format the bot is expecting, and create your error messages accordingly: