responses:
utter_greet:
- text: "Hey! Would you like to purchase motor or home insurance?"
buttons:
- title: "Motor insurance"
payload: '/inform{{"insurance":"motor"}}'
- title: "Home insurance"
payload: '/inform{{"insurance":"home"}}'
If I understand it correctly, the logic works as following:
Do I have to define the entities motor and home in the nlu.yml file? I don’t see why, because the entity should automatically be set by the button. In other words: the entity is hard coded. There is no NLU involed (according to my undestanding).
Is there a way to directly set a slot with a button? Something like this for example:
You’re correct. With the payload, you are forcing the bot to take this value as an entity.
I would still recommend adding the values in your examples though, just in case the user decides to types instead of clicking a button - unless you want to disable the text input when there are buttons.
The current way to set a slot via a payload is by setting its entity and having auto-fill.