Rules Engine - Adding Rules

In this section, the creation of a simple rule will be demonstrated.

Table of Contents

Example Requirement

Order Parameter: This rule evaluates the Order Total Value field 

Index Condition Action
1 Order Total is less than or equal to £100 Assign an untracked First Class Large Letter shipping service to the Order
2 Order Total Value is greater than £100 Assign a tracked shipping service to the Order


This guide assumes you are already in the Rules Engine page. 

1 Add a New Rule

  • Click on the Add New Rule button. This can be found at the top right hand corner of the Rules Engine page
  • Enter a unique Rule Name
  • Click Create
  • This will create a new row with the Rule Name entered
    • The new rule is Disabled by default
    • The status is Draft until conditions are added and the Rule is saved

2 Edit the rule

  • Click the  icon to edit the rule
  • Alternatively, when saving the rule, answer Yes when offered the opportunity to Edit the new Rule

3 Set the first Rule Condition

  • The Start node will always be present for a new Rule
  • The Conditions that you add will be evaluated
    • If the condition is true for the current Order, then the rule will check the next Condition to it's right
    • Otherwise it will stop, unless there are other conditions below it
    • If there are, each will also be checked to see if it is met
    • This process will continue until the path leads to an Action node
    • At this point the Action will be executed and no further Conditions will be checked
  • Click Add New adjacent to the Start node
  • Enter a meaningful name for the condition. This should describe the condition, or it's purpose
  • Select the Parameter the condition will evaluate. In this case, select Total Charge
  • Select the Evaluation method. In this case, select less than or equal to
  • Enter a value to perform the evaluation against. Enter 100
  • Click Save Condition to apply the changes to the condition, and update the Rule

4 Add the first Action to the Rule

  • Click Add New adjacent to the previous node
  • Select Action at the top of the dialogue box
  • Enter a meaningful name for the Action. This should describe it clearly
  • Select an Action type
    • This can be selected from a drop down list, or by typing
    • The list will offer options based on what has been typed
    • Select the option Assign Postal Service to Order
  • Enter an Action Value 
    • In this field, enter the details of the Action's outcome
    • In this case which Postal Service to assign to the order
    • The options available will be filtered based on what you type into this field
    • In this case Royal Mail 1st Class Large Letter
  • Click Save Action to update the Rule with the new Action

5 Add the second Condition to the Rule

  • Click Add New adjacent/parallel to the Action
  • Set the Condition Name as Tracked
  • Set the Evaluation Parameter as Total Charge
  • Set the Evaluation Method as Greater than
  • Set the Evaluation Value as 100
  • Save the Condition

6 Add the second Action to the Rule

  • Click Add New adjacent to the Condition created above
  • Set the Action Name as Tracked
  • Set the Action Type as Assign postal service to order
  • Set the Action Value as Royal Mail Tracked 24 NEXT DAY
  • Save the Action

7 Save the Rule

  • Click the Save button when all actions and conditions are complete
  • The Rules Engine will offer to Enable the rule. Answer Yes for it to take effect on all Orders imported after this point

How To