Create entities relevant to your business and reuse them in your stories to verify any user input you need.
Before you start
-
User entities can be used in the
user says
section. -
Use attributes to call values captured by your entities.
-
You must create an entity in the Entities section, before using it in interactions.
-
To call an entity, type two curly brackets
{{ $1 }}
.
Using Entities in Interactions
In this example, we’re using the entities “Countries” that we’ve created together here. In this interaction, we’re expecting clients to type the countries or continents they live in. We can use this information to determine their approximate location or time zone.
-
Go to your
stories
andcreate a new interaction
. -
Add a few phrases that your clients or visitors might enter when telling their location. Remember to add the entity. To do so, type double curly brackets, now you should see all valailable entities. Select
countries
and name your new attribute. -
Now, we can create the reply. Go to the
bot responses
and type your message. -
To check if our entity works, we can use an attribute. Add again
{{ countries }}
to call the value given by the user. -
Click on the
save
button to keep your changes.