Documentation - Khoros Flow
  • Getting started
  • Triggers & Replies
  • Actions
  • Integrations
  • Guides
  • API

›Design How To​s

Guides

  • Overview
  • Learn

    • Beginner guide
    • Advanced guide

    Design How To​s

    • How to use timers
    • How to integrate with Zapier
    • How to increase web widget engagement
    • How to use Conditions
    • How to set parameters using buttons
    • How to send conversational reviews
    • Count sessions per Channel or Widget
    • How to use entities instead of multiple intents
    • How to handle multiple inbound messages
    • How to branch your chatbot
    • How to capture user input
    • How to change the language of your bot
    • How to clear the Flow web widget
    • How to create an Arabic speaking bot
    • How to create and manage multiple chatbots
    • How to create buttons
    • How to duplicate flows
    • How to export and duplicate a project
    • How to handle unknown input
    • How to use string templates
    • How to jump to the middle of a flow
    • How to loop flows
    • How to re-use intents
    • How to reset your password
    • How to schedule and broadcast chatbot messages
    • How to structure flows
    • How to use Business Hours
    • How to use carousels
    • How to use data to create context
    • How to use Quick Replies
    • How to pause a bot
    • How to send and receive files or attachments
    • How to deal with unexpected input
    • How to gather user feedback
    • How to track links
    • How to use WhatsApp click to chat links
    • How to accept payments
    • How to deflect calls to WhatsApp
    • How to delay replies
    • How to engage with customers using SMS
    • How to import contacts
    • How to test your WhatsApp chatbot
    • How to use Messenger m.me links
    • How to do multi-channel design

    Code How To​s

    • Code actions best practices
    • How to trigger channel specific flows
    • How to use math in a bot
    • How to create a location-aware bot
    • Create Parameters with Cloud Code Actions
    • How to use quick replies in code actions
    • How to add a delayed opening to the web widget
    • How to build a chatbot quiz for WhatsApp
    • How to catch API errors within Code actions
    • How to verify user input
    • How to check if an object property is undefined
    • How to create a dynamic opening based on the part of t…
    • How to create a Dynamic URL
    • How to create a Webview
    • Handle images in 3 steps
    • How to retrieve data from a database
    • How to connect with an external database
    • How to route back to the last flow
    • How to route your chatbot based on numeric input
    • How to send a confirmation email
    • How to send chatbot data to a database
    • How to send emails to multiple recipients
    • How to create Google maps images
    • How to use QR codes
    • How to use Javascript Comments in actions
    • How to send emails
    • How to store Parameters
    • How to capture and validate an address
    • How to find your Organization ID
    • How to work with dates
    • How to integrate with Wordpress
    • How to check if the user is on mobile or desktop
    • How to trigger bot events based on the page
    • How to combine functions in Javascript
    • How to set profile attributes

    Handover How To​s

    • Fallback
    • Chatbot Handoff How to nail the bot to human handoff
    • How to pause and resume a bot in Front
    • How to Enable or Disable Push Notification
    • How to hand over to a human agent
    • Send text versus trigger event
    • How to setup handoff with Front
    • THow to trigger flows inside Front

    Other

    • Audience
    • Projects
    • Analytics
    • Data retention

The alternative option

When you are using your chatbot to ask for information and to gather data it might be wise to include an alternative option to avoid a chatbot fail. This is especially useful when the user input should be verified. Common examples where this concept is useful are:

  • Asking and validating an email address
  • Asking and validating a phone number
  • Asking and validating an order number

In this guide we will show you how to make an additional branch that will be triggered when the user provides an invalid e-mail address, phone number, or order number. Some concepts that we’ll be using here are capturing user input and looping flows.

Extract data

In this example, we will ask the user for his or her email address. We do that by using the Any Text trigger and set it to “should be an Email address” in the right pane. You can set the any text to be any of these:

  • Text
  • Date
  • Time
  • Number
  • Email address
  • Phone number
  • URL
  • Distance
  • Money

The left branch will be triggered when, in our example, the any text contains an email address. And that brings us to the alternative option. What if the user does not provide a valid email address.

Extract email address

The Alternative option

When the user doesn’t provide, in our case, a valid email address then the left branch won’t be triggered and the bot will be stuck or fail as it can not proceed. Therefore it’s important to provide an alternative branch.

The alternative branch will be triggered when there is no valid email address to be extracted from the user input. Drag and drop an any text next to your previous any text. Whenever this branch will be triggered you might want to give the user an option to try again or to go back to the menu.

The Altnernative option

Try it out

Make sure to always test your experience. With the example above we can easily do that by using the try it out. We can now see that in the first attempt we don’t provide an email address and the right branch is triggered. We loop back and try again and we provide a valid email address that is recognized. Happy flow-designing!

Try the altnernative option
← How to send and receive files or attachmentsHow to gather user feedback →
  • Extract data
  • The Alternative option
  • Try it out
Docs
Getting StartedBasic conceptsGuides
Platform
StatusSlack community
Resources
Blog
Copyright © 2021 Khoros Flow