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 (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 949-3428289” the next message will be “You entered phone number 949-3428289”.

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.

schedules, flags and AGENT QUEUE

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.

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

Jump to other bots

You can use the Jump to Another Bot box to continue the flow on another bot.

Process Payments

See how you can process payments in a chatbot.

Customer Relation Management System Integration

We support integration with Zendesk, Hubspot or Salesforce.

Calendar Integration

To have users make appointments without leaving the chatbots, use SmartBot360’s calendar capabilities.



Get name of user and use it in subsequent message.

As shown below, you can use a Save Field or User Profile Field box to collect and save the first name of an end user. For that, you select “User profile field” from the first dropdown, which means that the collected information will be stored in the end user profile. In the second dropdown, you can select one of the existing user profile fields, or create a new one (e.g. ‘patientconcern”).

If you want to store this information in a chatbot field, but not in the end user profile, select “Non-user profile field”. Non-user profile fields are not accessible from other chats of the same user.

Note that Save Field or User Profile Field box should be used to collect user input that does match any of the special entity extraction boxes (Email, Location, Date, Time, Number), as is the case of first name or patient concern mentioned above. For the supported entities, using the special extraction boxes is better, as it allows extracting the entity from a longer user input, for example, extract number “12” from input “I want to buy 12 items” in the case of the Number box.

Create Personality questionnaire

Suppose you want to create a chatbot that asks users 2 questions and based on their answers it displays their personality type.

The questions are: (1) Are you happy? (2) Do you like hiking?

The answers to both questions can be (a) Very much; (b) A little; (c) No, which receive scores 2, 1, 0 respectively. Hence, if a user answers “Very much” to the first question and “No” to the second, the total score would be 2+0=2.

Suppose that if total score is greater than 2, we say that this person is “Optimistic”, if score between 1 and 2 we say this person is “Neutral” and else “Pessimistic”.

Now let’s build the bot!

First, go to create new Flow Diagram bot. Drag a “Scored Questionnaire” box, click on “Add/Edit questions”, and enter your questions and answers as below.

Then, connect three Message boxes as below to form your conditions.

If you want to store the total score of the questionnaire in the user profile, say in field user_qscore1, set the “save as” variable as below:

collect lead information

Suppose you create a bot to ask people to provide their email or phone number to contact them.

Create a new Flow Diagram bot as follows. First, add a Multiple Choice box:

Then connect a Phone and an Email box as follows:

And finally, add confirmation messages. As shown below, you have to copy the “save as” variable name from the Phone box and paste it inside curly braces ({…}) in the Message box, and the same goes for the Email box.

If you want to save the phone number in the user profile (to use in future chats), then you should change both the “save as” variable and the Message box, from Phone2 to user_phone.