Never Miss a Booking
Following on from the last tutorial (Taking Bookings Couldn’t be Easier), we’re going to show you how to send reminders for the bookings made via the bot.
Most of us live such busy lifestyles that it is easy to forget about a booking that we’ve made. Some people are super organised and keep everything in a calendar but we can’t all be that organised and for those people who aren’t as organised, there could be a bot to remind you!
Best of all, it only takes a few moments to add reminders to any flow that you are already using.
What you will learn
- Using the Wait service to pause a flow
- Using date offsets
We’ve added two more tasks to the booking bot flow so a reminder can be sent to the user. One task is used to pause the flow and the other is a message to the user. The reminder will be sent the day before their booking at 5:30 PM.
Please, feel free to install the updated Flow.
Wait Until a Date
The Wait service offers two actions, ‘Wait for a while’ and ‘Wait until a date’. The wait for a while option will allow you to set a number of days, hours and minutes, which is great for waiting short periods.
But for reminders, the wait until a date is more suitable as this allows you set a specific date and time and you can use the outputs from previous tasks to populate both the date and time. For our action, we have used the date that the user selected for the booking.
Flow XO also offers some clever built-in logic for handling Dates & Times and one of the things you can do is use offsets. You can use positive or negative offsets allowing you adjust both date and time values. This is really handy for settings reminders.
We’ve used an offset of minus one day on the selected date output. The date output is the answer that the user gave when asked what date they would like to book. The offset is the ‘-1d’ that you see after the output.
Note: You need to ensure that you leave a space between the end of the output and the start of the offset. You’ll also need to leave a space after the offset if you are also adding a time value.
We’ve set the time to 17:30:00 GMT.
Tip: You could ask the user what time they would like to receive the reminder. The Bot — Ask a Question also offers validation for date and time values and can understand any format that you see outlined in the Dates & Times document. It’s cool features like this that make the bots feel more human-like.
Sending the Reminder
The next task is a Bot — Send Message and this is the reminder that will be sent to the user but the flow will not move to the next task until it has waited until the day before the selected date at 5:30 PM (UK Time).
Once we have reached the date and time that we wish to send the reminder at, the message will be sent.
The Finished Bot
And that’s it! Just two tasks to add the functionality for reminders. We now have a bot that is able to send reminders the day before so that customers won’t miss or forget the booking that they made.