The TradePeg Rules Engine is a powerful tool in enabling a hands-off approach to business by taking the manual work out of monotonous tasks such as Carrier Applications, document tags/notes management and much more.

It offers extensive customisation in automating actions being taken on Sales Orders, based on specific criteria. 


Where to find Rules:

Rules are configured from Customers > Sales Order > Rules, shown below.

Graphical user interface, application, table

Description automatically generated

Rules Overview:

After clicking into Rules, you will have an Overview where you can monitor and re-arrange the sequence in which Rules are run. This is especially important as once certain actions have been taken, TradePeg will stop running Rules on the SO for that particular action. 

Example – see below; 

  • If a Sales Order meets the conditions specified in Rule: FedEx – Heavy Goods, it will assign the FedEx Carrier service, and not override this decision with any subsequent Rules being met.
  • For Document Tags however, an SO meeting multiple Rules assigning tags, can apply multiple tags via different Rules.

Graphical user interface, text, application, email

Description automatically generated

TIP: A general recommendation would be to have the more specific Rules towards the top, and the more generic ones towards the bottom of the sequence. 

NOTE: Rules are draggable from the overview, using the Hamburger symbol.

The ‘Test’ function will allow you to enter an SO number and get a view of which Rules’ Conditions this SO would theoretically meet, granting an insight into how to organize Rules most efficiently. Green indicates that the Sales Order meets the requirements of that Rule.

Graphical user interface, text, application, email

Description automatically generated

A picture containing chart

Description automatically generated

Nested Rules

These are Rules which will only be run following the Parent Rule’s conditions being met. 

In the above example, the Rule Actions belonging to Rule: ‘Nested – Park Unfulfillable’ will only be considered provided the Parent Rule: ‘Change Warehouse – 2nd' has been satisfied.





Rule Configuration – Rule Actions

In creating a New Rule, you will be greeted with the Below Screen. Here you define what Actions will be taken on an Order which meets the specified criteria.

Graphical user interface, application

Description automatically generated


Set Warehouse when:

  • This Action refers specifically to the ‘Set Warehouse’ Action, and it is based on either Available, or On-Hand inventory levels of the nominated Warehouse. 

Failover Carrier: 

  • This allows you to nominate multiple Carrier Services within one Rule.
  • The way Failover works, is that it will attempt to generate/purchase the nominated Services in order, and on successful completion it will Assign this service.
  • This function relies on the creation of Draft Shipment Labels, and as such ‘Auto Generate Labels’ must be enabled in Carrier Settings for this to work correctly.

Set Due Date:

  • Specify the number of days from the date the Sales Order is confirmed to set as the Due Date for the Order.
  • Example: 4 = will set the Due Date to 4 days after the Sales Order is confirmed.











Rule Configuration – Rule Conditions

These are the criteria within the Sales Order which are considered in order to enact the Rule Actions.

Add Condition: These conditions consider the Sales Order as a whole. So, things such as Shipping Address, Value, Weight, Contact, Marketplace, etc.

Add Item Conditions: These refer specifically to individual items within the Sales Order. Such as considering whether a certain SKU exists on an order, or an item which has a certain item tag, etc.

Add Group: All Rules exist within a Group, and you can create different Groups with different conditions and differing Chainings, which massively expands the level of customisation available!

Graphical user interface

Description automatically generated


Chaining determines the way in which conditions have to be met, in order for the Group of Conditions to be satisfied.

Any – If any of the conditions within the Group are met, the Group is considered satisfied within the Rule as a whole.

All – All conditions within the Group must be met, for the Group to be considered satisfied within the Rule as a whole.

The Rules Engine is particularly powerful in the sense that you can create multiple groups, with different Chainings, to consider vast sets of criteria in different methods all within the same Rule. 

Note: The initial Group will take the Chaining nominated in the Rule as a whole. 


In the above Example:

Both conditions in the initial Group must be met, as the overall Rules’ Chaining = All

  • The SO’s Shipping Address must not be Great Britain.
  • The Day of the Week on which the Rule is run must be a weekday. 
    1. TIP: As per the above, separating criteria using a pipeline |, will allow you to test multiple criteria within the same condition!