Rule Action Reference

Order Desk rule actions are very powerful but need a bit of explanation. Here we'll show you how to build each one.

Set Checkout Data

Enter the name of the field, a pipe, and the value that you want to set. Example:

Pickup Date|October 14

To remove a single checkout data field:

Pickup Date|[REMOVE]

To remove all checkout data fields:


To set a date:

[DATE+5days] or [DATE-1week]

To set a short-format date:

[SHORTDATE+5days] or [SHORTDATE-1week]

To add or subtract from the current number

++ or --

Set Metadata Data

It's just the same as the checkout data, but he results get written into the metadata instead. Please be cautious with the removal functionality since removing all metadata is probably not a good idea.

Create PDF

Order Desk can create a PDF for each order using rule actions. Select the Create PDF rule action and select the template to use. This will queue up an action to create the PDF in the background. After the PDF has been created it will be stored on Order Desk servers and linked in the metadata as pdf_ID where ID is the template ID you picked. After the PDF has been created a PDF Created rule is executed.

These PDF files will be stored on Order Desk servers for 90 days after which they will be removed.

Set Checkout Data Receipt URL

If you would like to set a field to include a publicly accessible version of a receipt template for a particular order, you can set the name of the field, a pipe, and the ID number of the template you wish to render. Example:

Packling Slip|37261

In this example, the Packing Slip checkout data field value will be a url that shows the rendering of template 37261 for the order.

The Template ID can be found in the url bar for each template:

If a PDF had been created for the template, the PDF will be used instead of the direct link.

Set Order Metadata Timestamp

Simply enter the name of the metadata field you'd like to set with the current timestamp. This is a good way of marking the time that a certain action took place. Times will be stored in the store timezone.

Post Order JSON

Enter the URL of your custom endpoint and we will send a JSON representation of the order to this location. If your server responds with anything other than a status code of 200 or 201 we will keep retrying.

Add Order Item

Enter the details of the item you'd like to add to the order in JSON format. Example:

{ "name": "Candy Apples", "code": "apples-xt1", "quantity": 3 }

There are more options available. See the  Field Name Reference for examples of what the order items can look like.

Duplicate Order With a Future Date

Enter a date or or phrase on each new line and a copy of the order will be made with each order date. Example:

+7 Days
+1 Month
Next Wednesday

This will add four copies of the order future dated on these dates

Filter Shipping Method

If the shipping method is X, change it to Y. You can enter multiple filters, one on each line. Example

Old Shipping Method = New Method<br>Super-Fast Delivery = Express

A simpler method is to simply use the Set Shipping Method action which lets you change the method directly.

Using Twig in the Rule Builder

There are two actions that can be used with  Twig to pull data from the order and used in the rule, Set Checkout Data Value and Set Order Metadata Value.

Adjust Order Prices

If you need to convert your prices to a different currency, add the conversion rate percentage to the Adjust Order Prices action. 

For instance, if converting from USD in one store to AUD in another store, where the conversation rate is 1.28, set up a rule in the AUD store that says:

When Order Copied From Another Store
Adjust Order Prices|128%

Please note that the percentage must be manually changed on occasion to reflect current rates.

Convert Item Quantities to Separate Items

Use this action to split multiple quantities of the same item into separate line items in a single order.

Merge Items With Same SKU

If any items in an order have the same SKU but are on separate lines, use this action to combine them back into a single item with multiple quantities.

Set Sequential Number

Adds a sequential number on every order when the rule runs. This will be added as checkout data and needs to be named in the rule, such as ID:

Still need help? Contact Us Contact Us