# Configuring Chatbot Scenarios

The inputs of users are varying, but certain inputs, such as those which the chatbot cannot provide an answer to, or those that may be offensive, can be configured to give a pre-defined response. This is done through the use of AI, which analyses the input to understand its intent, and responds back with the correct pre-defined response. \
\
Additionally, for better organization, you can have different flows. Utilizing the power of artificial intelligence, we can use flow redirection to analyze the users input, and then redirect them to the appropriate flow at any time.

### Steps for Setup of Dynamic Chatflow Configuration:

1. **Create Your Bots**

* Begin by creating your chatbots. Once you've completed this step, proceed to the next.

2. **Chatbot Settings**

* Navigate to the "AI settings" .

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FRRuzoRmRuIFXy9pjZ7QT%2Fimage.png?alt=media&#x26;token=70d5a239-f62b-4753-a28d-0cec2a9419ea" alt=""><figcaption></figcaption></figure>

3. **Configure Bot's Personality**

* Access "AI Settings" based on the type of chatbot you're setting up:
* Go to Configure Bot's personality
* Toggle off "Let AI Manage bot's personality as needed option" to create your own AI persona

4. Disable the toggle “Let AI Manage bot's personality as needed”, as we need to customize the responses of our chatbot to certain intents. Then, go to “**Create Persona**”.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FEnPBJhXpgL29GTpcuwp0%2Fimage.png?alt=media&#x26;token=a3a32ef7-1d27-4523-975a-dbcf2c04e613" alt=""><figcaption></figcaption></figure>

5. Upon reaching the main screen here, go to “**Chat Scenarios**”.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FFi5GE6YY5cHLl9bDsIX7%2Fimage.png?alt=media&#x26;token=2fbe8e76-5e17-401c-8369-9a5058c55615" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you are configuring the bot for the first time, then the above fields (Persona Details, Communication Style) also need to be filled for the redirection to work.
{% endhint %}

6. Click on the “**Add-Action button**” to proceed to the configuration of the chatbot.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FIBneq4NtNd4AiSWtbDW0%2Fimage.png?alt=media&#x26;token=2f428c55-33a4-4305-8ba2-12f597a5e846" alt=""><figcaption></figcaption></figure>

7. Complete the form with the relevant details for the bot. The fields to fill are as follows:
   1. **Name**: Specify the name of the chat. This name will be the primary description of the trigger. E.g.: “Flowers” for redirection to flowers chat
   2. **Trigger**: Define the action to be executed when the specified condition is met. Options include triggering a specific message or an entire chat flow.
      1. **Message**: Enter the message to be displayed in the chat.
      2. **Flow**: Select the chat flow to be triggered.
   3. Based on the previous Trigger input:
      1. **Message**: Enter the message that is to be displayed when triggered. Eg. If the message is offensive, the response message can be "I am not quite used to this language".
      2. **Flow**: Select the flow onto which the chat should be redirected to.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FrwixSwDzxZRv3ACnOhvU%2Fimage.png?alt=media&#x26;token=0277fae4-cb39-4353-ad82-62b71d4bf519" alt=""><figcaption></figcaption></figure>

8. Click on “**Add Intent**” to finish setup.

{% hint style="info" %}
Remember to toggle on the button to enable the message/flow redirection.
{% endhint %}

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FZMtBHUlZVH2FckJVGHnJ%2Fimage.png?alt=media&#x26;token=e0cd1380-795d-4765-8aa2-04efffd676c0" alt=""><figcaption></figcaption></figure>

#### Still Not Working? Let's Troubleshoot

If the chat is not responding as expected, consider the following troubleshooting steps:

1. **Verify Triggers and Conditions**: Ensure that the trigger conditions are correctly set and aligned with the intended message types or user inputs.
2. **Check Message and Flow Settings**: Confirm that the correct message or chat flow is selected and configured properly.

If everything is correct and you are still unable to move forward, write to us at <support@botpenguin.com>. We will respond back within 48 business hours.
