Overview

This article provides and overview of  what Shipping Automation Rules are, how they are created and how they work. At the end of the article, we also provide a section where we answer common questions related to rules.


NOTE: Please also read the Section titled Impact of Rules on Current OC Behavior at the end of this article.


What is an Automation Rule?

A Shipping Automation Rule (more commonly referred to as a Shipping Rule or  Rule) in OrderCup is conceptually a set of sequential actions that is applied to a new order when certain conditions are met. Rules allow you to automate many of the manual actions one may perform during the shipping process in OrderCup, e.g. selecting a Ship-From address or selecting the Actual Shipping Method for an order based on what the buyer selected. So a Rule definition comprises:


  • A condition (potentially involving a set of criteria) that must be met in order for the application of the actions to be triggered. The condition can take several forms as described below.

  • An ordered set of actions that will be applied to the order in sequence if the conditions are met


We will describe each of these components in turn.


Condition

The condition is the first component of the Rule that must evaluate to True in order for the actions to be triggered. 


The condition in a Rule can take various forms:


  1. Apply to every incoming order, i.e. the condition evaluates to True for every order

  2. The condition evaluates to True for an incoming order meets a User-defined Filter that has already been created by the user

  3. The condition evaluates to True if every criteria specified as part of the Rule definition is met, i.e. all criteria specified evaluate to True.


For example,here are some sample criteria:


‘The number of items in the order must be greater than 2’ OR

‘The weight of the order must be greater than 1 lb’  OR

Order Status is On-hold


For a Condition that is based on Form 3,  the condition would have been met if ALL of the criteria were met, i.e it is equivalent to all the criteria being joined with the  AND operator as below:


Number of  Order Items > 2 AND

Weight of the Order > 1 lb AND

Order Status  = On-Hold


Actions

A Rule Action is an automated system update of the order that may change the state of the order, i.e. one or more values in the order may change. Some examples for Actions are:


  • Set Shipping Service to FedEx Ground

  • Change the Order status to Cancelled

  • Set Ship-From Address to Warehouse 2 address


Note: It is important to remember that the order of the Actions specified is material in a Rule definition, since they are applied sequentially and any action could potentially affect the order, and hence a subsequent action.



Creating and Editing Rules

Creating a Rule is simple - follow the steps below:


  1. Go to Settings → Stores → Shipping Rules.

  2. Click on the New button

  3. Enter the Rule Name

  4. Select the Condition for the Rule

  5. Specify the Actions that will be performed if Condition is met.

  6. Click Save and if everything is good, you will get a message ‘ Rule Saved’.





For Step 4 above, you will have three choices: 


  1. Apply to every imported order. (this includes manual orders)

  2. Apply to orders that match an existing User-defined Filter

  3. Apply to orders that match the condition below that may comprise one or more criteria


To see how to create a User-defined Filter click on the link above. To specify criteria as part of the condition to be met, you can define criteria using any of the order attributes below: 


  • Order Status

  • Order Weight

  • Order Value

  • Order ID

  • Requested Ship Method

  • Item Name

  • Product Code (SKU)

  • Items Count

  • Total Item Quantity

  • Order is gift?

  • Order is Amazon Prime?

  • Destination Type

  • Address Line 1

  • Address Line 2

  • City

  • Status

  • Country

  • Date

  • User



Actions


As discussed earlier actions affect the state of an order and it’s associated shipment. You can add Actions for a Rule by following the steps below:


  1. Click the Add Action button under the Rule being created

  2. Select the Action from the Actions drop-down list

  3. Complete the Action definition as appropriate

  4. To add multiple Actions for a Rule, repeat Steps 1 - 3 for each Action 

  5. Click Save to save the entire Rule








The following is the list of Actions that can be specified in the Rule definition:


  • Set Shipping Service

  • Bill Shipping to 3rd Party

  • Insure Package

  • Change Order Status

  • Request Confirmation

  • Set Ship-From

  • Set Total Order Weight

  • Set Package Dimensions

  • Assign to User 

  • Apply Request Ship Method

  • Stop Processing Rules for the Order



Rules Precedence


You can have multiple Rules defined in the context of any Store. When an order is imported into OrderCup, the Rules are executed for that order in the order they are defined.  If the Rule condition is met the Action(s) for that Rule are applied to that order.  


Since each Rule could potentially affect the State of the order, the order or precedence of the Rules is important. You can easily change the precedence of any Rule by clicking on the the arrows to the left of the Rule - the Up arrow to move the Rule up and the Down arrow to move the Rule down.


  



Note:

  1. In order to edit a Rule definition, you can click on the pencil icon to the right of the Rule under the Actions column in the Rules list. In order to delete a Rule, you can click on the trash icon to the right of the Rule under the Actions column. 

  2. If you do not want to delete the Rule, but just make it inactive for a while, you can edit the Rule and uncheck the Active checkbox under the Rule definition

  3. We have an initial set of Actions that we have implemented in the the first version of Rules, and will be adding several more Actions in the near future.


FAQs


  1. Is there an limitation to how many Rules I can create?

Only a practical limit, no hard limit. If you define a large number of Rules, the execution of the Rules will take a long time.


  1. Is there a limit on the Actions I can perform within a Rule

Again there is only a practical limit, no hard limit.


  1. How do Shipping Profiles and Rules interact?

Shipping Profiles get applied before Shipping Rules are applied. Shipping Profiles are used to set default values for many order and shipping attributes, and Rules can then manipulate the values set by Shipping Profiles. If there are no Shipping Rules defined the behavior will be same as what happens today.



Impact of Rules on Current OC Behavior


If you are currently used to the Order Syncing behavior it is important to note how their behavior has changed and how Rules and their associated actions will affect their behavior.


Order Sync in OC comes in two flavors - automatic order sync that is performed on an order when you click Ship on the order and it is loaded on the Ship Page. The other is manual order sync when you sync an order range or a specific order via the Sync Order Range menu.  In both case the ‘Sync’ synchronizes the entire order with the cart, and overwrites ANY values that are different in OC with values from the Cart, i.e essentially the order in OC becomes the same as the order on the cart.


With the implementation of Rules the Order Sync now has two flavors - Order Sync Status (only syncs the order status), and Order Sync which syncs all order values as before The Automatic Order Sync that is performed when you click Ship on an order now only does an Order Sync Status. This is because we did not want the values that are changed when the Rules were applied to be overwritten by the Automatic Order Sync. An Order Sync can still be performed from the Ship Page or Order Details page, but this must be done explicitly by clicking the new Sync button on the Ship page  by the user. Clicking the Sync button re-syncs the order AND reapplies the Rules.