How to create and configure Slots

icon picker
Script branching depending on conditions| Transition Rule slot and Condition subslot

Purpose and general information

@Transition Rule
is a
@Slot
that allows you to make branching scenarios depending on the conditions specified in the
@condition
@Subslot
s.
image.png

Slot creation and settings

Slot attributes

image.png
Name — the name of the
@Slot
, which will be displayed in the
@Script Tree
. The maximum length of a field value is 40 characters.

Condition subslots

Automatic generation of subslots when creating a Transition Rule

When you create a
@Transition Rule
@Slot
, two required
@condition
@Subslot
s are automatically created.
image.png
The first of them always has the value “main”, which can be changed using Syntax
The second one, which has the value “true” and the name FALLBACK_CONDITION, cannot be changed. This
@Subslot
will always remain the lowest in this
@Complex Slot
— all new
@condition
@Subslot
s will automatically be placed above it.

Adding Condition subslots

Using the “+” button you can create a new
@condition
@Subslot
.
ДОБАВИТЬ КОНДИШН.png
New
@condition
@Subslot
s will be located above the automatically created
@condition
@Subslot
with the value “true” in the order in which they were created.
image.png

Removing Condition subslots

To remove a
@condition
@Subslot
, you need to right-click on it and click the Remove Branch button, then click OK in the pop-up dialog box.
image.png
image.png
It is possible to delete any
@condition
@Subslot
, except the
@Subslot
with the value true, if after deletion the
@Transition Rule
has at least two
@Subslot
s left.
image.png
Removing a
@Subslot
with the value true or the only one besides it is impossible. When you try to do this, the following error will appear at the bottom center:
image.png

Condition subslot attributes

image.png
Nameー the name of the
@Slot
, which will be displayed in the
@Script Tree
. The maximum length of a field value is 40 characters. If a name is not entered when creating a
@Subslot
, the first 40 characters of text from the Condition field are automatically copied to the Name field. If the Name field is cleared when editing a
@Subslot
, then the first 34 characters from the Condition field will be displayed on the
@Subslot
in the
@Script Tree
.
Condition ー a logical expression that will be checked during the
@Conversation
process, and if the check result is TRUE, a transition will occur to the
@Script Branch
following this
@Subslot
. The expression is specified using syntax. Scrolling is available in the Condition field if the expression is long.
Important: Checking for an impossible operation will return False:
1. Invalid operation, for example, the expression 1 < a4
2. Comparison with a non-existent variable
3. Comparing a string using the operations >, <, >=, <=
The \ character in the
@Subslot
must be escaped: it must be preceded by a \ character, otherwise the
@Agent
will not be trained. Read more:

Using the syntax in a slot

In the
@Transition Rule
@Slot
, it is possible to use
@Expression
in the Condition field. Read more:
The result of calculating the condition will be a Boolean value: True or False. If the result of calculating the condition is a value of some other type (string, number, list, etc.), then it will be cast to a Boolean type.

Slot operation

When the
@Conversation
passes through the
@Transition Rule
@Slot
, the truth of the expressions specified in the
@condition
@Subslot
s is checked from the upper
@Subslot
to the lower one;
The
@Conversation
will immediately go to the
@Script Branch
of the first
@condition
@Subslot
, the result of the expression of which will be TRUE; expressions in the lower
@condition
@Subslot
s will not be checked. For example, if the
@Context Variable
{{ username }} is a string and has the value “Ivan”, there will be a transition to the
@condition
@Subslot
@Script Branch
with the condition {{ username == 'Ivan' }} since this condition will be the first to be satisfied during the check.
image.png

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.