With Chatlayer.ai, you can use the
time variable to guide your flow based on the current moment in time.
A Chatlayer.ai customer, for example, uses this to determine if it is winter or summer, and will recommend tires based on the current season.
To implement this, first create an
Action bot dialog that contains an API plugin with a
URL field enter
functions/time/getTime . You don't have to add any headers or query parameters.
This action saves the
time variable to the session of the user. You can use it in your Go To's and Bot Messages with the following variables:
All variables will return a number. You can use them in your flow like this: