> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatref.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Actions

> Make your bot do things, not just answer – with forms, buttons, and API calls it fires on its own.

Custom Actions turn your bot from a question-answerer into a doer. You give the
bot a few tools – like a contact form or a "Start my return" button – and during
a chat it decides on its own when to use them. You don't script the conversation;
you describe each action and let the AI pick the right moment.

## How an action works

You create an action with two key things:

* A **name** – what the action is, e.g. "Open a support ticket".
* A **description** – a plain-English note that says *when to use it*, e.g.
  "Use this to collect a support request."

At chat time, the AI reads that description and fires the action when a visitor's
message matches it. A travel agency might add a "Request a quote" form; the bot
shows it the moment a visitor asks about pricing.

<Tip>
  The **description** is what tells the AI when to use the action. Write it clearly
  and start with "Use this to…" – for example, "Use this to collect a support
  request." A vague description means the bot fires the action at the wrong time,
  or never.
</Tip>

## The three action types

There are exactly three kinds of action you can build.

<CardGroup cols={2}>
  <Card title="Form action" icon="rectangle-list" href="/custom-actions/form-actions">
    The bot shows a form inside the chat. The visitor fills it in – name, email,
    a message – and submits without leaving the conversation.
  </Card>

  <Card title="Button action" icon="square-mouse-pointer" href="/custom-actions/button-actions">
    The bot shows a clickable button in the chat, like "Start my return". One tap
    triggers the action.
  </Card>

  <Card title="API / Webhook action" icon="webhook" href="/custom-actions/api-webhook-actions">
    The bot calls your own API in the middle of a chat – no visitor form – and
    uses the answer to keep replying.
  </Card>
</CardGroup>

Forms and buttons appear right inside the chat for the visitor to use. An
API / Webhook action runs quietly in the background.

## Where actions live

Open an agent's dashboard and go to the **Actions** tab. From there you can
create an action, edit it, turn it on or off, or delete it. Each action can be
a Form, a Button, or an API / Webhook.

## Seeing what your bot did

Every time an action runs – a form is submitted, a button is clicked, or your API
is called – Chatref records it in the **Action Submissions** table on the
**Actions** tab. Each row has five columns: **Submitted At**, **Action**,
**Status**, **Completed At**, and **Details**.

The **Status** tells you how the call went:

| Status       | What it means                             |
| ------------ | ----------------------------------------- |
| **PENDING**  | Recorded, waiting to reach your webhook   |
| **SUCCESS**  | Your endpoint received it and replied OK  |
| **FAILED**   | The call to your endpoint did not succeed |
| **RETRYING** | Chatref is trying again after a failure   |

Open **Details** on any row to see the data that was submitted, your webhook's
response, and the retry count.

<Note>
  Booking a meeting or scheduling a call is not a built-in tool. You build it
  yourself with a **Form action** (collect the visitor's preferred time and
  details) or an **API / Webhook action** (call your own calendar system).
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Form action" icon="rectangle-list" href="/custom-actions/form-actions">
    Collect details from visitors inside the chat.
  </Card>

  <Card title="Button action" icon="square-mouse-pointer" href="/custom-actions/button-actions">
    Add a one-tap button the bot can show.
  </Card>

  <Card title="API / Webhook action" icon="webhook" href="/custom-actions/api-webhook-actions">
    Let the bot call your own API mid-chat.
  </Card>

  <Card title="Inbox" icon="inbox" href="/inbox/conversations">
    Read the chats where your actions ran.
  </Card>
</CardGroup>
