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

**URL:** <https://forum.rasa.com/t/how-to-accept-names-or-email-ids-from-bot-or-any-username-or-passwords-which-can-be-of-any-type/14257>\
**Category:** Rasa Open Source\
**Created:** [August 13, 2019, 5:06am UTC](https://forum.rasa.com/t/how-to-accept-names-or-email-ids-from-bot-or-any-username-or-passwords-which-can-be-of-any-type/14257 "2019-08-13T05:06:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant\_kamble](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@prashant\_kamble](https://forum.rasa.com/u/prashant_kamble)\
**Post date:** [August 13, 2019, 5:06am UTC](https://forum.rasa.com/t/how-to-accept-names-or-email-ids-from-bot-or-any-username-or-passwords-which-can-be-of-any-type/14257/1 "2019-08-13T05:06:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![j.mosig](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/j.mosig/32/3588_2.png) [@j.mosig](https://forum.rasa.com/u/j.mosig)\
**Post date:** [August 13, 2019, 5:28am UTC](https://forum.rasa.com/t/how-to-accept-names-or-email-ids-from-bot-or-any-username-or-passwords-which-can-be-of-any-type/14257/2 "2019-08-13T05:28:11Z")

</div>

Hi @prashant_kamble. This is a job for [Entity Extraction](https://rasa.com/docs/rasa/nlu/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.

---

<div class="post-metadata">

**Author:** ![prashant\_kamble](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@prashant\_kamble](https://forum.rasa.com/u/prashant_kamble)\
**Post date:** [August 13, 2019, 5:34am UTC](https://forum.rasa.com/t/how-to-accept-names-or-email-ids-from-bot-or-any-username-or-passwords-which-can-be-of-any-type/14257/3 "2019-08-13T05:34:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![j.mosig](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/j.mosig/32/3588_2.png) [@j.mosig](https://forum.rasa.com/u/j.mosig)\
**Post date:** [August 13, 2019, 5:40am UTC](https://forum.rasa.com/t/how-to-accept-names-or-email-ids-from-bot-or-any-username-or-passwords-which-can-be-of-any-type/14257/4 "2019-08-13T05:40:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![prashant\_kamble](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@prashant\_kamble](https://forum.rasa.com/u/prashant_kamble)\
**Post date:** [August 13, 2019, 5:49am UTC](https://forum.rasa.com/t/how-to-accept-names-or-email-ids-from-bot-or-any-username-or-passwords-which-can-be-of-any-type/14257/5 "2019-08-13T05:49:01Z")

</div>

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