Rules Engine Example: Assigning RM Postal Service based on Dimension

Overview
In this example, the Rules Engine is used to check the maximum dimensions of order items and use this to assign a Postal Service to the order. This only works if your Selling Channel Listings are correctly mapped to your Inventory Items.

Requirements

Assign a Postal Service Method using the size and weight formats as defined by Royal Mail

Format Examples Max weight Max length Max width Max depth
Letter
Letter
Greetings cards, personal letters, postcards, bills 100g 24cm 16.5cm 0.5cm
Large letter
Large Letter
A4 documents, certificates, magazines, CD or DVD in case, some large greeting cards with badges 750g 35.3cm 25cm 2.5cm
Small parcel
Small Parcel
Ladies boots, portable speakers, winter puffa coat, desk lamp 2kg 45cm 35cm 16cm
Medium Parcel
Medium Parcel
Gifts, shoes, heavy or bulky items 20kg 61cm 46cm 46cm

Building the Ruleset

  1. Goto Settings > Rules Engine
  2. Click Add new rule
  3. Enter a name and click Create, eg Postal Service By Dimension
  4. Click the Pencil Icon to edit the Rule
  5. Click Add new
    • Set the Condition Name, eg UK Orders
    • Add the condition: Shipping country equals the United Kingdom
    • Click Save condition
  6. Add sub-conditions for each packaging type
    • Letter
      • Max depth less than or equal to 0.5
      • Max height less than or equal to 24
      • Max width less than or equal to 16.5
      • Total item weight less than or equal to 100
    • Large Letter
      • Max depth less than or equal to 2.5
      • Max height less than or equal to 35.3
      • Max width less than or equal to 25
      • Total item weight less than or equal to 750
    • Small Parcel
      • Max depth less than or equal to 16
      • Max height less than or equal to 45
      • Max width less than or equal to 35
      • Total item weight less than or equal to 2000
    • Medium Parcel
      • Max depth less than or equal to 46
      • Max height less than or equal to 61
      • Max width less than or equal to 46
      • Total item weight less than or equal to 20000
    • Large Parcel
      • Max depth greater than 150
      • Max height greater than 150
      • Max width greater than 150
      • Total item weight less than or equal to 30000
  7. Add an Action for each sub condition to set the required Postal Service
    • Letter
    • Large Letter
    • Small Parcel
    • Medium Parcel
    • Large Parcel
  8. The completed rule should look like this

Assumptions

  • The unit of measurement for length is defined as cm in your Application Settings
  • The unit of measurement for weight is defined as grams in your Application Settings
  • All items have been measured in the same way, eg Linnworks Height is the Royal Mail Length dimension

Limitations

Linnworks is designed to work with the maximum dimension from any of the items contained within an order when evaluating a rule. It is not possible to use expressions to sum the item dimensions or implement complex 3D nesting to decide if the combination of multiple products will fit into a defined package size.

  • Example 1
    • Item 1 - 20cm x 10cm x 0.1cm
    • Item 2 - 30cm x 13cm x 0.4cm
    • Therefore rules for max dims will use 30cm x 13cm x 0.4cm
    • This would assign Large Letter
  • Example 2
    • Item 1 - 20cm x 10cm x 0.4cm
    • Item 2 - 14cm x 13cm x 0.4cm
    • Therefore rules for max dims will use 20cm x 13cm x 0.4cm
    • This would actually require Large Letter (20cm x 13cm x 0.8cm), but the Rules Engine does not know how the 2 items would fit into the packaging and would assume Letter based on max dims

Further Enhancements

  • For even larger parcels over 1.5m length and 3m girth (2*width + 2*depth) use an extended property to identify orders containing these products
  • Where there is a risk of multiple items in an order not fitting into the assigned package use a condition to check the number of order items and set the Action to assign the order to a folder for Manual verification