flow diagram bots

Flow Diagram bots allow an administrator to design the logic of a bot by drawing an intuitive diagram.

flow logic

Each box (node) in the diagram is a state, which corresponds to a chatbot message. Given the current box and the user’s response message, one of the outgoing links (edges) is followed, based on the condition assigned to each link.

The conditions are evaluated from top down, until the first satisfying condition is found. If no condition is satisfied, the Default link is followed (top link in above image) if there is one, else the execution stays in the current box, and the same message is displayed to the user.

chat boxes

There are several types of boxes, like Yes/No, Multiple Choice (left box in above figure), Message (right boxes in above figure) and Date-Time, named after the type of user information they are made to capture.

Note that for some boxes (like Message and Flag Condition) no input is expected from the user, that is, the flow moves to the next box immediately.

Each box is backed by an AI Natural Language Understanding (NLU) module that extracts the necessary information. For example, the Date box extract date and time from the user input. Assuming it is 1/7/2019 and the user enters “I can come tomorrow at 10 am” the Date box will extract date=1/8/2019 and time=10:00 am. Hence, if the box has condition “datetime after 1/8/2019 9:00 am” this condition will be matched.

“has any value” condition

A special type of condition is the “has any value” which is satisfied if the system is able to extract the right type of data; for example, as shown below, phone_number has any value, when the user’s message contains a phone number.

advanced features

variables

The user information extracted at a box can be used in subsequent boxes. In the example below, if the user types “my phone is 949-3428289” the next message will be “You entered phone number 949-3428289”.

schedules and flags

Schedule and flags may be assigned to a user whose chat reaches a particular box. For example, in the below figure, when the user receives the message “You want to buy home insurance”, Flag homeinsuranceflag is assigned to the user, as well as schedule pattern wellnessBotDemo. For more information on scheduling chatbots click here and for Flags click here.