How to create and configure Slots

icon picker
Triggering chatbot with a timer | Timer slot

Purpose and general information

The
@Timer
@Slot
is designed to start countdown after specific conditions are satisfied (e.g dialog is closed, a variable is changed etc) and run the
@Agent
when the countdown is completed.
image.png
image.png
For example, using the
@Timer
@Slot
you can:
“wake up” the
@Agent
2 hours after
@Closing Dialog
, if the
@Bot User
has not completed placing the order in the
@Chat
, to remind him to complete the order
force the
@Dialog
to be transferred to the operator if 10 minutes have passed since the beginning of the
@Dialog
and the
@Bot User
’s question has not been resolved
“remind” the
@Bot User
to return to the
@Dialog
if the
@Agent
does not receive an answer to the question within 5 minutes
Make requests about the delivery status to an external system once a day and notify the
@Bot User
if the status has changed

Slot creation and settings

A
@Timer
@Slot
can be created only after the
@Start
@Slot
if there is a regular branch for processing messages incoming through the
@Project Channel
. ​
image.png
Several
@Timer
@Slot
s are allowed in a
@Script
, and their parameters can be the same.

Slot attributes

image.png
The parameters inthe picture should be read as follows: set a timer in Interruptable mode for 1 hour after closing the dialog
Slot Name — the name of the
@Slot
that will be displayed in the
@Script Tree
. The maximum length of a field value is 40 characters.
Count down — countdown time, which will be set when the timer is started, after the end of the countdown of this time the timer will be triggered. The value cannot be empty, the minimum value is 1 minute, the increment is 1 minute. When creating a
@Slot
, the time value is preset to 1 hour.
If you try to enter a value equal to or greater than 60 in the min field, the value will be automatically converted to hours and transferred to the hours field. When the hours field is filled in, the converted value will be added to the value previously specified in the hours field.
If you try to enter a value equal to or greater than 24 in the hours field, the value will be automatically converted to days and moved to the day field. When the day field is filled in, the converted value will be added to the value previously specified in the day field.
after — an event that starts checking the if condition for starting the timer.
If — condition under which the timer will be started when the after event occurs. The expression in this field must produce the logical result True or False (more: ).
Note: without an additional condition, there is a risk of endlessly restarting the timer, for example:
@Closing Dialog
starts the timer for 5 minutes → after 5 minutes the timer goes off → The
@Agent
writes something to the
@Bot User
→ this message starts a new
@Dialog
→ this
@Dialog
will be closed again, for example, due to a timeout →
@Closing Dialog
starts the timer again for 5 minutes.... and so on in a circle. You can enter a
@Context Variable
as a sign of whether the
@Agent
reminded you of itself; if it is filled, then the timer will not start.
Mode — timer operating mode, it determines how the timer can be interrupted:
Interruptable: a mode in which any change in the
@Communication State
stops the timer, for example: The
@Bot User
wrote something, an
@Incoming Request
arrived, the
@Agent
moved forward in the
@Script
, another timer of this
@Agent
worked.
Always on: a mode in which changing the
@Communication State
does not stop the timer; it can only be stopped by
@Training
the
@Agent
by the user or starting a new timer from the same
@Slot
(for example, when the conditions are met again).

Using Syntax in Timer Slot

In the
@Timer
@Slot
, it is possible to use
@Expression
in the If field. More details: .

Slot operation

Monitoring

The
@Platform
monitors
@Chat
s for trigger events for each
@Timer
@Slot
in their
@Script
.
Timer triggers
Trigger
Description
Peculiarities
Examples
1
Dialog closed
@Closing Dialog by Script
starts a timer if the
@Additional Timer Start Condition
is met
Remind the interlocutor that he did not finish the dialogue, placing an order, or abandoned the cart
Send data to an external system after the end of the dialogue
Periodically “go” to an external system for the status of a task/order and notify the interlocutor when it changes
Send a request to evaluate the quality of service
2
Dialog started
@Opening Dialog
starts a timer if the
@Additional Timer Start Condition
is met
force an operator to connect if the dialogue lasts a long time, but the issue is not resolved
3
Variable changed
Changing a variable to a new (different) value starts a timer if the
@Additional Timer Start Condition
is met
The variable is specified by the user in a new field that appears when this item is selected. Entering a variable is required, the variable name is indicated without quotes
an hour after receiving key data (for example, phone number), send it to an external system, regardless of the status of the dialogue
4
Bot started waiting
The
@Agent
's transition to the state of waiting for input from the
@Bot User
:
@Wait For Reaction
,
@Slot Filling
,
@Button Menu
starts a timer if the
@Additional Timer Start Condition
is met
“ping” the interlocutor if he is distracted from the dialogue
invite the operator to dialogue if the interlocutor does not answer
There are no rows in this table
The following actions are performed for each
@Timer
@Slot
in the
@Agent
:

Starting a timer

If the
@Timer Start Trigger
fires, the
@Platform
checks the
@Additional Timer Start Condition
.
When the
@Additional Timer Start Condition
is met, the timer starts and a scheduled task is created in the system. If the
@Additional Timer Start Condition
is not met, nothing happens.
Starting a timer itself does not affect
@Conversation
and does not change the
@Communication State
, it simply creates a scheduled task in the system.
Starting a timer interrupts the previous, not yet triggered timer, started from the same
@Timer
@Slot
, if there is such a
@Set Timer
.
Note: technically, the same original
@Set Timer
remains in the database, but a new trigger time is set in it.

Timer activation

The
@Platform
checks which
@Timer
s have finished counting down (Count down field) and activates their
@Timer
@Slot
s in the corresponding
@Chat
s — the
@Timer
is triggered, and the corresponding
@Script Branch
es are launched in the
@Chat
s.
Verification period is 1 minute.
This means that there may be a delay of up to 1 minute (59 seconds) between the scheduled and actual operation of the timer.
If a
@Set Timer
is counting down before the end of the next minute, the
@Timer
will still not fire because the
@Platform
has not yet checked and does not know that the countdown has ended. But as soon as this minute ends, the
@Platform
will check that the timer will work.
Note: as practice shows, most often the delay occurs in the range from 40 to 59 seconds, this should be taken into account when setting the countdown value.
At the end of each minute, all
@Timer
s whose countdown has ended within a minute are triggered immediately one after another. It means that they could be launched “at the same time” with an interval of 1-59 seconds, but will work “simultaneously”, since the
@Platform
learned about this as part of one check (see )
When the
@Timer
fires, the
@Communication State
changes:
The current
@Script
in the
@Active Dialog
will be “interrupted”, because the
@Agent
will immediately “jump” to the
@Script Branch
after the
@Timer
@Slot
and continue
@Conversation
from the next
@Slot
after the
@Timer
@Slot
.
If at this moment there is no
@Active Dialog
in this
@Chat
, then the
@Script
in the
@Chat
will start, but the
@Dialog
will be opened at the first incoming or outgoing message.

Deleting (stopping) a timer

A
@Set Timer
can be stopped (reset, deleted) by certain events, based on the mode in which it was started.
Any
@Set Timer
can be reset by starting a new
@Timer
from the same
@Timer
@Slot
.
Note: technically, the same original
@Set Timer
remains in the database, but a new trigger time is set in it.
Retraining an
@Agent
or deleting/deactivating an
@Project Channel
deletes all
@Set Timer
s in resettled
@Chat
s.
Timer Operation Modes
Mode
Description
Interruption by agent retraining
Interruption by Communication State Change
Interrupt by starting a new timer from the same slot
1
Interruptable
a mode in which a change in the
@Communication State
stops the timer, for example: the
@Bot User
wrote something, an
@Incoming Request
arrived, the
@Agent
moved according to the scenario, another timer of this
@Agent
worked.



2
Always оn
a mode in which a change in the
@Communication State
does not stop the timer, it can only be stopped by starting a new timer from the same slot (for example, when the conditions are met again)



There are no rows in this table

Multiple Timer slots in one Agent

Several
@Timer
@Slot
s are allowed in one
@Agent
, and their
@Timer Start Trigger
s, , countdown times and additional conditions may partially or completely coincide.
Each
@Timer
@Slot
in the
@Script
starts its own separate timer.

Running multiple timers in one agent

Each
@Timer
is started from its
@Timer
@Slot
independently of the others according to the firing order — see .
Several
@Timer
s, including “identical” ones, can be launched simultaneously.

Firing multiple timers in one agent

Since
@Timer
s are checked in the
@Platform
once a minute, timers running in one
@Agent
, which should work less than a minute apart, can work “simultaneously” and in a random order:
During the next minute-by-minute check, the
@Platform
will detect all untriggered (started)
@Agent
@Timer
s that have expired and send them “for execution”
After which they will be triggered in random order.
It means that if 2
@Timer
s were started for one hour, then it is unknown which of them will work first in an hour.
At the same time, if among the
@Timer
s “sent for execution” there are Interruptable
@Timer
s, then they will no longer be interrupted by the operation of the first timer in the queue.
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.