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

# Actions

> Requests to your own systems

An action is a request DeskHoot sends to your own system, such as "Cancel order". Your team runs it from a conversation, and AutoPilot can run it too, if you allow it.

[**Tools › Actions**](https://app.deskhoot.com/app/integrations?tab=actions) also lists Stripe's actions, once [Stripe](https://docs.deskhoot.com/tools/stripe.md) is connected, and your [forms](https://docs.deskhoot.com/tools/forms.md). This page is about the actions you build yourself, under **Your own**.

> [!NOTE]
>
> An action needs a developer to add an address to your system that does the work. Only admins can make or change actions.

## Make an action

Under **Your own**, select **Add**.

* It is created straight away, switched off. It needs an address before you can **Turn on**.
* Its command follows its name, such as `/cancel-order` for "Cancel order".
* Typing `{{order_id}}` in the request adds it under **What it needs** for you.

> [!WARNING]
>
> **Send test** sends a real request for a made-up customer. Use values that are safe to change.

## The parts of an action

| Part | What it is |
| - | - |
| **When to use it** | Tells AutoPilot when to run it. Your team does not see it. |
| **What it needs** | What the person running it has to fill in, such as an order number: Text, Number, Yes or no, or List, each required or optional. Everything here has to appear in the request. |
| **The request** | GET, POST, PUT, PATCH or DELETE, to an address that starts with `https://`, such as `https://api.yoursite.com/orders/{{order_id}}/cancel`. Customer details, such as their ID, are filled in by DeskHoot. |
| **Headers** | Such as an Authorization header. A saved value is never shown again. |
| **Body** | JSON to send, with the things it needs put in. Not for GET. |
| **The team sees** | **The team sees everything** from the answer, or **Only the fields you pick**. You pick after a test. AutoPilot is told only these fields. The note shows up to 12. |
| Inboxes | **All inboxes**, or only the ones you pick. |

## Who can use it

| For | Choices | Starts on |
| - | - | - |
| **Agents** and **Leaders** | **Can run it**, **Needs approval** or **Off** | Can run it |
| **AutoPilot** | **Off**, **Only inside a procedure** or **Can run it** | Off |

Admins can always run it. See [Approvals](https://docs.deskhoot.com/tools/approvals.md) and [Tools AutoPilot can use](https://docs.deskhoot.com/autopilot/tools.md).

## Run an action

In a conversation, type the action's command, or select it on the **Actions** card in **Conversation details**.

* Selecting **Run** is the confirmation. If it needs approval, the button reads **Ask for approval**.
* A private note is added, marked **Done**, with what was filled in and the answer.

| | Running an action |
| - | - |
| **The customer** | Always the conversation's customer. An action that needs a customer detail does not run for a customer without it, such as a guest. |
| **When your system refuses** | Its message is passed on, such as "Your endpoint answered 409: Order already shipped". |
| **Your system has to** | Answer within 10 seconds, without a redirect. |
| **Record** | Every run adds a line to the activity log, and can send an "Action ran" [webhook](https://docs.deskhoot.com/tools/webhooks.md). |

## With AutoPilot

| Choice | What AutoPilot does |
| - | - |
| **Can run it** | Runs it by itself while answering, without asking the customer first. The note is marked **Done by AutoPilot**. |
| **Only inside a procedure** | Runs it only as a step of a [procedure](https://docs.deskhoot.com/autopilot/procedures.md) that names it. |

AutoPilot runs up to 2 actions in one answer, never repeats one with the same details, and hands off if an action fails. See [Limits in one answer](https://docs.deskhoot.com/autopilot/tools.md#limits-in-one-answer).

> [!WARNING]
>
> With **Can run it**, AutoPilot decides when to run the action from **When to use it**. Write that carefully, and use **Only inside a procedure** for anything that changes money or orders.

## The signing secret

DeskHoot signs every request, so your server can check that it really came from DeskHoot. The secret is shown once. Copy it for your developer. **Replace secret** makes the old one stop working straight away.

## Limits

| Limit | How many |
| - | - |
| **Your own actions** | Up to 50 |
| **Things an action needs** | Up to 12 |
| **Headers** | Up to 10 |
| **Runs** | Up to 30 a minute for each person |

## Delete an action

After **Delete action**, your team and AutoPilot can no longer use it. Notes from past runs stay in their conversations. Procedures that use it stop until you fix them.

## Related

> [card] [Approvals](https://docs.deskhoot.com/tools/approvals.md)
>
> Ask a leader or admin before an action runs.

> [card] [Procedures](https://docs.deskhoot.com/autopilot/procedures.md)
>
> Steps AutoPilot follows for one kind of request.

> [card] [Your own API](https://docs.deskhoot.com/tools/custom-source.md)
>
> Show details from your own system.

> [card] [Forms](https://docs.deskhoot.com/tools/forms.md)
>
> Ask for details in the chat.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.