How to accept names or email id's from bot or any username or passwords which can be of any type?

Dear All,

I am trying to accept person’s name or username or password from bot. But there can be any possible name, username or passwords right. So how do I handle such data and accept it from the bot and store it into slots for further processing.

Because in this whole world name can be anything that much amount of data we can give that I don’t think. So is there any another way to handle and accept such data.

And even if we specify regex for name i.e only alphabets but then after how it will distinguish between username and name because both may be same sometimes.

Hi @prashant_kamble. This is a job for Entity Extraction. Just define an entity for username and give a slot the same name as the entity. Whatever the entity string was will be filled into the slot, so you can use it. Entity recognition works by recognising the position in the sentence, preceding or following words, etc., so it is independent of the particular string.

Hi @j.mosig,

You are right. What if I have intent for name and another intent for username and user is providing same name so how bot will get to know that to which intent it should go and store user msg accordingly in a name or username slot?

Because first stage in bot is intent identification based on user provided data and go to coressponding flow.

You can hope it learns which is which if you provide enough example phrases in your stories. It would be impossible to learn, of course, if users enter no context words, but just “name password username”, instead of, e.g. “My name is …, and my login credentials are … with password …”. If it doesn’t work, maybe ask those three things separately.

Yeah thanks @j.mosig. I will look deep into it. :blush::blush: