Detect time of day

Hello
I´d like to give the option to call a real person to the chat by the user, but I´d like to prevent it to happen at night of sundays.
Is it possíble to detect certain time of day to prevent a task to be called?

Hi @felipe,

We infer that you would like to validate the current time and then assign the conversation to the Agent transfer node if it is not Sunday night.

You can try the following steps to achieve your requirement:

1- Before the Agent Transfer node in the Task.
2- Add a “script” node and add javascript that gets the current date and validates it for Sunday night. If it is Sunday night, then you can navigate it to a Message node with the required message else you can navigate it to the Agent transfer node.

You can use general Javascript dateand time functions with if, else conditional statement to validate the current date and time as per your scenario.

Hope this helps you achieve your requirement.

Please let us know if you need any further clarification on the above.

Regards,
Yoga Ramya.