Flow Designs: Use Conditions

One of the most simple but yet powerful features within Flow are conditions. You might know them as if/else statements. With these statements you can create advanced cases in a simple way without coding.

If/Else statements

Conditions, or if/else statements, are very simple, no advanced AI and NLP here. Example if/else statement:

“If you are hungry, then you grab some food, or else you keep designing awesome Flows.”

In the same way you can combine different statements:

"If you are hungry and thirsty, grab some food and something to drink, else keep designing Flows."

You encounter this kind of logic everyday, in human decision making as well as chatbots and can definitely add value to your conversational experience.

How it works

To create condition in Flow, you can drag and drop the condition trigger onto your canvas. To set up the condition, select your condition and add your rules on the right panel. From this panel, you set up your rules and combine rules.

You can create the great conversational experience by incorporating one or more of the following in your conditions:

  1. Parameters
  2. Channel
  3. Tag
  4. User
  5. Business hours

Let’s have a look at how you can incorporate those in your chatbot design.

Conditional content based on answers/parameters

Let's kick it off with conditional use case that is very broad. Within the Flow platform, you can capture and extract user input and store this in a parameter. You'll end up with a parameter that contains the input of the user. With conditions, you adjust your reply based on the parameter that contains user input.

Let's have a look at an example where the intent is "order". At the Flow.ai restaurant you can order food and drinks and we set up the following conditions:

  • If the user orders food, then we ask for a drink
  • If the user orders a drink, then we ask for food
  • If the user order food and a drink, then we proceed to the checkout

Omnichannel support

When you're connecting Flow to multiple channels such as Web, Messenger, WhatsApp and Telegram, you will notice that some of the channels support more components than others. Facebook Messenger and the Web Widget supports Cards and Carousels while these are not support within WhatsApp. With conditions, you can tailor the experience to each of the channels.

Tags for Marketing

Within Flow you can add tags to people which is great for marketing. If a user is interested in women's clothing, simply add a tag. When that user asks for new releases you can directly show relevant content.

Profile Information

If your bot is connected to messaging platform like WhatsApp or Messenger, you will receive profile information that you can use. You can use this information to Create Context (see 3. Profile Information), and you can use conditions to alter the workflow.

In the example below the user did not receive a confirmation email. If the email address of the user is known we can check his latest order and re-send a confirmation email. Else, we ask for the user's email address.

Business Hours

Conditions in combination with Business Hours works great when there is takeover required. If it its within business hours you can follow up with livechat. Else, we create a ticket to follow up the next day.