There’re many ways of saying yes and no. We’ve pulled them all together and created ready to use entities.
Sys.yes
and sys.no
entities are built in elements you can use to recognize your user’s input without creating endless user says lists. Don’t predict all the ways your users say yes
or no
. Use the system entity instead that will not only recognize the correct answer but also memorize it so you can reuse it within the ongoing chat or pass it to your web services.
Chatbot example with the sys.yes
and sys.no
entities
It’s pretty common to ask your clients or users to confirm some information, actions or requests. Let’s create an example story with an interaction that finishes the chat after yes
, no
confirmation. To do so we’ll use our system entities and reset chat response. Let’s start!
{{
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 story or use an existing one. Here add a new interaction and name it
Confirmation
. Its goal is to make sure that our visitor received all expected help before ending the chat. Add the text bot response to ask the question. You can also use quick replies or other suitable response. -
Below this interaction, let’s create another two:
yes
andno
interactions. -
Finally, we can use our
sys.yes
andsys.no
system entities. Use two curly brackets{{
and typeyes
. The system will complete it automatically. Similarly, you can do it for theno
entity. -
Assign answers to our new interactions.
No
answer means that the user wants to end the chat. We’ll use the reset bot response. -
Yes
interaction should redirect to our bot’s main menu or any other appropriate part of the story. -
Save all of your work and test the chat.
-
It seems that our story works fine! Well done!