Create entities relevant to your business and reuse them in your Stories to verify user responses.
Using entities in interactions
In this example, we’ve used the User Entity EuropeCountries that we created here. In this interaction, you expect the user to type the European country they live in. You can use this information to determine their approximate location or time zone.
-
Go to your ChatBot Story or create a new one.
-
Add a new Bot response block and enter your message and question:
Hello! 🙋Where are you from?
-
Add the User input block after your Bot response. The User input block lets you detect the user’s message and extract necessary information by using a User Entity. In the User says section, use the EuropeCountries entity. To do so, type two curly brackets {{ or click on the curly brackets icon to open the entity window.
-
Next, choose the Parameter validation: EuropeCountries and set the attribute’s name to EuropeCountries.
-
Now, use the Bot response block to send the bot’s response using a collected attribute.
-
At last, you can use the Testing Tool to check if our bot works correctly.