What to do if users don’t click buttons in your Manychat flows

How to understand user input and progress users through your Manychat flows

Josh Barkin
Being Janis
Published in
8 min readOct 7, 2019

--

So you’ve created the perfect lead generation funnel for Messenger, hook you lead with a Facebook ad, and your lead does the unthinkable — Instead of clicking a button to answer your automated question, they input a text message and everything doesn’t go according to plan.

To maximize ROI on your ad spend, you’ll want to give users the choice of clicking buttons so that you can guide them through your funnel, or accept text input as responses to your questions.

Dialogflow is conversational AI from Google that connects to Manychat in a few simple steps using Janis.ai.

With Dialogflow connected to Manychat, a user can send a message without explicitly typing the word Yes, or No. They might type I’m interested which would mean YES, or they might type something like Forget it which means NO.

Rather than trying to list out all of the things users might say to mean yes or no in your flow, you can use Dialogflow and trigger Manychat tags, then just check if a Yes or No tag was added to the user in order to advance them to the next step in the flow.

I’m going to show you how to set this up, but we’ve already added these flows into the Janis AI Starter Kit which you can add to your Manychat bot right now if you have not done so already.

Add Tags

Go to your Settings in Manychat and add three tags. Add a Smartwords tag and add a Yes tag and a No tag. You might create other tags to mean different things, but for this tutorial, we’re just going to focus on understanding a Yes or No response, so we just need those tags.

Capturing User Input with a Multiple Choice Reply Type

The Multiple Choice Reply Type enables users to click both buttons or type a response. For each step, where you request a response from the user, you can use a user input card with a Multiple Choice user input card and check the box to Also allow free text input. This way your users can click your quick reply buttons, or send you a message. You won’t want to save the response to a Custom Field, because we’ll want the input processed by Dialogflow.

Create a flow for your Smartwords dynamic request

Create a flow to send the request to Dialogflow after user input is provided. For the starting step, you’ll want to add the Smartwords tag. For the next step you’ll need to make an external request to Dialogflow. You can copy the what you’re using in your Default Reply, but you can see how we added a Fallback here with a text card.

The reason we add that extra Fallback step is because sometimes Manychat’s API is slow to respond and that will give Manychat more time to process a dynamic request if the API fails, without the user seeing a message from your bot. The card appears blank, but you can add spaces using your spacebar and put a delay step first in the card and set that to anywhere between 5 and 10 seconds.

For your External Request, you can paste your Janis link into the form as you have it in your Default Reply, and then click the body tab and Add Full Subscriber Data. You can click to test the request and your status should be 200, meaning you’re communicating with Janis.

Setting Up Dialogflow

If you use the AI Starter Kit from Janis, then Janis will install these Smartwords Intents to Dialogflow for you. One is an Intent that will mean yes (smartwords.yes) and the other is an Intent that will mean no (smartwords.no).

In the smartwords.no Intent, I’ve added a list of things that users might say to mean “No”.

In my smartwords.yes intent, I’ve created a list of things users might say to mean “Yes”.

You don’t need to add a response to either Dialogflow intent. We just want the user’s message to trigger one of our two intents so we can tag the user in Manychat. To trigger a tag, we need to do two things. We’ll need to add our Smartwords tag from Manychat into the input context field of the Intent.
Dialogflow will automatically add an output context, but you’ll want to remove that, and click the X in the circle just beside the word Smartwords in the output context field. Instead, put your No tag from Manychat into the output context field.

Click the number too just to the left and change that from 5 to 1. This is the lifespan of the context, and since the user is only answering one question, we want the context to only have a lifespan of 1.

Now you’ll want to do the same thing for your “Yes” intent. Add the Smartwords tag to the input context and add the Yes tag from Manychat to the output context.

You can create other Smart Words Intents too. Just make sure to have tags in Manychat first so that in your Dialogflow Intents, you can add the Smartwords tag to the input context and add tags that represent your desired response (i.e. No, Yes, etc.) to your output context.

How it works

Now that we are capturing user input, sending the user input to Dialogflow, then we need to check to see that the user triggered one of our Dialogflow Intents. If they trigger the Yes, or No Dialogflow Intents with the Smartwords tag added to the input context of an intent, then Janis will automatically tag the user in Manychat. We can check to see if the tag was added (because they triggered the intent) and if it was give them the next step in the flow. You can see how all of the heavy-lifting is done by Dialogflow, keeping your flows clean and manageable.

Create a flow to remove the tags

You're going to want to remove tags from the user so that you can run the process again, whether it’s another question in the same flow, or some other flow you trigger in the future. Create a separate flow and in that flow you just need an Actions step that will remove the tags from the user. Once we give the user a response to their Intent message, we can automatically continue to this flow. From there we can continue to another question, or perhaps the user reaches the end of your flow without a need to continue on to another question. Either way, you’re now ready for another Smartwords situation!

Alternative Setup

If you already have flows set up and you just want to enhance them with Smartwords, or you just don’t want to ask users questions with a Multiple Choice Reply Type, you can just use standard buttons for your question, and just below your buttons, include a User Input step with a Text Reply Type . You’ll see here that there is no text in the user input block, because we just used our spacebar to add spaces so that we can capture user input while the user will only see the question with the buttons.

The great thing about Smartwords is that there is more than one way to set it up. As long as you have the following it will work:

✅ A step to capture user input

✅ Ensure you’ve tagged the user (i.e Smartwords) before sending your request to Dialogflow, so that you can trigger Intents with context in the input context of the Intent (Yes, or No, for example, can be responses to different things, so with the tag added to the Dialogflow Intent, you’ll have the context of their response).

Tags added to the output context of a Dialogflow Intent so that if the user triggers a Dialogflow Intent, you’ll automatically tag them in Manychat and the tags become actionable in your Manychat flow.

Conditions that check to see if the tag was added because the user triggered the Dialogflow Intent.

✅ A flow with an Actions step to clear the tags after the user is tagged and so that you can run the process again either for the next step in your flow, or for other flows. Removing the tags resets the process so consider using tags that you don’t mind adding and removing from the user at any time.

Let’s try it out!

With our flows, rules, and Dialogflow intents set up, preview the flow and send a message and see what happens.

Send a message to try and trigger your Yes intent and your No intent. You can see here that I replied with “Sounds good” and since that phrase is in my Yes Intent in Dialogflow, it tagged the user with Yes in Manychat and gave me the corresponding next step!

If you don’t have the AI Starter Kit from Janis, then install that now to get both the Dialogflow and Manychat templates for Smartwords.

🤖 Need an easy way to connect Dialogflow to Manychat?

👉 https://www.janis.ai

🤖 Training Dialogflow NLP takes time. Need a Dialogflow template?

👉 https://janis.ai/dialogflow-templates/

🤖 Learn more how to build chatbots with Manychat and Dialogflow

👉 https://janis.ai/manychat

--

--

Josh Barkin
Being Janis

Building conversational AI platforms since 2016