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

# How to take a unit out for maintenance from an order

> Reserve the unit on an order line when it needs repair, confirm which orders lose it, and put a replacement unit on the line.

> [card] [Open in TWICE Admin](https://admin.twicecommerce.com/orders)
>
> orders

Reserve the unit on an order line when it needs repair before it goes out, then put another unit on the line, whether the line is a rental, a booking or a sale. [Stock item events](https://www.twicecommerce.com/docs/concepts/inventory/events.md) explains how a reservation takes a unit from the orders holding it.

## Prerequisites

> [!WARNING]
>
> **Required permissions:** `inventory:stock_item_events:create` to reserve the unit, and `orders:order_stock_items` (manage) to put a replacement on the line. Without the first, the panel shows no **Actions** button. All four system roles (Owner, Admin, Manager and Member) hold both. See [Users & Roles](https://www.twicecommerce.com/docs/settings/users-roles.md).

> [!NOTE]
>
> **Have ready before you start:**
>
> * **A title and the reason**, such as Repair and what is broken.
> * **When the unit is back in service**, or that you do not know yet.
> * **A replacement unit** of the same kind, free over the order's dates at its location.

## The walkthrough

**1. Open the order**

Find the order in **Orders** and open it. If your account has more than one location, check the location selector in the top-left corner first, because the table lists only the orders of the location it shows.

![The Orders table with one order's row highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-01.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=5ad37f55effbcd5abfda985212c0f71f)

**2. Open the unit on the line**

On the order's **Summary** tab, find the line and look in its **Fulfillment details** column. Click the code under **Item Code**. The stock item panel opens on the right.

![An order's lines with the Fulfillment details column and a stock item's code under Item Code highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-02.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=770674b2a06bebeaf910ab091e698429)

**3. Choose Create reservation**

Click **Actions** in the top-right corner of the panel and choose **Create reservation**. The **Reserve 1 item** dialog opens.

![The stock item panel with the Actions menu open and Create reservation highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-03.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=d7eca9c6bcb9e65fcd7395fed71901c3)

**4. Name the reservation**

Enter a **Title**, for example Repair, and the reason in **Comment**, for example what is broken. The dialog does not reserve without a title.

![The Reserve 1 item dialog with the Title and Comment fields highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-04.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=3203214cff16ac651289b13ba3f37d5c)

**5. Set when the unit is back**

Leave **Location** and **Start date** as they open: where the unit is held, and now. Set **End date** to when the unit is back in service, or tick **No end date** if you do not know yet.

![The Reserve 1 item dialog with Location, Start date, End date and No end date highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-05.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=34ce1471c77f0e84577a77f013ae99ed)

**6. Reserve the unit**

Click **Reserve** at the bottom of the dialog. A second dialog, **"Existing orders and reservations will be affected"**, lists this order and every other order or reservation that holds the unit over those dates. Each of them loses its hold on the unit.

![The impact dialog with its heading and the order that loses the unit highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-06.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=1be784d5bd0c773f21bce176ae82101e)

**7. Confirm the impact**

Tick **"Please confirm you understand the impact"** under the list, then click **Add reservation**. **1 item reserved** confirms it. The stock item panel stays open and reads **"This unit is no longer reserved for this item over its dates."**

![The impact dialog with the confirmation ticked and the Add reservation button highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-07.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=61a6831b8a58fe02845ef64c9a42ea62)

**8. Pick a replacement unit**

Under **Change stock item**, the reserved unit is still listed first, now **Committed**. Click **Assign** at the left of an **Available** unit's row. That row's button changes to **Switch to →**.

![The stock item panel after the reservation, with the reserved unit Committed and a replacement row reading Switch to →](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-08.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=656e0cdc1035850dc65838b9d8859129)

**9. Save the replacement**

Click **Save** at the bottom of the panel. The panel closes, and the line's **Item Code** shows the replacement's code. The order no longer shows the **Unavailable stock items** banner, and with the default states the line's state reads **Assigned**.

![The order line with the replacement unit's code and the Assigned state highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-take-a-unit-out-for-maintenance-09.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=54121de17a209bf4219a9f05b0f42b8b)

## How do I know it worked?

* **The line shows the replacement's code** under **Item Code** on the order's **Summary** tab, and the order has no **Unavailable stock items** banner.
* **The reservation is on the reserved unit.** Open the unit under **Inventory → Stock items**, and its **Events** tab lists the reservation under your title.
* **Every other order the dialog listed** shows **Unavailable stock items** until you put another unit on it. See [Resolve a stock item conflict](https://www.twicecommerce.com/docs/guides/orders/resolve-stock-item-conflicts.md).

## Troubleshooting / common pitfalls

> [accordion] There is no Actions button, or Create reservation is greyed out
>
> The panel shows **Actions** only to a role with `inventory:stock_item_events:create`. A greyed-out **Create reservation** reads **"Assign a unit to the item first"**, because the line has no unit to reserve. See [Reserve a stock item](https://www.twicecommerce.com/docs/guides/inventory/reserve-a-stock-item.md).

> [accordion] No dialog asked you to confirm, and the line kept its unit
>
> The reservation found room without this order's hold: it ends before the order's dates begin, or the stock item has another unit free. See [Reservation priority](https://www.twicecommerce.com/docs/concepts/inventory/events.md#reservation-priority).

> [accordion] Every other unit is Committed
>
> Nothing else that fits the line is free at the order's location over its dates, so the line stays in conflict. See [Resolve a stock item conflict](https://www.twicecommerce.com/docs/guides/orders/resolve-stock-item-conflicts.md) for what to do next.

## Related articles

> [card] [Stock Item Events](https://www.twicecommerce.com/docs/concepts/inventory/events.md)
>
> How a reservation takes a unit from the orders holding it.

> [card] [Stock Item Conflicts](https://www.twicecommerce.com/docs/concepts/orders/stock-item-conflicts.md)
>
> What an order shows once its unit is reserved away.

> [card] [Reserve a stock item](https://www.twicecommerce.com/docs/guides/inventory/reserve-a-stock-item.md)
>
> Reservations from the unit's own Events tab, and changing or ending one.

> [card] [Swap a stock item](https://www.twicecommerce.com/docs/guides/orders/swap-a-stock-item.md)
>
> Put a different unit on a line without reserving the old one.

> [card] [Run a maintenance programme](https://www.twicecommerce.com/docs/guides/inventory/maintenance-programme.md)
>
> A queue of units due for service, built on attributes and reservations.


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