How to use Conditional Logic

What is conditional logic? 

Conditional logic allows you to create rules for your customers to meet. These rules can be used to direct customers down different, more relevant parts of your bot's conversation.

How? 

Once you set up a set of conditional logic rules there will be 2 paths created that your customers can go down. The first path is the TRUE path, this is when a customer meets all the requirements of the rules. The second path is the FALSE path, this is the path that your customer will be taken if they don't meet the requirements of your rules.

Why is this useful?

It creates a much more personalised and human experience for your customers. An example would be setting a conditional logic rule to check if a customer's email is known. So If the customer has visited before and you already know their email address they could go down the TRUE path which would let them skip the email address question.

This removes any repetitive questions making customers experience better and increases their chances of completing the conversation.

In this article we cover: 

How to use Conditional Logic

Conditional logic is an object that is set inside the messages section of your bot. To start using conditional logic you need to find the bot you wish to edit, then go to the messages section inside the bot builder.

1

Drag a conditional object onto your canvas and connect it in the conversation.

In this example, I am going to use a conditional logic rule to check if the customer's name is known. If it is known I want to skip the question asking for their name and take them to the next question.



2

The next step is setting the rules for this conditional logic object. So click on the object to edit it and then start creating your conditional logic rules.

In this example, I click to edit the modal, then select the name rule, check that it is set to IS KNOWN and save my changes.

3

Now that you have your rules set you need to connect the different TRUE and FALSE paths and you are done!

In this example, my rule is checking if the customer's name is known. So if the customer's name is known it will render as TRUE so I set that path to skip the name object and go straight to the email object. If the customer's name is not known, it will be rendered as false and will take them to the name object.

Note: Your conditional logic is not seen by the customer, it is only shown in the previews but not the live version.

Available rules for Conditional Logic

We are always working on increasing the rules that can be used in Conditional Logic. Currently you can set rules using the following rules :

  • Custom fields.
  • Visitor attributes data like : (name, email, company, phone, tags, first seen, last seen, whether or not they accepted your privacy)
  • Visitor Context like:( Appointment is booked or not, the current page URL, the referral page, the device they are using, the bot they are engaging with,  the country they are visiting from, the time of the day, the day of the week, or a specific date) 
  • Your team availability for livechat

How Conditional Logic appears in the preview

Conditional logic will never be seen by the customer when it is like on your site. 

However, for testing purposes, we do show you when you reach a conditional logic object in the preview. We show you the different rules that are set and ask you to make a choice of whether you want to go down the TRUE or FALSE path.

Using custom fields with Conditional Logic

When a customer answers a question in your bot's conversation, you can store that answer in a custom field. This custom field can then be used to set a conditional logic rule.

In this example, I am going to use a conditional logic rule to check if the customer's answered yes to an earlier multiple choice question.

When to use Match all these rules or Match any of these rules

You are able to set multiple rules for one conditional logic object. You have a choice on how you want the logic to be determined as TRUE or FALSE. 

Match all these rules

This option means that all of the rules that are set in your conditional logic object will need to be true in order for the customer to be taken down the TRUE path.

Match any of these rules

This option means that you can set multiple different rules but as long as one requirement is matched then the customer will be taken down the TRUE path.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.