> ## 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.

# Procedures

> Steps AutoPilot follows for one kind of request

A procedure is the steps AutoPilot follows for one kind of request, such as a refund or a cancelled order.

Open [**AutoPilot › Procedures**](https://app.deskhoot.com/app/ai?tab=procedures) and select **New procedure**, or start from **Templates**. Say when to use it, write the steps, then switch it on.

> [!NOTE]
>
> A new procedure is created straight away, and it is off until you switch it on.

> [!TIP]
>
> AutoPilot reads **When to use** to decide when to start a procedure. "The customer wants to cancel an order they placed. Not for cancelling a subscription." works well.

## Templates

There are four to start from: **Cancel an order**, **Refund a payment**, **Change plan** and **Collect a lead**. Gaps DeskHoot can fill from what you already have, such as Stripe or your lead form, are filled in for you. Fill in the rest, marked **+**.

## Steps and decisions

| In a step | What it does |
| - | - |
| **Plain words** | What AutoPilot should do or say. |
| `@` | Uses a tool: a lookup, one of your actions, a Stripe action, a form, or **Hand off to a person**. |
| `{{` | Puts in a detail about the customer, or whether someone in the conversation's inbox is [available](https://docs.deskhoot.com/conversations/availability.md). |

Steps run in order. A **Decision** has one or more **If** paths and an **Otherwise** path. AutoPilot follows the first **If** that is true, or else **Otherwise**. Each path is set to **Ends here** or **Goes on to the next step**. A path cannot hold another decision.

| Limit | How many |
| - | - |
| **Procedures** | Up to 30 |
| **Steps in a procedure** | Up to 15. A decision counts as one. |
| **If paths in a decision** | Up to 5, plus Otherwise |
| **Steps in a path** | Up to 5 |

## Switch one on

A procedure can be on only when it is complete. If it is not, switching it on says what is missing. It needs:

* **When to use**, and at least one step
* Every gap filled
* Every tool it uses still there, working, and allowed for AutoPilot
* Stripe connected, when a step uses it

> [!WARNING]
>
> A procedure does not give AutoPilot new permissions. Each tool a step uses must already be allowed for AutoPilot on that tool's own page. See [Tools AutoPilot can use](https://docs.deskhoot.com/autopilot/tools.md).

If a tool breaks later, the procedure shows **Needs attention**, and AutoPilot skips it until it is fixed.

While a procedure is on, a change that leaves it incomplete is not saved. Fix it, or switch it off first.

## How AutoPilot uses one

* It starts a procedure when a customer's request matches **When to use**.
* It never mentions procedures or steps to the customer.
* A conversation follows one procedure at a time, until it is done or the customer wants something else.
* A procedure is left out of a conversation where one of its tools cannot work, such as a form in an email conversation, a lookup or Stripe action for a guest, or a tool limited to other inboxes. It still shows **On**.
* A [handoff](https://docs.deskhoot.com/autopilot/handoff.md), or a teammate taking over, ends it.

## Change or delete one

The switch saves at once, and on a procedure's own page it saves your edits with it.

A conversation that is in the middle of a procedure carries on with the steps it started with, also when you change or delete the procedure. If a tool it uses has been turned off since, AutoPilot hands the conversation to your team at that step.

> [!NOTE]
>
> [Try it](https://docs.deskhoot.com/autopilot/try.md#how-it-differs-from-a-real-conversation) does not use procedures. Test one by chatting on a widget that has AutoPilot on.

## Related

> [card] [Tools AutoPilot can use](https://docs.deskhoot.com/autopilot/tools.md)
>
> Lookups, actions, forms and meetings.

> [card] [Actions](https://docs.deskhoot.com/tools/actions.md)
>
> Requests to your own systems.

> [card] [Stripe](https://docs.deskhoot.com/tools/stripe.md)
>
> Refunds, plans and invoices.

> [card] [Instructions](https://docs.deskhoot.com/autopilot/instructions.md)
>
> How AutoPilot should reply.


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