How to create an automated flow for a WhatsApp chatbot

Available with a paid pricing plan, as well as during the 7-day free trial

The flow builder is the main tool to set up your bot to welcome new subscribers, assist users, sell products, and notify a manager about users’ questions in the chatbot. Also, a chatbot can gather information and send it to your system for future use.

All you need is to create keywords, design the bot’s structure, and drag-and-drop elements in the SendPulse flow builder.

Below you can find a detailed table of contents. Use it as a map for comfortable navigation to find all of the possible triggers and elements to get started adding them to your bot’s flow.

Choosing a trigger for your flow

By default, there are Welcome message, Standard reply, and Unsubscribe from bot flows. And you can create your own new triggers to get more functionality.

Go to the Bot Structure tab and select a trigger.

Welcome message This flow starts after a user subscribes to your chatbot by /start command or website widget.

This flow introduces your bot to users, so make sure to outline your chatbot's purpose and features and explain how it can help users.

Standard reply This flow starts when a user asks a question that falls outside your bot’s scenario or sends an image to your bot.

You can add a message to let users know that a manager will contact them during business hours.

Unsubscription from the bot This one-message flow starts after a user unsubscribes from your chatbot using the /stop or /unsubscribe command.
Trigger This flow starts when your custom trigger is fired.

To add your own trigger, click Create a new trigger. Select a trigger type: Keyword, or A360 event.

Read more: How to manage chatbot flow triggers.

Catalog Order This flow starts when you receive an order from the product catalog if you have created it in the Facebook Commerce Manager.
Bot greeting This flow starts when a user first interact with your chatbot. This allows you to send a welcome message or prompt further interactions.

Read also: How to set up WhatsApp chatbot flow triggers.

Building Your Flow

It’s important to think about the architecture and logic structure of your bot carefully. A well-designed bot will let users easily get a reply to their questions or place an order successfully by providing the necessary information.

Formulate the bot’s tasks, divide its functions into sections, think of how you will connect the elements, and start creating your bot’s flow using our drag-and-drop builder.

To start setting up a flow, select a trigger, and click Edit flow. If you want to use your own trigger, click Create a flow.

Learn more about chatbot types and development strategies on our blog and YouTube channel. You can also select a ready-made flow template, copy a flow from another bot, or generate a flow using OpenAI.

Let's talk about chatbot builder elements. All elements are optional, so you can stop even at the first message without adding any more elements.

Start

You can choose the first element that launches your flow: Message, Filter, Randomizer, and API Request.

For example, using the Filter and API Request elements, you can check the subscriber's data and personalize your communication by starting your flow only for those users who have or do not have the requested data or branch your flow and send different messages. Using the Randomizer element, you can diversify your chatbot's auto-replies or create an A/B test.

To make an element a start element, connect the desired element to the Start.

To see which trigger starts your flow, click on the Start.

The Message element

You can create regular messages or send template messages. Regular messages can be sent only within 24 hours after the last message is sent by the user, while template messages can be sent anytime.

Regular Messages

Using the Regular message type, you can create a message of any type and add various blocks to it: text, video, mediafiles, user data request, and so on.

For example, you can thank a user for their order, confirm the order, and clarify order details, including your acquired variables data.

Text

Use the Text element to add text.

In the text field, enter up to 2,000 characters of your message text. You can add variables and emoji to personalize your message.

Button

Use the Button element to engage subscribers, set your chatbot scenario direction, add a link, and accept payments.

To add a button, click + Add button, and select a button type: Button, List, or Payment.

The List button opens a list of clickable options. You can add up to 10 items. You can place all the elements in one section or make 10 sections of 1 element each.

Please note that in one Message element, you can add either one list button or up to three regular buttons.

Images

Diversify your messages by using visual content that relates to your text.

Click on the Add button and select the Image element. Select how to add your image (as a file or link). You can also specify a dynamic path to the image link. 

Product

If you have a catalog with products configured in Facebook Commerce Manager, you can add a card or a list of products.

Click Add and select Product. Enter the Catalog ID, Product ID, message body, and footer.

File

Available with the Pro plan and above, as well as during the 7-day free trial

Use the File element to add files of any format, except executable (.exe) files, up to 20 MB in size. Upload tickets, cards, checklists, instructions, or other files.

Click Add, and select the File element. Select how to add your file (as a file or link).

Audio

Available with the Pro plan and above, as well as during the 7-day free trial

Use the Audio element to send audio tracks.

Click Add, and select the Audio element. Select how to add your audio track (as a file or link).

You can also show your audio track as a voice message.

Video

Available with the Pro plan and above, as well as during the 7-day free trial

Use the Video element to send videos.

Click Add, and select the Video element. Select how to add your video (as a file or link).

Waiting for the subscriber's response

Use the Waiting for the subscriber's response element to collect and save subscriber replies to variables.

Turn on the Waiting for the subscriber's response toggle. Select a validation type, type in a message users will receive if they enter invalid data, and select the variable to which you want to save the data.

Moving Elements

By default, each element you add is placed at the end of the Message element you are working on. Hover on the element that you want to move up or down and click on the corresponding button.

Template Message

Using the Template message type, you can send transactional message templates that were approved by Facebook.

Go to the Template tab, and choose a template.

If you added variables to your template, select them from the dropdown menu where suggested. Each user receives a message with a value for their contact from the Audience tab.

If you added an image to your template, select the file from your device.

Continuing the Flow

You can connect the next element after the Message element using the button or the Waiting for subscriber's response function. You can also continue your flow without waiting for the user's response.

You can continue your flow after a button click both in regular and template messages. However, you cannot continue your flow after a link button click in template messages.

Connecting Elements

Drag a line from the blue drop of one element to another element to connect them.

Click on the line twice and you will see a button to remove a connection.

The disconnected elements will be highlighted in yellow, remember that you need to link it to another element.

Elements with empty fields will be highlighted in red, reminding that you need to fill in fields. For example — if you added a button but did not enter text for it or used a link element but did not enter a URL. You cannot save your flow until you fill in these fields.

The Flow element

You can simplify your bot’s structure and move your user to another flow.

To do this, add an element, then choose the Flow element and select the flow you want to link from the drop-down list.

The Flow element will be the last element in this branch of your existing flow. You cannot link it to another element to continue the original flow.

The Action element

Use the Action element to apply certain actions to a contact or its data.  Select the element in the panel on the left and drag it after the block you're tracking. Then select what action you want to create.

The Filter element

Use the Filter element to segment customers based on their personal data and previous messages received. Select the element in the left sidebar, and drag it after the element that will start your script branching.

Then select the condition itself. Combine conditions by adding the operators any or all, or add independent additional conditions.

After adding conditions, add the additional flow elements to each of the Filter element options if the condition is met (green dot) or not met (red dot).

The API Request element

Available with the Pro plan and above, as well as during the 7-day free trial

Use the API Request elemend to create requests to a third party server to create objects or retrieve data. Get data and use it in your chatbot messages.

You can save the received data to a variable or add it to a message as JSONPath.

Drag the API Request element to the workspace, connect it to the element, after which you want to retrieve data. Select the type of request and enter the URL to send the request to.

After testing the request and receiving a successful response, configure the mapping settings.

The Pause element

Use the Pause element to set up the period during which no automatic messages are sent to the subscriber. The pause can be set in minutes, hours, or days.

For example, you can use this option to indicate business hours or promotion hours.

Select the Pause element on the left, and edit it in the opened panel.

Please note: WhatsApp only allows the following message to be sent after user interaction for 24 hours.

The Random choice element

Use the Random choice element to send elements from your chatbot script at random for A/B testing, creating quizzes, and more. You can customize the size of the recipient group for each option and send random information and test different chatbot scenarios.

Drag the item Random choice element to the working area, connect it to the item you start branching the script from.

The Comment element

Use the Comment element to add comments about your flow performance for yourself or your team. Only you and other team members can see this element.

Drag the Comment element from the sidebar, and enter your comment text in the panel on the right. You can add up to 512 characters of text, links, and emoji.

Save and launch your flow

Once you’ve added and linked all the elements, save your flow before exiting. Click Save and send it to yourself to test your flow. Then, click Save and exit.

Make sure to add at least one Message or Action element.

You can view the total number of sent and read messages and clickthroughs in your flow and its messages in the Structure bot tab.

You can also track button clickthrough statistics in flow messages. Click the number on a button to see who clicked it.

    Rate this article about "How to create an automated flow for a WhatsApp chatbot"

    User Rating: 5 / 5 (10)

    Previous

    How to set up WhatsApp chatbot flow triggers

    Next

    How to create a WhatsApp ad via Facebook to start a chatbot conversation

    Popular in Our Blog

    Try creating a chatbot for Facebook Messenger for free