-
In a single entity node, bot asks the user ‘please provide your phone number and date of birth’. how do i capture these things in a single entity node.
-
If the user provides only phone number, bot should prompt ‘please provide date of birth’
@csaitharun
An entity is only for one type of input.
Our NLP system allows you to use NER for picking respective entities from an utterance.
There is also another crude way to accomplish your use case - accept both in a string and have a code to parse through the same using a regex to fetch desired values.
Using a string entity is a bad idea
The best way is to have two entities, one as a phone number, one as a date of birth.
You can choose which one to ask/prompt for first.
If the user happens to provide both pieces of data on their next utterance then the first entity will extract its value and mark those words as used up. Then the second entity will consider the existing utterances to see if it can find a valid value from the remaining unused words. It will only prompt if it is does not find a value.