# Flow in the Bot

## Overview

Start on your journey to becoming a **Gallabox Bot** maestro! This guide will empower you to seamlessly create Bot Flows withing your Bot for your conversational interface.

## What is Flow?

A **Flow** or **Bot Flow** is a sequence of intents and actions that direct the chat bot to complete a task. You can create a Flow inside the bot from [**scratch**](#create-a-flow-from-scratch) or use any template from the Intensive [**Template Library**](#create-a-flow-using-the-template-library) to create a flow in the bot.&#x20;

Let's dive in understand the types of **flows** in Gallabox.

### Message Based Flow

A Message-Based Flow is like a chat conversation with a friend. It's a series of pre-defined messages that guide the chat bot to chat with users and provide information. It's useful for general interactions, answering queries, or engaging in casual conversations.

### Order Based Flow

An Order-Based Flow is a bit more structured. It's like going through a step-by-step process, similar to placing an order online. This flow is handy when you want users to follow a specific sequence of actions, like selecting products, providing details, and completing a transaction. It's a go-to solution for businesses focusing on transactional engagements.&#x20;

{% hint style="success" %}
This flow is automatically triggered when the contact places an order from your Catalogue.
{% endhint %}

### Create a Flow from Scratch

1. Under **My Bots** click on the Bot for which you want to add the bot flows.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2F2HUGRuWpL4EwYvDZ3HC6%2Fbotss.gif?alt=media&#x26;token=774ed3e5-2b83-41ad-a923-79aa97de95bf" alt=""><figcaption></figcaption></figure>

2. Click on "**Add New Flow**" at the top right corner as shown in the GIF below. You will be prompted to provide the **Flow name**, [**Flow type**](#what-is-flow), **Intents** (Keywords). Click on create once you enter the details.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2Fv58UFhuJCR8ZfsdIoY3Q%2FAdd%20a%20Flow.gif?alt=media&#x26;token=6e8cb7ad-66e1-4bf9-b18c-a6bf3c434ed4" alt=""><figcaption></figcaption></figure>

***Great! You created a Flow inside the Bot. You will be redirected to bot builder to create using the Bot Cards/Nodes.***&#x20;

### Create a Flow using the Template Library

1. Go to "**Bot Templates**" from the drop-down option in Bots as shown in the GIF.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2Fvpdw8AdT09vD4I7uL960%2FBot_templates.gif?alt=media&#x26;token=85964d20-7339-4c04-a71b-5d9ab46e8ca2" alt=""><figcaption></figcaption></figure>

2. Choose the **Bot Template** and click on "**Use**" as shown in the GIF. Choose the Bot from the drop-down to add as a flow template under the Bot.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FcKoKOQQ5gw4ejpaC9qtZ%2FChoose%20a%20Template.gif?alt=media&#x26;token=3d0ebfa3-3eee-4d7e-a381-ce6b7fb848f1" alt=""><figcaption></figcaption></figure>

3. Click on "**Go to Flow**" to edit the content as per your company's voice or edit the template using the "**Bot Cards**" which Includes **Send Message**, **Ask Questions**, **Utilities**, **Actions**, and **Connectors**.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FRto1hH4xceet4uNYn3eZ%2FGo%20to%20flow.gif?alt=media&#x26;token=9f673728-d59f-4315-af0e-6cdc8edda312" alt=""><figcaption></figcaption></figure>

### Enable nudge before dropping user off the bot

After a question is asked, if the user doesn't respond, a bot dropout occurs. However, by enabling this feature, we can proactively engage the customer before they are dropped from the bot, thereby recovering potentially lost customers. Here's how to enable this nudge feature:

1. Select the bot for which you want to activate the nudge feature.
2. Click on the "**edit**" icon on the flow.
3. Navigate to "**Custom Configurations**."
4. Locate the option titled "**Nudge contact if question message is unanswered**" and toggle it ON.
5. Specify the following settings:

* **Number of attempts**: The number of times you'd like to nudge the user before considering dropping them from the bot.
* **Delay time**: The duration you want to wait before sending the initial nudge to the user, prompting them to respond.
* **Nudge message**: The message you'd like to send to encourage the user to engage and re-ask the question in a friendly manner.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FHvCzPv0rpyZnDr6gDLXP%2FEnable%20Nudge.gif?alt=media&#x26;token=fd2f128e-680f-477e-b9b3-e40114df9acc" alt=""><figcaption></figcaption></figure>

By following these steps, you can effectively utilize the nudge feature to enhance user engagement and retention within the bot.

Congratulations! You've successfully created a flow within your bot. Dive into the bot builder, explore the variety of Bot Cards and tailor your flows to align with your company's goals. Keep users engaged by employing the [nudge feature](#enable-nudge-before-dropping-user-off-the-bot) strategically, ensuring a smoother and more interactive chat-bot experience.

{% hint style="info" %}
When the Bot  flow limit for the plan you are subscribed to has been reached and you would want more number of Bots in your account, reach out to the support team  on **<support@gallabox.com>**.&#x20;

<img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FGNgFvK1RsZIwy0B7BBAE%2FFlow-%20limit.gif?alt=media&#x26;token=8107186d-3293-4712-879f-6be8a86d1fd4" alt="" data-size="original">
{% endhint %}

### **Actions After Flow Completion**

Toggle this on if you would like the bot can perform some actions upon completion of the flow.&#x20;

To configure this,&#x20;

Click the toggle button for "***What actions should the bot take after the flow completion?***" under Custom Configurations when you create Flow.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FwapMabkdpPwvr87fWuBz%2FAction%20after%20flow%20completion.gif?alt=media&#x26;token=49247e15-4a86-4eed-a840-e624929e9b03" alt=""><figcaption></figcaption></figure>

### **Navigating Within the Flow**

Users are allowed to navigate back and forth within the flow for enhanced interaction. Navigation options within the flow enable users to either return to previous steps for clarification or additional information or proceed forward to continue with the flow and complete desired actions.

To configure this,&#x20;

Click the toggle button for "***Allow users to navigate back and forth within the flow***" under Custom Configurations when you create Flow.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2F18vniaENtwBRtRvjBFuP%2FCircular%20usecase.gif?alt=media&#x26;token=b9d4a697-f9d3-4db6-822b-a7758140b924" alt=""><figcaption></figcaption></figure>

### Related Reads

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden></th><th data-hidden></th></tr></thead><tbody><tr><td><a href="send-card">Send Card</a></td><td></td><td></td></tr><tr><td><a href="ask-questions">Ask Questions</a></td><td></td><td></td></tr><tr><td><a href="set-up-default-bot">Set-up a default Bot</a></td><td></td><td></td></tr></tbody></table>
