Route your flow depending on the time
Some examples on how to use Get time step in your bot.
Last updated
Some examples on how to use Get time step in your bot.
Last updated
This page presents two tutorials that use Get time: to route your greeting based on the time, and to route your offloading based on the time.
You can use the Get Time plugin to greet users in customized way, so 'good morning' and 'good afternoon'!
First, change your introduction to a 'Go To'. Then, in that Go To, link to an Action block with the Get Time plugin. In that Action block, in the Go To section, link to a new Go To 'Check Time'. This Go To will look like this:
In this Go To, the current hour is checked and divided into the evening, afternoon or morning through the different conditions. Depending on the current time, the variable {greetingTime} is dynamic, so you can have one introduction for the entire day.
Where the complete flow will look like this:
The Get Time plugin can also be used to check whether or not you would like to start offloading to a human agent. Create a similar flow as the one above, but instead of the routing to the introduction in the Go To, route to the Offloading Open or Offloading Closed block based on the time:
In this case, the human agents are available from 9:00 (if the hour is greater than 8) until 16:00 (if the hour is lower than 16), and the Go To checks the time based on the previous Get Time plugin and will route the users correctly!