System entities
Aimylogic has a set of most frequently used system entities so that you do not need to create them on your own every time. You can use them in the Intents block.
There are the following system entities in Aimylogic: $TEXT
, $NUMBER
, $FLOATNUMBER
, $PHONE
.
These entities allow you to get data from the client’s phrase that corresponds to a particular template.
$TEXT
This entity allows you to get some text from the client’s phrase.
$TEXT
entity can be used only in a template. You can not use it in phrase examples.To add a template to an intent, click the icon in the popup window where you add an intent. It will change to the icon.
For example, you have a template like I am looking for $TEXT
. When the client writes “I am looking for an interesting job”, the bot will get “an interesting job” from a phrase and save it to the $TEXT
variable.
$NUMBER
This entity gets whole numbers from the client’s phrase. The client may write them either in numbers or in words. As a result, the bot will create a $NUMBER
variable and put the whole number into it.
If you expect the client to write two numbers in their phrase, you should use a template instead of a phrase example. You can use a template like this:
how much $NUMBER: x plus $NUMBER: y will be
After the client writes “how much five plus 25 will be”, the bot will create $x
and $y
variables with 5
and 25
values.
$FLOATNUMBER
This variable is the same as the $NUMBER
variable, but it allows getting fractional numbers from the client’s phrase, e.g., “five point six”.
For example, if the client writes “five point six”, the bot will create the $FLOATNUMBER
variable with the 5.6
value.
$PHONE
This variable gets the mobile phone number from the client’s phrase and corresponds to the phone to $var
block.
For example, if the client writes “eight nine one two three four five six seven eight nine” or “89123456789”, the bot will save +79123456789
to the $phone
variable.