> For the complete documentation index, see [llms.txt](https://aibotkit.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aibotkit.gitbook.io/documentation/chatbot-editor/step-4-actions.md).

# ACTIONS

The **ACTIONS** section lets you configure automation features for your chatbot. It contains these sub-sections:

* **Lead Capture** — Collect visitor information through a contact form
* **Human Handover** — Transfer conversations to your support team
* **Email Notifications** — Get notified about new leads and conversations
* **Webhooks** — Connect your chatbot to external services
* **Action Buttons** — Show clickable call-to-action buttons in the chat at the right moment

***

## Lead Capture

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

The **Contact Form** allows you to collect user information directly through the chatbot, making it ideal for **lead generation**. You can customize its behavior and appearance as follows:

**Display Position:** Choose when the form appears:

* **At Start:** The form is shown immediately when the chatbot opens.
* **After First Response:** The form is displayed after the chatbot sends its first message.
* **At End:** The form appears after the conversation ends.

**Form Heading:** Add a custom heading to guide users, e.g., *“We need your details to help you better.”*

**Form Fields:** Select the information you want to collect: **Name**, **Email**, and **Phone Number**.

**Success Messages:**

* **With Name:** Personalized message that includes the user’s name, e.g., *”Thank you for sharing your details with us. How can we help you, {user\_name}?”*
* **Without Name:** Message displayed if the user did not provide their name, e.g., *”Thank you for sharing your details with us. How can we help you?”*

**Consent Message (Optional):** Enable a consent message to inform users before they fill out the form.

This feature ensures you can seamlessly collect leads while maintaining a smooth chatbot experience.

The generated leads will be displayed in the **Conversations** section under the **Leads** tab.

***

## Human Handover

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

Human Handover allows your chatbot to seamlessly transfer conversations to your support team when users need human assistance. Instead of leaving users frustrated, your chatbot can offer multiple ways to reach your team -- via Email, WhatsApp, Instagram, Telegram, or Facebook Messenger.

***

#### How It Works

When a user requests to speak with a human, or when your chatbot determines it cannot help further, the chatbot will:

1. Display a friendly transition message explaining that their request is being forwarded
2. Show channel buttons so the user can choose how to reach your team
3. For **messaging channels** (WhatsApp, Telegram, Instagram, Messenger): clicking the button opens the app directly with a conversation summary pre-filled (where supported)
4. For **Email**: clicking the button shows the contact form to collect the user's details, then sends an email to your support team

***

#### Supported Channels

| Channel   | What Happens on Click                                | Pre-filled Message          |
| --------- | ---------------------------------------------------- | --------------------------- |
| Email     | Opens in-chat contact form, sends email to your team | N/A (form collects details) |
| WhatsApp  | Opens `wa.me` deep link in new tab                   | Yes -- conversation summary |
| Telegram  | Opens `t.me` deep link in new tab                    | Yes -- conversation summary |
| Instagram | Opens `ig.me/m` DM link in new tab                   | No (platform limitation)    |
| Messenger | Opens `m.me` link in new tab                         | No (platform limitation)    |

***

#### Setting Up Human Handover

1. Navigate to **ACTIONS** → **Human Handover**
2. Toggle the feature ON

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

Configure when handover should happen:

* **Instructions**: Tell your chatbot when to trigger handover\
  Example : "Handover to human if you cannot answer the user's question or if the user explicitly asks to speak with a human"
* **Automatic Handover**: Enable this to automatically hand over conversations when the chatbot fails to answer multiple questions in a row

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

Customize the messages that users will see:

* **Transition Message**: This appears when the chatbot decides to hand over the conversation.\
  Example: "I'll forward your query to our human support team so they can better assist you."
* **Confirmation Message**: This appears after the user submits their information.\
  Example: "Thanks! Our team has received your message and will get back to you shortly."

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

#### Configuring Channels

Each channel has its own configuration card. Enable the channels you want and provide the required details:

* **Email**: Enter your support email address. Optionally enable "Send confirmation to user" to send a receipt email. Ensure the Contact Form is set up in **ACTIONS** → **Lead Capture**.
* **WhatsApp**: Enter the support phone number in international format (e.g., +1234567890)
* **Instagram**: Enter your Instagram username (without the @ symbol)
* **Telegram**: Enter your Telegram bot or account username (without the @ symbol)
* **Messenger**: Enter your Facebook Page ID or username

At least one channel must be enabled when the Human Handover feature is turned on.

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

#### What Your Support Team Receives (Email Channel)

When a handover request is submitted via Email, your support team will receive an email containing:

* User's name, email, and phone number (if provided)
* A summary of the conversation
* A direct link to view the full conversation in your dashboard
* The session ID for reference

For messaging channels (WhatsApp, Telegram, Instagram, Messenger), the user contacts your team directly through the platform. The conversation summary is pre-filled in the message where supported.

#### Best Practices

* Enable multiple channels to give users flexibility in how they reach you
* Set clear instructions for when handover should occur
* Use friendly, reassuring messages to make users feel heard
* Enable automatic handover to catch cases where the chatbot gets stuck
* For Email, send confirmation emails to users so they know their request was received
* Regularly review handover requests to improve your chatbot's responses

**Note** — The Human Handover feature is available only for Essential and Business Plan.

***

## Email Notifications

### Lead Form Email Notification

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

If you are on Essential or Business Plan, you have an additional Lead Form Email Notification feature. This feature sends you an instant email notification whenever a user fills out your chatbot's contact form. You'll immediately know when someone has provided their contact information, allowing you to follow up quickly.

#### How It Works

1. A user interacts with your chatbot and fills out the contact form (name, email, phone)
2. As soon as they submit the form, you receive an email notification
3. The email includes all the contact details and the conversation history leading up to the form submission
4. You can click a link in the email to view the full conversation in your dashboard

#### Setting Up Contact Form Email Notifications

1. Navigate to **ACTIONS** → **Email Notifications**
2. Toggle the feature ON
3. Enter the email address where you want to receive notifications
4. Make sure your contact form is enabled in **ACTIONS** → **Lead Capture**

#### What You'll Receive

Each email notification includes:

* **Contact Details**: Name, email, phone number, and consent status
* **Conversation History**: The complete chat conversation that happened before the form was submitted
* **Quick Access**: Direct links to view the conversation in your dashboard

#### Benefits

* Never miss a lead - get notified instantly
* See the full context of how the lead was generated
* Respond faster with all information in one place
* Track which conversations are converting to leads

### Conversation Transcript Emails

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

This feature automatically sends you email transcripts of completed conversations. Instead of manually checking your dashboard, you'll receive a beautifully formatted email with the entire conversation history.

#### How It Works

1. A user has a conversation with your chatbot
2. After the conversation ends, you automatically receive an email within an hour.
3. The email contains the complete conversation transcript in an easy-to-read format
4. Each transcript includes user details, timestamps, and all messages exchanged

#### Setting Up Conversation Transcript Emails

1. Navigate to **ACTIONS** → **Email Notifications**
2. Toggle the feature ON
3. Enter the email address where you want to receive transcripts
4. Save your settings
5. You can optionally use the "Skip Transcript" checkbox. By ticking this checkbox, for a given conversation if you have already received a "Lead Form" mail or "Human Handover" mail notification, then the conversation transcript mail will be skipped.

#### What You'll Receive

Each transcript email includes:

* **Conversation Summary**: User name, date, time, and total number of messages
* **Complete Chat History**: All messages formatted exactly as they appeared in the chat
* **Timestamps**: When each message was sent (in your configured timezone)
* **Quick Access**: A direct link to view the conversation in your dashboard

#### Benefits

* Stay informed about all conversations without logging into your dashboard
* Review conversations at your convenience via email
* Keep a record of important customer interactions
* Share transcripts with your team easily

**Note**: The Conversation Transcript Emails feature is available for Essential and Business plans.

***

## Webhooks

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

#### What are Webhooks?

Webhooks allow you to connect your chatbot to external services and automate workflows. When your chatbot detects a specific situation or user request, it can automatically trigger an action that sends data to your webhook URL, integrates with your CRM, creates support tickets, or performs any other automated task you need.

#### How It Works

1. You create an action with a name and description
2. Your chatbot's AI reads the description and decides when to trigger the action during conversations
3. When triggered, the chatbot collects user information and sends it to your webhook URL
4. Your external service receives the data and can process it (create tickets, update CRM, send notifications, etc.)
5. The user sees a success message confirming the action was completed

#### Setting Up a Webhook

1. Navigate to **ACTIONS** → **Webhooks**
2. Click the "Add Action" button
3. Fill in the action details:

   **Name** (Required):

   * Enter a unique name for your action (e.g., "create\_support\_ticket", "schedule\_appointment", "add\_to\_crm")
   * This name is used internally by the chatbot to identify the action
   * Use lowercase letters and underscores for best results

   **Description** (Required):

   * Describe when and why this action should be triggered
   * Be specific about the situations that should trigger it
   * Examples:
     * "Create a support ticket when the user asks for technical help or reports a bug"
     * "Schedule a demo appointment when the user expresses interest in your product"
     * "Add the user to your CRM when they request pricing information"
   * The chatbot's AI uses this description to decide when to trigger the action

   **Webhook URL** (Required):

   * Enter the endpoint URL where you want to receive the data
   * This is the address of your external service that will process the action
   * Example: `https://your-service.com/api/webhook`
   * Click the "Test" button to verify your webhook URL is working correctly

   **Send Chat Summary** (Optional):

   * Toggle this ON if you want the chatbot to include a summary of the entire conversation
   * This is useful when you need context about what the user discussed
   * The summary includes the user's questions, the chatbot's responses, and any issues that arose

   **Success Message** (Required):

   * Enter the message that users will see after the action completes successfully
   * This reassures users that their request was processed
   * Example: "Your support ticket has been created successfully. Our team will get back to you shortly."
4. Click "Save" to create the action
5. Toggle the action ON/OFF using the switch next to each action

#### Managing Your Actions

**Editing an Action**:

* Click the edit icon (pencil) next to any action
* Modify the details as needed
* Click "Save" to update

**Deleting an Action**:

* Click the delete icon (trash) next to any action
* The action will be removed immediately

**Enabling/Disabling Actions**:

* Use the toggle switch next to each action
* Disabled actions won't be triggered by the chatbot
* This is useful for temporarily pausing an action without deleting it

#### Example Use Cases

**Support Ticket Creation**:

* Name: `create_support_ticket`
* Description: "Create a support ticket when users report bugs, request technical help, or have issues with the product"
* Webhook: Your helpdesk system's API endpoint
* Success Message: "Your support ticket has been created. Ticket ID: \[ID]. Our team will respond within 24 hours."

**Lead Qualification**:

* Name: `qualify_lead`
* Description: "Add user to CRM when they ask about pricing, request a demo, or express interest in purchasing"
* Webhook: Your CRM's webhook endpoint
* Success Message: "Thank you for your interest! A sales representative will contact you soon."

**Appointment Scheduling**:

* Name: `schedule_consultation`
* Description: "Schedule a consultation call when users want to discuss their needs or get personalized advice"
* Webhook: Your scheduling system's API
* Success Message: "Your consultation request has been received. We'll send you available time slots via email."

**Note**: The Webhooks feature is available for Essential and Business plans only.

***

## Action Buttons

**Action Buttons** let your chatbot show clickable buttons — like **View Pricing**, **Book a Demo**, or **Contact Us** — right inside the conversation, at exactly the moment they're relevant. Instead of hoping the AI mentions a link in its text, you decide which buttons appear and when. When a visitor clicks a button, the link opens in a new browser tab.

#### How It Works

1. You create one or more **action groups**. Each group is a set of 1–3 buttons plus a plain-English rule that describes when they should appear.
2. While chatting, the AI watches for that situation. When a visitor's message matches your rule, the chatbot shows that group's buttons under its reply.
3. The visitor taps a button and your chosen page opens in a new tab.

You can create up to **5 action groups** per chatbot.

#### Setting Up Action Buttons

1. Navigate to **ACTIONS** → **Action Buttons**
2. Click **Add action buttons** (top-right)
3. Fill in the group:

   **Action name** — A short name for the group, e.g. *Pricing* (for your reference only; visitors don't see it).

   **Buttons (up to 3)** — Click **Add button** and set, for each:

   * **Button Text** — the label visitors see, e.g. *View Pricing*
   * **Button Link** — the web address it opens, e.g. `https://yoursite.com/pricing`
   * **Icon** — pick an icon from the searchable list, choose **No icon**, or **upload your own** image (SVG, PNG, JPG or WebP, up to 1 MB)

   Saved buttons collapse into a tidy card — click the pencil to edit or the trash icon to remove.

   **When should these buttons appear?** — Describe the trigger in plain English, e.g. *"When the visitor asks about prices or plans."* This field is required.
4. Click **Save**. Use the toggle to turn a group on or off without deleting it.

#### Tips for the trigger condition

* Keep it short and specific: *"When the visitor asks how to get help"* works better than a long paragraph.
* Each group is independent — make conditions distinct so the right buttons show at the right time.
* If no condition matches a message, no buttons appear (that's expected).

#### What Your Visitors See

When the condition matches, the visitor sees your buttons appear directly beneath the chatbot's reply — each with its icon and label. Tapping a button opens your link in a new tab so they don't lose the chat. Buttons show only the icon and text (no extra "open in new tab" symbol) for a clean look.

#### Example

* **Action name:** Pricing
* **Buttons:** *View Pricing* (dollar icon) → `https://yoursite.com/pricing`, *Compare Plans* → `https://yoursite.com/compare`
* **When should these buttons appear?:** *"When the visitor asks about cost, pricing, or plans."*

A visitor types "How much is the Pro plan?" → the chatbot answers and shows the **View Pricing** and **Compare Plans** buttons.

**Note**: The Action Buttons feature is available for Essential and Business plans only.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://aibotkit.gitbook.io/documentation/chatbot-editor/step-4-actions.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.
