This action is intended to inform the client that operators are not working during the selected time. The client is offered a time interval during which they can contact and receive a response.

There are two events available for this action:

success - the contact time falls within the operator's working hours, and creating a chat with the operator is available.

error - the contact time does not fall within the operator's working hours, and creating a chat with the operator is not available.

The standard format for use in the script:

Untitled

This action is set up before the block with the client's question. The time check is carried out when entering the action block. If the time corresponds to the specified range, the success event occurs and the scenario continues to execute further. If the time does not correspond, the error event is triggered, and the scenario execution switches to the error branch, where an information message with the operators' work time and the possibility of returning to the menu is often placed.

Setting the time in the action is done using a json config.

Untitled

The parameter morning_time indicates the start of operators' work, while evening_time indicates the end of their work time. During the period from 22 to 8, the error event will be triggered.

You can specify minutes, to do this you need to specify "19:30", for example "morning_time": "19:30” , it is necessary to specify minutes for 2 values, for example

{
"evening_time": "5-00",
"morning_time": "0-30"
}

It is also possible to make availability in days, for which it is necessary to specify the day of the week.

For example, availability from 9 to 18, from Monday to Friday. In this example, weekends are indicated as numbers, 6 - Saturday and 0 - Sunday.

{
"evening_time": 18,
"morning_time": 9,
"weekends": [
6,
0
]
}

<aside> 💡 Important! When an error event occurs, the client's request data is not saved anywhere, and the operator won't be able to access them. In order to record such requests, additional script settings are required using Custom Data.

</aside>

<aside> 💡 Important! If you need to use this block before connecting to the operator, there should be no blocks between the check_schedule action block and the operator_panel__connect_to_operator_with_msg action block in which the user can enter any data (for example, Waiting for a response from the user with a proposal to ask the operator a question).

</aside>

<aside> 💡 Important! If you want to display a message to the user that the time is out of order after checking the time, but still create a request to the operator, it must be done in the script. And for a dialog to stay idle and not close itself, it is necessary to remove the dialog closing by timeout for this connection to the operator, and the button for closing the dialog by the user (if required). It is also necessary to take into account that this will affect the statistics of dialogs

</aside>