Using Quick Replies to branch your chatbot conversations

How do I branch my chatbot conversation?  What is a chatbot decision tree?

Gobot makes branching your bot conversation simple.  To be clear, let's start off by clarifying what we mean by tree branching.  A branched conversation is one that takes a different path depending on how your visitor responds or interacts with your bot.  

To create a branch in your conversation all you need to do is drag the Quick Replies button into your script in bot build mode.  Doing this allows you to present different buttons to your visitor, each button representing a different option, e.g., Yes and No.  For each button you can script a different bot dialogue allowing you to take the conversation in multiple directions depending on which button your visitor clicks.

Note: If you want to present multiple choice options to your visitor without creating a branch to your conversation you should use the Multiple Choice or Picture Choice buttons (not the Quick Replies button).

Example Branched Bot Conversation Using Quick Replies:

As an initial matter, use the Text functionality, as detailed above, to add a question or prompt to your bot script. In this example, let's ask "Are you having a good day?".  Next, use the Quick Replies functionality to present visitors with multiple response choices to follow the question or prompt.

Drag the Quick Replies button from the right-hand panel to the center panel below the text bubble, and the right-hand panel will transition from a tool palette to a panel including a number of choice customization options. First, choose between a text option and image option (presented via a picture carousel).  Shopify users have the additional option of including a product from their store as a choice - see example number 2 here.

You can add as many choices options, e.g., a, b, c, etc., as you like by clicking on "Add Another Choice" or by clicking on the + button in the Quick Reply header in the center panel. Before adding choice (b), however, you need to customize choice (a). First, enter text for your first choice (in this example, "Yes") and use the pull down menu to choose the type of numbering for your choice (letters, numbers, arrows, or none). Next, choose what you want to happen when a visitor chooses this quick replies option. Upon click, the conversation can continue or the visitor can be linked to another url. Alternatively, Gobot can be closed and/or the live chat provider can be activated. In this example, we select Continue conversation. For each quick replies option you create, an additional tab will be added to your quick reply (or a box will appear for each choice if you are in stacked view mode) in the center build panel into which you can drag additional script elements from the right-hand panel tool palette to populate this branch of your bot conversation.  In the image below each box is labeled "Branch choice #1" and "Branch choice #2".  Now that you've created your Quick Replies options, e.g., a, b, c or i, ii, iii, etc., you have effectively created two branches to your conversation.

You can view your quick replies in a tabbed mode or a stacked mode, and you can switch between modes by clicking the stacked and tabbed buttons in the burger menu.  We show you both below.

Tabbed quick reply view mode:

Click the plus button in the quick reply header or the Add Another Quick Reply button in the right hand panel to add another quick reply choice.  Each choice below is shown as a tab.  In tab view mode you can only the see the chat elements in one branch at a time.  To see the chat elements in the No branch all you need to do is click on the Yes tab once.  Clicking the No tab twice opens the right hand editor planel for this branch, which includes additional options including the text for the tab, the choice style, and options as to what happens when a visitor clicks on this quick reply when interacting with your bot.

You can shift to the stacked quick reply view mode by clicking on the burger menu as shown above.  In this view mode you can see the content of each branch at the same time.

For each choice/branch, you can add additional lines to your bot script that are choice/branch specific. For example, assume you've created a quick replies with two answer options labeled "(a) Yes" and "(b) No". You opt for the conversation to continue upon click of both choice (a) and choice (b).

For choice (a), you drag a Text button from the right-hand panel tool palette directly into the choice (a) box in the center panel labeled Branch choice #1. In the right-hand panel you enter "Great! Glad to hear." and click Save, thus creating a branch to your bot conversation that is only triggered when a visitor clicks the "a) Yes" choice. 

For choice (b), you drag a Text button again but this time into the Branch choice #2 and type "Sorry to hear. Good bye!",   Next, you drag the Close bot button tool into choice (b) box labeled Branch choice #2 after the text line you just created.  This tool will either close or minimize your bot after displaying "Sorry to hear.  Good bye!" assuming the No button is selected.

Please note that Gobot allows you to nest Quick Replies within other Quick Replies creating ever finer branches to your bot script. Further, you can opt to switch between branched Quick Replies and (non-branched) Multiple Choice formats by clicking in the right-hand panel on "Change into a Quick Replies" or "Change into a Multiple Choice". If you opt to switch between modes, however, you will be resetting the element and, thus, losing analytics data collected to date for this element. Further, after clicking the "Change to..." option you will need to click Save and then click on the Quick Replies element in the center panel to continue editing this element in the right-hand panel.

You have completed your branched bot.  The bot asks a question, presents two options via quick reply buttons, and then responds differently depending on which quick reply button is clicked by your visitor.

Copyright 2018, Gobot LLC, All rights reserved.

Was this article helpful?

You might also find interest in these related articles:

  1. Effective Use of Jump Buckets
  2. Gobot Message Types - Right Hand Panel