Using slot values directly in utterances

I have filled in a slot value from the user by getting his/her name. Let’s say that the slot is name_slot. I want to use this filled slot value in future bot utterances. Like:

  utter_greet:
  - text: How are you, [name_slot]?
  - text: How's it hanging, [name_slot]?
  - text: What's up, [name_slot]?

Is there any way to do this directly in the domain file? I want to do this without creating an action to execute the utter_greet template which then fills up the variable [name_slot] with the actual value of the slot.

If a slot is set with the user’s name, then simply define a response like this:

utter_greet:
- text: Nice to meet you, {slot_name}.
2 Likes

It worked! Thank you so much!