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

# Actions – Custom External Actions

> Learn how to configure Custom External Actions so your agents can call your own APIs during a live conversation.

**Actions** let your agent perform special behavior during a call.

This guide focuses on **Custom External Actions** (also called **Custom Input**), which allow your agent to call **your own APIs** in the middle of a conversation.

Use Custom External Actions when you want your agent to:

* Look up data in your systems (for example, a CRM or internal database)
* Create or update records (for example, a lead, ticket, or order)
* Trigger workflows in external tools

Other phone actions (End Conversation, Transfer Calls, DTMF, Warm Transfer) are available under **Phone Actions**, but are not covered here.

On this page:

* [Where to find Custom External Actions](#where-to-find-custom-external-actions)
* [Create a Custom External Action](#create-a-custom-external-action)
* [Configure the external request](#configure-the-external-request)
* [Define the Input Schema](#define-the-input-schema)
* [How the agent triggers the action](#how-the-agent-triggers-the-action)
* [How this differs from Webhooks](#how-this-differs-from-webhooks)
* [Where to go next](#where-to-go-next)

***

## Where to find Custom External Actions

1. In the left-hand sidebar, click **Actions**.
2. At the top of the page, switch to the **Custom External Actions** tab.

You’ll see a table listing your custom actions, typically with columns like:

* **Name**
* **Description**
* **Action Trigger**
* **Phone Number** (where applicable)
* **ID**

This list is empty until you create your first action.

To create one, click **Create Action**.

***

## Create a Custom External Action

When you click **Create Action**, you first choose the type of action.

1. In the **Create a new action** dialog, select **Custom Input**.

   * This is the type used for Custom External Actions.
   * Other options like End Conversation, Transfer Calls, DTMF, and Warm Transfer are for phone-only behaviors.

2. Click **Continue** to open the configuration form for your custom external action.

You’ll now define:

* Basic information (name, description)
* The **URL** to call
* What the agent says before/after the call
* The **Input Schema** (what data to collect from the caller)

***

## Configure the external request

In the configuration form for your Custom External Action, you’ll see fields similar to:

* **Action Name** – A human‑friendly name for the action.
  * Example: `Create CRM lead`, `Check account status`.
* **Description** – A short explanation of what this action does.
* **URL** – The endpoint your agent will call.
  * This should be a URL you control (for example, an API in your backend or an integration endpoint).
  * Fluents.ai sends an HTTP **POST** request with a JSON body to this URL.
* **Speak on Send** – What the agent says **before** calling your API.
  * Example: `Let me check your account details.`
* **Speak on Receive** – What the agent says **after** your API responds.
  * Example: `Okay, I’ve retrieved your information.`

The **Processing model** for Custom External Actions is currently **Muted**:

* While the external request is being processed, the agent pauses and does not speak.
* When the response returns and is processed, the agent resumes the conversation.

The exact HTTP request and response format is designed to be handled by your backend; the agent/LLM interprets the JSON response and uses it in conversation based on your prompt and schema.

***

## Define the Input Schema

The **Input Schema** describes which pieces of information the agent must collect before it calls your external endpoint.

It is based on OpenAI-style function calling but is editable directly in the UI. You do **not** need to write JSON manually; you use the interface to define:

* Properties (fields)
* Types
* Whether fields are required

Typical configuration:

* Add properties such as:
  * `first_name` (string)
  * `email` (string)
  * `issue` (string)
  * `customer_id` (string or number)
* Mark properties as **required** or **optional**.
* Add **descriptions** for each field to guide the agent:
  * Example: `The customer’s email address`, `Brief description of the customer’s issue`.

During the call:

1. The agent uses its prompt and the Input Schema to ask the caller for the required information.
2. Once all **required** fields are collected, the Custom External Action is triggered automatically:
   * Fluents.ai sends a POST request to your URL with a JSON body that matches your schema.
3. The agent waits for the response (muted), then resumes the conversation using the returned data.

Because Custom External Actions are **function-based**, there is no fixed phrase trigger.\
The agent decides **when** to call the action based on:

* Your input schema, and
* How you instruct it in the agent’s prompt (for example: “When you have the customer’s email and issue, call the `create_support_ticket` action.”)

***

## How the agent triggers the action

Custom External Actions are **function-based**:

* You define them once in **Actions → Custom External Actions**.
* They become available to agents as tools the LLM can call.
* You control *when* and *why* they are used through your **agent prompt** and Input Schema descriptions.

In your agent prompt, you might write instructions like:

* `When the caller wants to book an appointment, use the appointment scheduling action once you have their name and preferred time.`
* `If the caller is asking about account status, call the account lookup action after collecting their email or account ID.`

The LLM will:

1. Guide the conversation to collect the required schema fields.
2. Trigger the external action when conditions are met.
3. Use the JSON response to continue the conversation (for example, confirming a booking or reading back status).

***

## How this differs from Webhooks

Both Custom External Actions and **Webhooks** send data to URLs you control, but they serve different purposes:

* **Custom External Actions**

  * Called **during** a live conversation.
  * Let the agent ask follow-up questions, collect data, call your API, and then continue speaking based on the response.
  * Are function-based and tightly integrated with the agent’s prompt and Input Schema.

* **Webhooks**
  * Typically called **after** events (like call completed, call started, etc.).
  * Are better suited for asynchronous processing, logging, or triggering external workflows that don’t require the agent to wait and respond immediately.

Use **Custom External Actions** when the conversation itself must react to your API result.\
Use **Webhooks** when you just need to notify external systems about events.

See the **[Webhooks Feature Guide](./webhook)** for more on webhooks.

***

## Where to go next

* Design which data your agents should collect and how they should use external systems in the\
  **[Agents – Advanced Settings](../concepts/agent/advanced)** and **[Agents – Post-Call Actions](../concepts/agent/post-call)** guides.

* Learn how to configure webhooks and event-driven integrations in the\
  **[Webhooks Feature Guide](./webhook)**.

* Manage environment API keys and credentials for your backend in\
  **[Get API key](./account/get-api-key)** and **[Providers](./providers)**.
