# Username extraction

**URL:** <https://forum.rasa.com/t/username-extraction/43152>\
**Category:** Rasa Open Source\
**Tags:** testing\
**Created:** [May 3, 2021, 2:26pm UTC](https://forum.rasa.com/t/username-extraction/43152 "2021-05-03T14:26:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RDS](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RDS](https://forum.rasa.com/u/RDS)\
**Post date:** [May 3, 2021, 2:26pm UTC](https://forum.rasa.com/t/username-extraction/43152/1 "2021-05-03T14:26:42Z")

</div>

Hi! What is the possible way to extract the name of the person after they have logged in to their account to a webpage with rasa chatbot without asking the user? Like I want to send a message like, " Hi John, what can I help you with ", after John has logged in to the webpage with his credentials.

---

<div class="post-metadata">

**Author:** ![kmanadkat](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kmanadkat/32/14332_2.png) [@kmanadkat](https://forum.rasa.com/u/kmanadkat)\
**Post date:** [May 3, 2021, 5:38pm UTC](https://forum.rasa.com/t/username-extraction/43152/2 "2021-05-03T17:38:55Z")

</div>

Best way here could be you store name into a **slot** while user logs in & then use that slot in utterances. Example of an intent storing exercise in an entity. here `(exercise)` is referring to filling entity.

```auto
- intent: inform
  examples: |
    - Yes, I went for a [run](exercise)
    - uh huh an hour of [yoga](exercise)
    - yep, I went for a [hike](exercise)
    - Yes I took the dog for a [walk](exercise)
    - Yeah, I played [tennis](exercise)
    - I went [swimming](exercise)
    - I went for [walk](exercise)
    - I did [swimming](exercise)
    - I went for [cycling](exercise)
    - Took a [spin class](exercise)
    - Did some [boxing](exercise)
    - [rock climbing](exercise)
    - played some [basketball](exercise)
    - played [football](exercise)
    - I did a [workout](exercise) video

```

```auto
slots:
  exercise:
    type: text
    influence_conversation: false

entities:
  - exercise

forms:
  health_form:
    exercise:
    - type: from_entity
      entity: exercise

```

filling slot with entity using form. finally you can utter slot value anywhere you want in story

```auto
  utter_slots_value:
  - text: "Here's your daily wellness log:\n
            - Type of exercise: {exercise}\n

```

that `{exercise}` above is giving us value stored in **slot** `exercise`.

You can use similar approach for name…

---

<div class="post-metadata">

**Author:** ![RDS](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@RDS](https://forum.rasa.com/u/RDS)\
**Post date:** [May 3, 2021, 6:08pm UTC](https://forum.rasa.com/t/username-extraction/43152/3 "2021-05-03T18:08:01Z")

</div>

Hi @kmanadkat, thanks for the reply. Actually I was wondering if there is a way to extract a name without asking the user as that particular webpage is logged in with his details.
