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

# Managing Order Types

> Create, rename, duplicate, test and delete order types.

Order types are managed from **Workflow › Order Type** and from the order type editor.

<Note>
  Required permission:

  * View Order Type
  * Add Order Type
  * Edit Order Type
  * Delete Order Type
</Note>

## Create an order type

Click **New** on the Order Types list.

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Zv-R0yz4NrNyQHzp/images/v4/workflow/order-type/create.png?fit=max&auto=format&n=Zv-R0yz4NrNyQHzp&q=85&s=a49445dba087c458f54a27970894ebcf" alt="New Order Type dialog" width="500" data-path="images/v4/workflow/order-type/create.png" />
</div>

1. **Name**

The order type's name, for example *Pickup and Delivery*. Required.

2. **Code**

A short code used in order numbers, e.g. DO. Required, and unique in your organization: if another order type uses it, the dialog says **This code is already used by another Order Type**.

3. **Description**

Optional notes about what the order type is for.

Click **Create**. The new order type opens in the editor as a **Draft**. Add its fields, statuses and steps as described in [Building an Order Type](/pages/workflow/order-type/building-an-order-type), then click **Save** to make it live.

<Note>
  **New** appears only for a role with **Add Order Type**.
</Note>

## Rename an order type

In the editor, click the pencil icon (**Rename**) beside the tabs.

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Zv-R0yz4NrNyQHzp/images/v4/workflow/order-type/rename.png?fit=max&auto=format&n=Zv-R0yz4NrNyQHzp&q=85&s=c134b1aa9686cf91589448f2bf9d1898" alt="Rename Order Type dialog" width="500" data-path="images/v4/workflow/order-type/rename.png" />
</div>

1. **Name**

Type the new name and click **Save**. Names are unique, so a name another order type already uses is refused. Saving the new name also saves the rest of your changes, the same way the editor's **Save** does.

The code cannot be changed after the order type is created.

## Duplicate or delete an order type

Open the **⋯** menu at the end of a row on the Order Types list.

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Zv-R0yz4NrNyQHzp/images/v4/workflow/order-type/row-menu.png?fit=max&auto=format&n=Zv-R0yz4NrNyQHzp&q=85&s=8497c51c30b8b28cd822a7c902badb01" alt="Order type row menu" width="500" data-path="images/v4/workflow/order-type/row-menu.png" />
</div>

1. **Duplicate**

Creates a copy named after the original with " (copy)" added, for example *Pickup and Delivery (copy)*, with the same fields, statuses and steps and a numbered code, for example *PD2*. The copy opens in the editor as a draft. Secret webhook header values are not copied and must be entered again.

2. **Delete**

Deletes the order type after you confirm. Only an order type without orders can be deleted: for one that has orders, **Delete** is disabled and its tooltip says **This Order Type has orders and cannot be deleted.**

<Note>
  **Duplicate** appears only for a role with **Add Order Type**, and **Delete** only for a role with **Delete Order Type**.
</Note>

## Test an order type

**Test order** in the editor runs the order type on sample values to show which path an order would take. It runs your current draft on the server. **Nothing is saved, no task is created and no call is sent.**

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Zv-R0yz4NrNyQHzp/images/v4/workflow/order-type/test-order.png?fit=max&auto=format&n=Zv-R0yz4NrNyQHzp&q=85&s=833cfd8d24dc6f80e81c89e1dbf4e794" alt="Test order" width="600" data-path="images/v4/workflow/order-type/test-order.png" />
</div>

1. **Testing**

Shows the canvas is in test mode. Click its **×** to exit the test and go back to editing.

2. **Order values**

The order's hub and field values to test with. Required fields are marked.

3. **Answers**

The answers each Create task step would receive, per attempt, for example the *Approval result* of the Approval task. Pick **Approved** or **Rejected** to try both paths.

Click **Run**. The result shows **Finished with status …** or **Stopped at …** with the reason, for example *no rule matched*. The canvas replays the run step by step: use **Play**, **Pause**, **Previous step**, **Next step** and **Show the result**, and change the **Speed**. Each step is marked *done*, *waiting*, *not taken* or *stopped*. **Reset** clears the run.

If the draft has problems, the test says **Fix the problems first** and names them.

## Order type states

| State | Meaning |
| - | - |
| **Draft** | Created but never live. No orders can be created from it yet. |
| **Published** | Live. New orders use it. |
| **Published · draft changes** | Live, with saved changes that are not live yet because they have problems. New orders keep using the live version until the problems are fixed and you save again. |


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