> For the complete documentation index, see [llms.txt](https://help.orderdesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.orderdesk.com/guided-walkthroughs/rules-and-automations/how-to-add-an-item-to-an-order-with-a-rule.md).

# How to Add an Item to an Order with a Rule

With Order Desk, you can set up a rule to add a new item to an order. This guide walks you through how to create this type of rule. Please note that this will not replace one item with another, but will instead add an additional item to the order. If you need to replace one item with another, see the [**Code Replace**](/guided-walkthroughs/products-and-inventory/how-to-use-code-replace.md) guide for instructions.

### Adding Filters

In the Rule Builder, start by selecting the **Order Rule** rule type:

![](/files/RscWBFvb1G7KH7GzZks4)

For this example, we’ll use the **Order is Imported** event to create a rule that adds a new item when the order is imported. You can choose a different event depending on when you want the item added:

![](/files/w2SOrbNSEfDQcJmrid4R)

Under the **Filters & Actions** tab, click **Add a Filter** to set any conditions that must be met for the rule to run.

![](/files/bCvhplkx9gZzTfYwLJpN)

In this example, we’ll apply a filter that says **If Item Code** is **YT-2400**, run the rule. This means the rule will run on any order that contains the SKU **YT-2400**.

![](/files/jdBlaqEwKjG7N23P0X8e)

**YT-2400** is just an example SKU. For your rule, use the SKU or filters that match your needs. You can also add additional filters if needed.

### Adding Actions

Select **Add an Order Item** as the action:

![](/files/UKFxGXXiPBPHUbasM2DF)

In the empty box below **Add an Order Item**, you’ll need to enter order JSON. Here’s a sample format:

```
{ "name": "XXX", "code": "XXX", "quantity": 1, "price": 2.00 }
```

Copy the JSON above, or use the order\_item section in the [**field name list**](/resources/order-desk-field-names.md) to find the fields you need. Replace the XXX values with your product name and SKU, then paste it into the box:

![](/files/PU6q147oXceGNcgOrNF9)

Name the rule and save it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.orderdesk.com/guided-walkthroughs/rules-and-automations/how-to-add-an-item-to-an-order-with-a-rule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
