Linnworks macro engine allows you to inject your own automation behaviour into Linnworks by creating a Macro script that runs every time the system synchronizes. A script is essentially a set of commands written in .Net C# that gets executed during every synchronization.
Generic Macro scripting is used to run a set of automated tasks, unlike Order Scripting (see Scripting - Orders), which is executed against every open or processed order on the system, the generic script is executed once during the synchronization – which means it is ideal candidate for doing things in a batch.
Here are some examples of what Macro Script can be used for
The script can be enabled/disabled
The script has execution order
The syntax of the code is standard C# with most common namespaces attached in the compilation, so you have access to file system, networking components etc. But most importantly you have direct access to commondata library – which exposes most of the data queries and manipulations. In addition you have ActiveConnection parameter, this is supplied in the Initialize method as a parameter and you can use it to run data queries against your system. Since this documentation is not intended to describe every method, field and function in C# and linnworks data adapter, we can only give some pointers as to how to work with scripts. The scripting has full InteliSense – meaning that when you type the code, the method, function or a property of the object will have a comment, which describes what it does.
The code syntax is .Net C# (version 2 compile). The script has access to the following namespaces
The code must be placed inside public void Initialize(..) method.
When writing a script it is sometimes necessary to output some debugging text to show value of certain variable. Initialize method provides a debug class variable.
To output a value in the debug window
To output script progress
The script progress propagates to Linnworks Synchronization progress. When running long scripts it is a good idea to keep the user informed of the progress.
The main purpose of the webinar will be to get all new customers familiar with the software by covering basic configuration steps