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:

[REMOVEALL]

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:

Tomorrow
+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. Example

X = Y

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.

Still need help? Contact Us Contact Us