# Creating a Chatbot

We recommend creating a chatbot with Dialogflow integration as IS-Messenger has extensive integration with Dialogflow that caters to various use cases.

![](/files/wXFFHsMCRwAuVHNME3CK)

The following image shows an example of how Dialogflow can be used to automate specific responses.

<figure><img src="/files/A59wPPtu2JS5oSOaYHvy" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To help you better understand the integration between DialogFlow and IS-Messenger, you may read the following blog post:\
\- How To Build a Chatbot with Dialogflow\
\- How To Use IS-Messenger As a Dialogflow CRM
{% endhint %}

## Connecting to Dialogflow

Follow the guide below to connect to Dialogflow

## Creating a basic intent

For this guide, we will create a basic intent that enables chatbot to answer enquiries regarding operating hours.&#x20;

**Step 1: Create Intent**\
Navigate to the [Dialogflow](https://dialogflow.cloud.google.com/) console and press **Intents** from the side navigation menu. Press the :heavy\_plus\_sign:or **CREATE INTENT** from the top of the module

![](/files/TomPtW8LhUy6FDNaNXKL)

**Step 2: Name your Intent**\
Enter a name for your intent. Your intent name should represent the end-user expressions it recognizes. For example, `operating_hours_enquiry`

\
**Step 3: Include Training Phrases**\
Training phrases are the phrases that will trigger the specific intent and the expected behaviour.&#x20;

You can compile the most commonly asked questions in regards to operating hours and include the list as training phrases.&#x20;

For example,

> *what are your operating hours*\
> *what time do you close*\
> *are you open on sundays*\
> *which day do you close*\
> *are you open on the weekends*\
> *what time do you open*\
> *what time do you clos*

![](/files/xWdIfPKIP8Tm8uH0jjHg)

**Step 4: Build Intent Response**\
Scroll down to the **Responses** section and type in the response. Add a **Text Response**

{% hint style="info" %}
**Tips**:&#x20;

* You can send multiple responses at one time for better readability.
* You may add a few variants of response and it will be randomised when sending it to a contact.&#x20;
  {% endhint %}

The response we will build for this intent is :

> Our operating hours are Monday to Saturday, 10am to 10pm. We are closed on Sundays and Public Holidays. Let us know if you require further assistance.

![](/files/k9iAoMsuE27gFTuSbhjb)

**Step 5: Test it out**\
You can test it with the testing panel located at the right side of Dialogflow or test it with the connected channels.

## What's Next?

Now that you know how to create an intent. Enhance it with more use cases specific to your company.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.is-messenger.com/ismessenger/getting-started/creating-a-chatbot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
