How to Build a Dialog Flow

Bots are an extremely important way to engage with your site visitors. Whether it’s giving them lightning-fast responses to standard queries, booking meetings, or connecting them to live agents. Today’s customer prefers chat-based engagement but also expects 24*7, responsive customer service. Bots are a great way to build this. 

At ChatGen we’ve developed a bot builder that’s highly intuitive and visual — enabling you to build your bot flows in the most seamless way. Here’s how you can do it:


A bot is the best way to qualify and nurture your leads. You need to understand more about a customer’s needs and interests before you schedule a call with your sales team or even get them to a conversation with a live agent. Our ChatGen bot flow allows you to insert the right questions at the right time, enabling you to get all the information you need about the prospect in order to decide the next steps. 

Here’s how you can add a question to your bot flow:

Go to Add New and click on Question

Type the question in the box that appears. 

Click Save to save the question.

If you want to guide your customers to answer the question correctly, Response buttons are a great way to do this. Here’s how:


Customer responses are a great way of qualifying leads and also enabling the conversation to flow in the right direction. You can use both free-text responses and buttons based on how you want to guide the conversation.

Free text responses

This is the default option for questions where you don’t need a specific, unique response from the user. In this option, the user can answer the bot question in a free text format, allowing you to get useful insight into their needs.


Buttons are a great way to handle conversations at scale by directing users to choose between predefined options. Here’s how you go about it:

Adding a Custom Button Response

Add a new button

Add a new button by clicking on the + icon.

Apply triggered actions

  1. The “Proceed to” will take the person to the next node after this message has been shown. For instance, in this case, the user will go directly to the “Schedule Meeting” node. You need to fill this Proceed to for every node that you create so that there is a proper flow in the chatbot. 

  2. The Mark as CQL is a rating that helps you decide how qualified the lead is. You can have a CQL rating for every node in the flow. What this means is that if a user has gone through this particular node, she has a particular rating. The rating will give the agent/sales pipeline an idea of how qualified the lead is.

Add a bot response

The bot response is the automated message you want to send after a user responds to the message. Both Mark as CQL and Bot response are purely optional.

Limit the responses to buttons only

If you want to restrict users to click the button responses instead of typing anything, you can do so by disabling the typing bar for that question.


Click on Save to save all the settings for that question.

Carousel and Ratings

Sometimes, a simple Question format may not be enough. This is especially the case when you’d like the users to go through certain images, or give a rating for a particular product/service/experience. In this case, you can use the following:


A Carousel is a node that can make the information more visually appealing. A carousel allows you to share a set of images along with their title and description that the user can scroll through by swiping or clicking right. Just click on the Add Image button to upload the image.

To add another card, simply click on Add Card to the right.

You can’t leave a card blank — if you don’t want the card, just click on the delete button to the top-right. 

Once you have saved the card, click on Add Button to open up the detailed flow :

Put a Call to Action text on the “Button Text” — for instance, ‘browse more’ or ‘Shop now’, and so on. 

When you click on the Button Type, you get two options:

  1. Open URL

  2. Go to interaction

If you choose “Open URL”, you will have to enter the URL of the webpage where you want to direct the customer.

From here you will have two options: 

  1. Open URL in new tab

  2. Open URL in the pop-up

Choose one based on the kind of customer experience you’re looking to deliver. 


This node allows the user to give a rating.

You need to start by typing the question you want to ask the user. Based on your question, the rating could be for anything — product experience, customer service, and so on. For instance, a sample question could be, “On a scale of 1-10, how would you rate our customer service?”

You can choose the type of rating as well— either stars or emojis. And then under “Select the number of emojis”, choose the total that you would want the rating to be out of  — 3, 5, or 10. And then click “Save”.

With the Rating node as well, just like with previous nodes, you will have the other settings are the same as previous nodes.

Mapping Responses to an Attribute

Attributes refer to the information about a user that we need to capture. Mapping responses to user attributes means you can save details about a user within their contact record. This helps your agents get useful information about your users. It also helps in targeting users through different bot blows or syncing with a CRM.


There are two kinds of attributes to which responses can be mapped:

Mapping ChatGen attributes

ChatGen attributes are standard attributes like Name, Email, and Phone Number which are automatically captured via the respective nodes.

Mapping custom attributes

These are specialized attributes that a company may want to collect about their users. They could be anything — Age, Salary, Gender, etc — that will help the company qualify leads and segment users. To know more about how to create a custom attribute, click here.

While building your bot, you can map custom attributes to different nodes. What this means is that ChatGen will collect a value for a custom attribute, based on user response for a particular node, provided the node is mapped to the attribute. 

So how do we map these attributes?

Step 1: Attribute mapping on the Question node

Once you’ve saved the question, go to the settings on the top right, and go to Attribute Mapping.

Tick the checkbox to map the question to an attribute. You can choose the attribute from a list of attributes from the drop-down.


When the user answers this question (for eg. What is your expected CTC) the response will automatically be saved as a value for the “CTC” attribute.

You can map user response to attribute in Rating and Carousel nodes as well. 

For Carousel, there are multiple cards within the same node. It may so happen that you want each card within the carousel to be mapped to a different node. To do so, go to the card, and click on the button (here Explore), and open the settings:

From here, click on “Set Custom Attribute”.

Check the box and add the attribute which you want this card to be mapped to.

This way, you can even map individual cards within the carousel to different attributes. Building a New Path


We’ve added different kinds of skills to help you with identifying, qualifying, and routing in a seamless manner. Here are some of the skills that you can incorporate within your bot flow: 

Name capture

This is a fairly straight-forward ‘question-type’ node where the goal is to capture the user’s name. 

The node has some in-built parameters which enable it to determine whether the name has been captured successfully. For instance, if the name contains numbers, then it will be an “Unsuccessful capture”.  

Skip the node:

You might have placed the Name Capture node at multiple places in a bot flow. So you may have already captured the Name of a user. If this is the case, to avoid repeating the same question, you simply activate the ‘Skip the node when attribute value is present’ button (shown in the image below).

Email capture

The idea here is to capture the user’s email id.

There are some parameters built into the node to determine whether the email is a valid email — for instance, if there is no @ in the email, it will get marked as an unsuccessful capture and the user will be prompted to enter their email id again.

Phone capture

In this node, we want to capture the user’s phone number. 

Based on in-built parameters, the number may be “Unsuccessful captured”, in which case the user has to enter it again.

By default, the node allows you to capture phone numbers from any country. If you want to restrict this capture to a particular country, you can enter the default country code in the drop-down shown below:

Schedule a meeting

This node allows you to drop an agent’s calendar so that the user can look at free spots and schedule a meeting with the agent. 

You have the choice around whose calendar needs to be dropped you can choose:

  1. Random assigning to any agent

  2. Choose a particular person — if you choose this option, you will get a list of names and you can choose the relevant person. 

  3. From Round Robin within a group — every agent’s calendar will be dropped turn-by-turn. 

For an agent to connect their calendar, they need to go Settings, and then to Calendar, and click on Connect Calendar. 

The agent can connect either Google or Office 365 Calendar. The calendar will then appear in the list of calendars for this “Schedule a meeting” node.


It’s important to have defined goals throughout your bot flow. Upon completion of this goal, you can set up the bot to take certain actions. Let’s take a look at how this works: 

When visitors reach the goal, you can choose to :

  1. Route the conversation to an agent 

This means that the conversation will now be diverted from the chatbot and handled by the agent. You can route either by:

  • Directing it to a specific agent. Choose the name from the drop-down list. 

  • Use the round-robin method, where each agent gets allocated by turn. 

  • Using your existing routing rules, which you can manually add in the setting  

  1. Set up a bot response

When you are routing to an agent, it’s a good idea to check this box and send a closing message from the bot — eg. “You are now being routed to our agent for a live conversation”. 


  1. Mark as CQL

You can also give a certain rating to a lead that accomplishes the goal.

  1. Close the conversation

You can also just close the conversation completely once the user hits this goal. 

Clone a node

I say you need the same node — whether it’s a question or carousel or message— at a different point in the user flow, you can just clone the node. Go to the settings button on the top-right and click clone.

Delete a node

If you want to delete the node, go to settings on the top-right, and click Delete.

Publishing Changes

While all the changes you make in the bot builder get saved automatically, they don’t start showing for your users until you actually publish the changes. 

You can publish changes by clicking on Publish Changes on the top right corner.

Reverting to an Older Version

You can always revert to an older version of your bot, even after you publish the changes. To do so, go to this button (Published *sec ago) on the top-right:

This will show you a list of all the different versions of the bot that have been published. You can view earlier versions, and even restore the one that you need. This way you can always go back to a previous version of the chatbot. 


Once you have built the chatbot flow and installed the script, you can decide which set of visitors get to see the bot flow. You can decide this targeting on several bases such as:

  1. The kind of audience — location, URL, IP address, etc.

  2. The frequency of website visits

To understand how to customize the settings and display your bot to the right users, you can check out this doc.