Character Bot

Walkthrough Level: Beginner

People can’t get enough of celebrities these days -- we read the flashy tabloids, watch entertainment TV, and follow our favorite stars on social media. Now, with bots, we can even talk to them! ... or bot-versions of them, at least.

Quite a few character bots have been born on Dexter, including Botline Bling’s Drake and BFF Trump.

In this Character Bot walkthrough, we’ll share how to make a bot for everyone’s favorite Science Guy, Bill Nye!

Bill Nye

With this walkthrough, which you can access through the "Character Bot" theme when you click + New Bot, we’ll be covering different trigger variations we’ve seen used successfully within our bots:

Character bot

Trigger Types

The Catch-All Trigger:

+ *

The first trigger we see is the catch-all (*), which we use to capture all user input that does not match other triggers.

Always add a catch-all to your default! Or else your user might hit our bland default Dexter error message: [Dexter Error] This bot couldn’t figure out how to respond.

As a general rule of thumb, we want to make sure that any catch-all response will help guide the user back to a stream of conversation that your bot can handle. That's why we’ve also included the buttons shortcode after introducing Bill Nye Bot:

We will create three triggers to match the button labels in the shortcode: ^buttons(Is climate change real?, Why do you love science?, Do we only use 10% of our brain?)

The first thing to notice is that all the triggers we’ve created for each of these button labels is and always should be lowercase and punctuation-free.

Stars in Triggers:

+ * 10% * brain

Just like with the catch-all asterisk above, when we use this * wildcard symbol in a trigger, we expect the user input to have text whenever the asterisk symbol appears. This is true for every appearance of the asterisk symbol. That means that this trigger will not be matched when a user that has typed 10% brain, but will match against the following types of user inputs:

Optional Brackets in Triggers:

+ * climate change [is] real

In this trigger, we combine the * concept from above with a new [ ] bracket syntax for optional text. When a trigger includes optional text, the user input may or may not include the text inside the brackets. For example, the trigger will match the following user inputs:

Alternatives in Triggers:

+ why do you (like|love|support|defend|promote) science

For this trigger, we make use of parentheses ( ) and pipes | to introduce the concept of alternatives choices. Here, user input is required to have at least one of the words separated by pipes between the parentheses -- in this case: like, love, support, defend, or promote. The trigger will match any of the following user inputs:

Wildcards with Stars in Triggers

+ [*] science [*]

Now, let’s combine a couple of the concepts we’ve addressed above, namely the [ ] optional brackets and the * wildcard asterisk to create an optional catch-all.

This is a popular paradigm we’ve seen used to handle any user input that contains a specific word or phrase, like the word science as shown in this example. This example trigger will handle user input like:

Getting Into Character

Character bots can be fun ways for brands to engage with customers. They can help provide your brand with a viral marketing boost, improve brand awareness, or even help sell products through the chatbot dialogue. Consider making a character bot for a mascot or character associated with your brand, but don’t forget to create responses that show off your brand’s unique personality!

If you’ve made a unique character bot, whether for a brand initiative or for your own personal enjoyment, send it over to us! We’d love to get to know your bot.