Building Chatbot on FPT.AI platform
Variable condition review
For Object Entities with the same Intent, but different Entity types, Bot will need to give 2 different responses to the 2 entity types. In this scenario, you will need to use “variable condition”
First, you will need to Create variable and Create 1 step beforehand.
Please notice that in scenarios that require variable condition review to get different answers, you should set Entity type to exact match.
Step 1: After creating the variable and step, choose the intent that needs editing. Attach intent “what_price” to the Bot answering condition menu.
Step 2: Create an answer using Text Card. In each card, select Add condition.
Step 3: Click on Select variable to choose type of variable to be attached to Entity.
Step 4: Choose the “=” comparison.
Step 5: Enter value to compare the entity types that Bot can recognize.
If Exact match is used, the Bot will recognize the real value as a keyword. Then, you will need to use this exact keyword for comparison.
Example: Bot builder had trained Bot to understand that “ip x” and “I phone x” all mean the same as “iphone X”. The bot can now recognize “ip x” as real value “iphone X” in the scenario. Therefore, it can answer correctly.
Notice:
You can explain the real variable values displayed in texts as: {{variable name}}
Comparisons:
= | Compares if variable is equal to a particular value |
---|---|
!= | Compares if variable is different to a particular value |
> | Compares if variable is larger than a particular value. In number comparisons, real values of variables have to be in numbers. |
Starts with | Compares if variable starts with a particular value. |
< | Compares if variable is smaller than a particular value. In number comparisons, real values of variables have to be in numbers. |
Listed | Compare variable to values in the variable list. In Value, you can enter different values, separated by a semicolon “;” Example: iphone;Samsung;xiaomi |
Not listed | Compare variable to values not in the variable list. In Value, you can enter different values, separated by a semicolon “;” Example: iphone;Samsung;xiaomi |
Includes | Compares if variable includes a particular value sequence |
- Variables with values will be stored on the system for 24 hours. If you want to replace with different values (maybe new entities provided by customers), or delete variables, you will need to use Memories.