Weekly Reminder Bot: Call Your Mom

Walkthrough Level: Beginner

Hey you! Have you called your mom recently? She misses you, you know.

Call Your Mom post-it

But you're too busy, you say!

Work has been overwhelming and there's this huge project deadline. The boss is totally on you and you're so exhausted by the time you get back home. How will you ever remember to pick up the phone and give your mom a ring?

Luckily for you, Dexter is here to remind you to "Call Your Mom™" with this simple weekly reminder bot. The bot sends out useful weekly reminders at Sunday 7PM EST to remind their users to pick up their phone and dial dear ol' mum.

Keep reading and learn how you can make a bot to help people stay in touch with their loved one. 💕


Exploring the World of Broadcasts

For this tutorial, let's start outside of the comfort zone of the Editor Tab and venture over to the Broadcasts Tab.

It's definitely possible to create a bot on Dexter where you'll never need to send a broadcast. However, consider adding a well-timed broadcast to provide a more enriching bot experience, by enabling the creator to:

Call Your Mom Bot is a classic example of this last kind of bot and with the new Repeating Broadcasts functionality, it's as simple as setting up one broadcast!

Baby's First Broadcast

The Broadcasts Tab will look pretty bare the first time you reach it on a new bot. Before you're allowed to even send your first notification out, you'll need to deploy a bot to a platform on the Platforms Tab.

Disabled New Broadcast Button

When you've successfully done that, return to the Broadcasts Tab and create a new broadcast by pressing the now-active " + New Broadcast" button.

A new Broadcast canvas should appear, which might look a little something like this (and will definitely look something like this after you've finished this tutorial):

Walkthrough Broadcast Panels

The meat of the broadcast lives in the center panel. For our bot, there are three things we'll need:

A Message in a Broadcast

When drafting a broadcast message, we can leverage all the goodies that come with crafting a typical bot response to a trigger (i.e. shortcodes, directions, even topic and trigger redirects!)

Of course, we can definitely just send a simple text reminder to our users ("Hey you! Call your mom!"), but let's amp things up a bit and build in a feedback flow to see if the user actually followed through.

Broadcast Message

By including a ^buttons() shortcode, the user is prompted to respond if they've actually heeded our reminder.

When this message is sent out, the user will receive a message that looks something like this (exactly like this if deployed on Messenger):

Messenger Message

The user can then choose to respond "Yes" or "No" from the set of quick reply buttons!

We'll have to do just a tad bit more to our botscript now to have those ^buttons() choices trigger appropriate responses, so for that, let's head back to the Editor Tab.

Yes, No, Maybe So

The basic triggers we'll need in this bot script are simple enough: yes, no, and a catch-all, in case users veer off script.

In the spirit of amping things up, let's also keep track of how often the user has committed to calling their mom in a row! We want to reward good behavior after all. We'll keep track of this in a bot variable called calls.

In its simplest form, the bot script will look something like this:

+ yes
- <add calls=1> Good job! You've called your mom <get calls> times in a row. Keep it up. ^image(https://media.giphy.com/media/11mTYesz11OGxW/giphy.gif)
 
+ no
- No?? You're clearly on your phone already, where's your excuse? <set calls=0> ^image(https://media.giphy.com/media/PJeKg31621Wgw/giphy.gif)
 
+ *
- Who was your first best friend? Mom. Give her a call. Have you called your mom yet? ^buttons(Yes, No)

When a user has pressed "Yes", they will increment their calls by 1 using the <add> Rivescript direction. If they've been bad and admitted "No, I have not called my mother", we will reset their calls variable to 0! Additionally, the bot will attempt to shame them through a gif using the ^image() shortcode. 😳

Shame Gif

As always, it's best practice to include a catch-all. Our catch-all here is being used to redirect the user to answer our Yes-No question.

Great, now tap Publish on the Editor tab and we're good to return back to the Broadcasts Tab.

ATTN: Everybody

This is simple enough, we want everyone to call their mothers! If you do want to further segment your audience though, read more in the Segmentation section of our Broadcast guide.

Broadcast Audience

Perhaps you'll want to send a special message to users who have a high streak in the number of calls they've made to mum! 💓

Repeating Broadcasts

Let's get to the core of why we're here. We want to schedule a regular weekly reminder -- also known as a Repeating Broadcast. To do so, scroll to the Timing section and select on a schedule from the "Send broadcast" dropdown.

Broadcast Timing

Hit the Schedule button. You're all set!

The only thing left to do now is message your bot "hello". (After all, your bot needs to know that you exist before it can message you!) Then, we wait for a message to come through on Sunday at 7PM to remind us to call our moms.

Alternatively, you should just call your mom now. She misses you, you know.


Learn more about what else you can do with broadcasts by reading more in our broadcast guide.

If you build anything cool using our broadcast functionality, don't hesitate to alert us through live chat or sending over an email!