Documentation of basic components used within a flow diagram
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 (see above), Multiple Choice, 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 Valid value” condition
A special type of condition is the “has valid 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 (Fields)
The user information extracted at a box can be used in subsequent boxes. In the example below, if the user types “my phone is 800-456-7890” the next message will be “You entered phone number 800-456-7890”.

A special type of variables are the user profile variables. These variables always start with “user_” and access fields (like email or first name) of the profile of the user who is chatting with a chatbot. The following table lists the available user profile variables.
If you try to save a value to a user variable that is not listed in this table (e.g., user_companyname), this variable will automatically be added to the profile of the user.
In the above figure, you may replace “phone1” by “userphone” in both the left pane of the Phone box and the message on the right (that is, use {user_phone}).
A key difference of the user profile variables from the regular variables is that they persist across chatbots for the same user, whereas the regular variables are only valid during the execution of a single chatbot session.
Another special type of variables are business variables. You can think of business variables as global parameters that you can use in your bots and set them from a central location. For example, suppose that in several places in the bot you need to refer to the price of a cleaning service. You can define business variable business_cleaningprice in Automation→Business Variables.
Then, reference this business variable in the bot as shown below. When you change the value of a business variable in Automation→Business Variables, the bot is updated automatically, without having to redeploy it.
Special variables: All chatbots can use the built-in variables CurrentTime and CurrentDate. As shown below, we can display these variables by inserting them into curly brackets within a message box.

The CurrentTime and CurrentDate variables can also be used to compare another variable. In the picture shown below, we prompt the user to enter a date and then use the Field Condition box to compare the user-entered date with the current date. CurrentDate can also be used in the Summation box to set another date variable to say CurrentDate+4 days.

Schedules, Flags and Agent Queue
Schedules (including schedule patterns and schedule flows) 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 health insurance”, Flag healthinsuranceDemo is assigned to the user, as well as schedule pattern KBBotDemo. For more information on scheduling chatbots click here and for Flags click here.

Similarly, at any box, you can place a user in the “Talk to Agent” Queue.