To be clear about that: Flows are Chatbots. With the flow builder, you can create chatbot conversations from scratch. In this article we'd like to give you an introduction on how to build your first chatbot.
Flows are supported in Messenger and the Chatvisor WebChat. The features hereby vary marginally.
1. Getting Started
Flow and clicking the
Add Flow button leads you to the flow builder. Make a good habit in naming your flow, to keep everything organized.
When starting to build a new flow, the
Initial message block is your starting point.
A flow consists of one or more message blocks.
A message block consists of one or more messages/elements.
Initial already has a text element added to it.
2. Adding Buttons
There are two types of buttons available:
A permanent button or link to URL which the user can click today and in the future. Can be added to text and card elements.
- Quick Reply
A temporary button which will dissappear as soon as someone taps it or another message is sent between the parties. The quick reply is always located prominently above the composer. More on quick replies
As mentioned, you can add buttons (up to three) to the text element to trigger further actions. This is what we're doing next.
Buttons can initiate a variety of actions - for this quick tutorial all we want is to create and send the next message block.
To accomplish that:
- Add a button ("+ Button")
- Choose "Send message"
- Since we don't have a second message block yet, create a new one by clicking "+".
- Select the newly created message - should be auto-selected and be named "#1 message".
And here we go - we created and linked the next message block. The "#1 message" block is glowing red, because nothing is happening there.
As long as message blocks are empty and buttons/elements are created but not configured, the respective message block will show red to signal that there's still work to do.
Let's add an element to
#1 message (also renaming would be a good idea), I chose another text element.
Well, with that you created your very first small chatbot! Keep in mind that alternatively to the button we could've used a quick reply as well.
Hint: Flows can also be cloned. On the top right you find the buttons
Copy to(next to
3. Additional Actions
Additional actions add new possibilities to your chatbot. The different additional actions are:
- Add/Remove Label
- Add/Remove Subscription
- Add to Sequence
- Add Custom Field
- Send Flow
In flows, additional actions can be triggered when a user clicks a button or quick reply. To set one up let's go back and edit the button we created in 2. Adding Buttons.
We're going to add a Label "New User" to all users that answer with "Yes" on the question whether they're new to Chatvisor or not.
In the edit button view, choose
Add Action, select
Add Label and create a
New Label using the button, which you name "New User".
Now when a user clicks this flow's "Yes" buttons, the user will be labeled as a "New User".
See also: User Input Element
4. Quick Reply
Next I'd like to show you the configuration of user inputs, but first we create a quick reply button to trigger the user inputs. Therefore head back to
#1 message and create one.
We want to create and trigger a new message block
#2 message, which we create and assign by clicking "+" (like creating regular Buttons). The name/label of the quick reply is "Contact Form".
5. User Input / Custom Field
See also: User Input/Custom Field Element
Through user inputs we can request information from users. It basically is a text field (use the field to make clear what data the user needs to provide) that waits for the user's reply, which then will be stored (as a custom field). After the user replies, the next element/message will be executed.
There are 5 different input types, which are email, phone, (user's current) location, options (single choice through quick replies) or text (for hometown, name, etc.).
As first user input let's start with email. Add a user input, insert text into the text field and click
Configure user input to proceed. Now choose "Email" as type and enter a name in "Store reply to field".
Emails (also phone numbers) can be validated by Chatvisor (check "Validate user input"). When an email seems suspect, a retry message can be triggered, where the user can confirm the correctness.
In Messenger the user's Facebook registration email and shared phone number will be suggested as a quick reply. This means that user only needs to perform one click instead of texting.
Through "Options" you can provide the user with single choice options displayed through quick replies.
By clicking the option the user performs a message containing the option's label. The label will be stored in a custom field. You can use options to gather feedback or to organize a quiz. When setting things up, don't confound
+ Option with
+ Quick Reply.
Hint: You can't have options at end of message and use quick replies. Quick Replies will be dismissed.
For options Additional Actions are also available.