Expressions in Linnworks is a way of outputting data from the system based on a mathematical or functional expressions. This functionality applies to printing functions (printing invoices, labels), generating emails, running macro scripts and data export/import automation.

For example if you wanted to create a new field on an invoice which will contain some calculated value you can use Output Formula Value in the text field in the Template Designer and code the expression to output the desired result.

The Expressions section is divided to display the following:

Using Expressions

In order to use expressions, Linnworks needs to be instructed to treat your code as an expression so it can calculate the result, rather than it being treated as text. This is done using the EVAL tag. For examples of functions that can be used with EVAL tags, please see this guide.

Template Designer and Import/Export Data Expressions

When editing a label in template designer and clicking the Formula button, then selecting EVAL will enter the following code: EVAL{BEGIN}your macro goes here{END}. Your expression should be put between the {Begin} and {End} tags.

Email Templates

The EVAL statement is used in a different manor when dealing with emails. The editing window has a menu option for EVAL . Clicking this will display a number of common expression types, which can be clicked to enter the appropriate code into the template. Alternatively, other functions can be used by using an EVAL statement in the format: [{EVAL}]your expression goes here[{ENDEVAL}]. Please note that while expressions other than those listed in the EVAL menu item may work, they are not explicitly supported.