top of page
  • Writer's pictureCharlie McBroom

Linnworks - What is the Rules Engine & How to use it?

The Rules Engine lets you create custom business rules visually, even if you're not a programmer. While it can't do everything that fancy scripting can, you can still add your own rules easily. You can use it to decide on shipping options, organize files, move stuff around, and do other similar things.


Contents

What can the Rules Engine do?

The rules engine is pretty powerful. You can use it to switch up the shipping service for an order depending on things like weight, value, specific items, or extra details. You can also organize orders into folders based on similar stuff, automatically split up packages, and even run your own custom scripts or macros.


Basically, if there are things you do with your orders every day, chances are you can make the rules engine do them for you automatically.


When Does it run on an order?

The rules kick in by themselves when you save an order that's marked as "paid," but only if the order isn't parked or locked. They won't work for unpaid orders or Amazon FBA orders.


How to Add a Rule To The Linnworks Rules Engine


Example:

Let's say you want to use the rules engine to decide how to handle shipping based on the order's total value.


Rule Details:


If the Order Total is £100 or less, assign an untracked 1st class shipping service.

If the Order Total is greater than £100, assign a tracked Royal Mail shipping service.

Setting Up the Rule:


Go to Orders > Rules Engine.


Step 1: Adding a New Rule


Add a rule Linnworks

Click "Add new rule" in the top-right corner.

Give your rule a unique name and click "Create."

Note: The rule is initially disabled and in draft status.


Step 2: Editing the Rule



Edit the rule linnworks


A popup window will appear, asking you to edit the rule. Click "Yes."

Alternatively, click the pencil icon on the Rules Engine screen.


Step 3: Setting the First Condition


Add new rule in linnworks


The Start node is always there for new rules.

Click "Add new" next to the Start node.

Enter a condition name (e.g., "Order Total <= 100").

Choose the parameter to evaluate (e.g., "Total charge").

Select the evaluation method (e.g., "less than or equal to").

Enter the value to compare (e.g., "100").

Save the condition.


edit condition in linnworks rules engine

Step 4: Adding the First Action


Add new condition linnworks

Click "Add new" next to the condition node.

Go to the "Action" tab.

Give the action a name (e.g., "Untracked 1st Class").

Choose the action type (e.g., "Assign postal service to order").

Select the action value (e.g., "1st Class").

Save the action.


add first action rules engine linnworks

Step 5: Adding the Second Condition


Click "Add new" below the first action.


Linnworks Rules Engine

Specify the condition name (e.g., "Order Total > 100").

Set the evaluation parameter (e.g., "Total charge").

Choose the evaluation method (e.g., "Greater than").

Enter the evaluation value (e.g., "100").

Save the condition.


Add sub condition Linnworks rules engine


Step 6: Adding the Second Action


Click "Add new" next to the second condition.

Go to the "Action" tab.

Specify the action name (e.g., "Tracked Royal Mail").

Choose the action type ("Assign postal service to order").

Set the action value (e.g., "Royal Mail 24 Next Day").

Save the action.


add second action linnworks rules engine


Step 7: Saving the Rule


saving rules linnworks

Click "Save" to save all changes.

The Rules Engine will ask to enable the rule. Click "Yes" for it to work on all future orders.

That's it! Your rule is set up to manage shipping based on order total value.


Editing rules


In the Rules Engine, you have several options to edit and change rules:


Enable/Disable Rules:


You can enable or disable rules by clicking the button in the "Enabled" column.

When enabled, the rule runs on paid orders; when disabled, it won't run on orders until re-enabled. If an order isn't paid when downloaded, the rules won't apply.


Edit Rules:


Click the pencil icon to open the "Edit Rule" screen, where you can modify the conditions or actions of the rule.


View Rules:


Use the lens icon to view a rule in the "Edit Rule" screen.


Copy Rules:


To duplicate a rule, click the copy icon.

Specify a unique name for the copied rule and click "Create."


Change Rule Sequence:


You can rearrange the order in which rules are executed by clicking the "move up" and "move down" icons.

Rules execute from top to bottom, based on the order number in the "Order" column.

Click "move up" to shift a rule up in the list and "move down" to move it down.


Delete Rules:


To remove a rule, click the delete icon.

Be cautious; there's no undo option for deleted rules. Once deleted, a rule is gone for good.


Editing Conditions:


To edit a specific condition within a rule:


Click the pencil icon in the row of the rule to open the "Edit Rule" screen.


Find the condition you want to edit and click the wrench icon located to the left of the condition name.


That's it! You can now easily edit and manage rules and conditions within the Rules Engine.


Testing rules

Setting Up and Running a Test:


Assuming you already have the Rules Engine open with a rule in place for testing, follow these steps:


Step 1 - Edit the Rule:


Start by editing the rule. Click on the pencil icon to open the "Edit Rule" screen.


Step 2 - Show Test Window:


advanced rules in linnworks

At the top of the screen, click on the "Show test window" control.


Step 3 - Test with an Existing Order:


To test the rule using an existing order, enter an order ID and click "Load existing."


Step 4 - Test with Specific Values:


Alternatively, if you want to test with custom values, fill in the values at the top of the test window (e.g., Total Charge and Total Weight).


Step 5 - Run the Test:


Click "Run test."


Step 6 - View Test Result:


The Rules Engine Test window will display the test result at the top of the screen.


Step 7 - Close the Test Window:


Once testing is completed, close the Test window.

That's it! You've successfully set up and run a test in the Rules Engine to see how your rule behaves with different inputs.


Some examples of complex rules

With Linnworks Rules Engine, you can create various complex rules to automate tasks. Here are a few examples:


Assign Postal Service using Extended Properties:

Automatically determine the postal service based on extended properties.


Assign Royal Mail Postal Service based on Dimensions:

Set the Royal Mail postal service for orders based on their dimensions.


Validate UK Postcodes using Regex:

Use regular expressions (Regex) to verify UK postcodes for accuracy.


Handle UK Highland and Islands Addresses using Regex:

Apply specific rules for orders with addresses in UK Highland and Islands using Regex.


Organize Orders into Folders based on Extended Properties:

Automatically sort orders into folders based on extended properties.


Park Orders if Email Contains "X":

Place orders on hold if the customer's email contains a specific keyword, like "@fittedcommerce.com"


These are just a few examples of the powerful and flexible rules you can create with the Linnworks Rules Engine to streamline your workflow and automate various tasks.


Using the Rules Engine: We're Here to Assist!


The Rules Engine might appear a bit tricky initially, but don't worry – we've got your back. Our team is ready to support you in every way possible.


Whether you need training to understand the Rules Engine better or assistance in creating and comprehending your rule processes, we're just a message away.


So, if you're seeking clarity, a helping hand, or simply lack the time to dive into this feature, remember that we're here to lend a helping hand. Feel free to reach out!

bottom of page