> ## 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 swap a stock item on an order

> Put a different unit behind an order line: open the line's unit from the order, pick another one under Change stock item, and save.

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

Swap the stock item on an order line when a different unit should go out than the one picked for it, whether the line is a rental, a booking or a sale. Only the unit behind the line changes, and [Auto-fulfillment](https://www.twicecommerce.com/docs/concepts/orders/auto-fulfillment.md) explains how the first one was picked.

## Prerequisites

> [!WARNING]
>
> **Required permissions:** `orders:order_stock_items` (manage) to change the unit on a line. All four system roles (Owner, Admin, Manager and Member) hold it. See [Users & Roles](https://www.twicecommerce.com/docs/settings/users-roles.md).

> [!NOTE]
>
> **Have ready before you start:**
>
> * **The code or name of the unit** you want to hand over, to search for it.
> * **An open order.** A closed order is read-only, so reopen it first. See [Edit an order](https://www.twicecommerce.com/docs/guides/orders/edit-an-order.md).

## 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-swap-a-stock-item-01.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=ddb908c66530a793a642978eef500011)

**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-swap-a-stock-item-02.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=08a7b769571264154d8f0537caa6e5eb)

**3. Find the unit to hand over**

Under **Change stock item**, lower in the panel, the unit on the line is listed first, marked **Current**. Type the code or name of the unit you want in **Search**. Check its **Availability**: a **Committed** unit is held for something else over these dates and cannot be picked.

![The Change stock item card in the stock item panel, with Current, Search and the Availability column highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-swap-a-stock-item-03.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=32388bbc7f2aff3cc59504a6bdccf6b4)

**4. Assign the unit**

Click **Assign** at the left of the unit's row. That row's button changes to **Switch to →**, and nothing is saved yet. A **Pre-assigned** unit can be picked too: saving moves the order that holds it onto another unit.

![The Change stock item list with the picked unit's row reading Switch to →](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-swap-a-stock-item-04.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=c1129b77863457b32d196a69f787a6c4)

**5. Save the swap**

Click **Save** at the bottom of the panel. The panel closes, and the line's **Item Code** shows the new unit's code. With the default states, the line's state reads **Assigned**.

![The order line with the new unit's code and the Assigned state highlighted](https://mintcdn.com/twicecommerce/aIHwB5o92lGv7JVW/images/guide-swap-a-stock-item-05.webp?fit=max\&auto=format\&n=aIHwB5o92lGv7JVW\&q=85\&s=d06b2585372d7560ba1483dc32e5b898)

## How do I know it worked?

* **The line shows the new unit's code** under **Item Code** on the order's **Summary** tab.
* **The new unit is listed first** under **Change stock item** when you open the code again, marked **Current**.
* **The old unit is free again** over the line's dates, for another order to take.

## Troubleshooting / common pitfalls

> [accordion] The line shows + Assign instead of a code
>
> The item's state hides the unit picked for it. Click **+ Assign**, which opens the same panel and list. See [Fulfillment lifecycle](https://www.twicecommerce.com/docs/settings/orders/item-fulfillment-states.md).

> [accordion] Every other unit is Committed
>
> Nothing else that fits the line is free at the order's location over its dates. See [Work out what is available, and why something is not](https://www.twicecommerce.com/docs/guides/inventory/check-availability.md).

> [accordion] The panel stays open after saving a Pre-assigned unit
>
> The order holding that unit had no other unit to move to, so the swap was refused and the list reloaded. Pick an **Available** unit instead. See [Assign and swap stock items](https://www.twicecommerce.com/docs/guides/orders/assign-stock-items.md).

## Related articles

> [card] [Auto-Fulfillment](https://www.twicecommerce.com/docs/concepts/orders/auto-fulfillment.md)
>
> How the first unit is picked for a line.

> [card] [Assign and swap stock items](https://www.twicecommerce.com/docs/guides/orders/assign-stock-items.md)
>
> The candidate list, rule matching and scanning in full.

> [card] [Take a unit out for maintenance](https://www.twicecommerce.com/docs/guides/orders/take-a-unit-out-for-maintenance.md)
>
> Reserve a unit that needs repair and put another one on the order.

> [card] [Resolve a stock item conflict](https://www.twicecommerce.com/docs/guides/orders/resolve-stock-item-conflicts.md)
>
> When the unit on a line has lost its reservation.


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