Sys.integer
ChatBot.com

luiza jurczyk

Last update:

Help the bot to understand when your customers enter natural numbers into the chat window.

The sys.integer is a system entity that recognizes natural numbers. Add it to your story when you want your bot to automatically identify English numerals and reuse them in another part of the scenario or pass the values your web service or database.

Sys.integers entity supports only English language.

You’ll use sys.integer entity, to know amounts of orders, identify your users or ask for an evaluation.

Chatbot example with the sys.integer entity

Sys.integer comes in handy when you want to know a quantity, sizes, age and other natural numbers. Imagine that you sell jeans and need to ask customers and you want to ask users for the number of pairs of jeans that they wish to purchase. Sys.integer will help you to verify the answer and save it as an attribute.

Type double curly brackets ... to trigger the entity window and select the one you you need.

  1. Go to an existing story or create a new one. To complete orders, we need a simple interaction with cards. Add a couple of products together with short descriptions and buttons with postback or go to actions that allow customers to buy your products.
  2. Create a child interaction. In the bot responses section, prompt users for the number of jeans they want to buy. Remember that this interaction should be triggered by the Buy now button.
  3. In the next child interaction, we can finally use our system entity to verify the user input. In the user says section type two curly brackets to open the entity window and select:
    • Validation Entity – choose Sys.Integer
    • Save input to attribute – give a name to your new attribute
  4. Now add a bot reply using the collected attribute value.
  5. Save all your work and test it.

Go to next article arrow_forward