How to Add an Item to an Order with a Rule
With Order Desk, you can set up a rule that can add a new item to an order. This guide will walk you through the steps to create this type of rule. Please note that this rule will not replace one item with another but will instead add an additional item to an order. If you would like to replace one item with another, refer to the Code Replace guide for instructions.
IN THIS GUIDE
Adding Filters
In the Rule Builder, start by selecting the Order Rule rule type:
For this example, we will use the Order is Imported event to create a rule that will add a new item when the order is imported, but you can choose any event depending on when you want an item added to an order:
Under the Filters & Actions tab, to set up any requirements that must be met for the rule to be used, click Add a Filter.
In our example, we'll apply a filter that states If Item Code is YT-2400, run the rule. This means the rule will run on any order that has the SKU YT-2400 in it.
YT-2400 is an example SKU. For your rule, add the filter or SKU you need for this rule to work, and you can add additional filters, if necessary, as well.
Adding Actions
Select Add an Order Item as the action:
In the empty box below Add an Order Item, you will need to add order JSON. This sample JSON is the format to add:
{ "name": "XXX", "code": "XXX", "quantity": 1, "price": 2.00 }
Copy the above JSON, or use use the order_item section in the field name list to find the fields you need. Replace the XXX's with your product name and code/SKU and paste into the box:
Name the rule and save it.