Catch both yes and no answers using one system entity: sys.yes-no.
Sys.yes-no
is a system entity that captures both, yes
and no
answers. Use it to reduce the bot designing time and avoid creating redundant interactions.
Chatbot example with the sys.yes-no
entity
There are plenty of situations when yes-no
system entity comes in handy. Users can confirm their data, approve purchases or answer simple questions and you can squeeze their answers in single interaction. Let’s create an example together.
{{
to trigger the entity window and select the one you you need.{{
to trigger the entity window and select the one you you need.-
Create a new interaction that will confirm the previous action. To do so, select quick replies and add two buttons to it.
-
Create a new interaction, below the existing one.
-
In the user says section add our system entity. To do so, type two curly brackets
{{ ... }}
and select the sys.yes-no entity. Name the attribute that will keep collected values. -
Move to bot responses tab. We want to serve both responses in one interaction action. Add a filter to create different reactions for yes and no answers.
-
And similarly for the
no
option: -
Save all of your work. Now we can test it using the built-in chat.
-
Everything works! Good job!