Grab any number your client sends to your chatbot, including negative numbers, decimals, and quintillions.
With sys.number
you can make use of any number. Add this entity to the user says section to catch numbers entered by your customers and pass them to your databases and web services.
The number can be anything: the amount of money, height, weight, latitude, and longitude, user ID or whatever you need. The system automatically exchanges numerals to numbers analyzing the user input from left to the right.
-
four hundred thirty-five million two hundred forty thousand
= 435240000 -
1,10
= 10.1 -
3000K
= 3000000
Chatbot example with the sys.number entity
To understand how this entity works, we’ll create a short scenario for a real estate chatbot that gathers information about advertised properties. To recognize the estimated price entered by our potential customers, we’ll use the sys.number entity.
{{
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 called Real Estate Bot. Inside the story, add a new interaction triggered by the following input:
-
Go to the bot responses and add a text message. This is the moment when the bot asks for the estimated price.
-
Add a child interaction below and enter the sys.number entity into the user says fields.
-
Validation Entity – choose Sys.number
-
Save input to attribute – give a name to your new attribute
-
To make sure that the bot collected the right value, ask users to confirm it.
-
Save your work and test the real estate bot.
-
Save your work and test the real estate bot.
-
Our new
sys.number
works fine. Well done!