Worked examples¶
Each example is a complete macro configuration you can copy into Apps > Macro Configuration. Node and key names are the ones these channels usually send. Confirm them against one of your own orders' XML before you rely on them, because plugins, apps, and store settings change what a channel sends. Only data that Linnworks received from the channel can be extracted.
Find your node names first¶
Open one of your orders' XML in Linnworks, or set Troubleshoot to true
for one order and ask support to read it. Either way, the labels above the
value you want, nearest first, form the path, and key/value lists use a
prefix. Troubleshooting explains both routes.
WooCommerce¶
WooCommerce sends custom checkout fields and plugin data as meta_data
key/value pairs. Use the WooMeta. prefix.
Gift message into an extended property¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
WooMeta.gift_message |
Target |
ExtendedProperty |
Format |
{{value}} |
Result: an extended property WooMeta.gift_message with the message as its
value. If the order has no gift message, nothing is written.
Delivery date and time slot as internal notes¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
WooMeta.delivery_date, WooMeta.delivery_slot |
Target |
InternalNote |
Format |
{{key}}: {{value}} |
Result: two internal notes, for example WooMeta.delivery_date: 2026-09-12
and WooMeta.delivery_slot: 08:00-12:00. Running the macro again on the same
order adds nothing, because notes with that text already exist.
VAT number for the invoice template¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
WooMeta.billing_vat_number |
Target |
ExtendedProperty |
Format |
{{value}} |
Result: an extended property you can print on the invoice through the template designer.
Shopify¶
Shopify sends checkout custom fields as note_attributes, which are
name/value pairs. Use the NoteAttribute. prefix. Metafields, when the
channel includes them, are key/value pairs. Use Metafield..
Delivery instructions as a processing note for packers¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
NoteAttribute.Delivery instructions |
Target |
ProcessingInternalNote |
Format |
Delivery: {{value}} |
Result: an internal processing note such as Delivery: Leave with
neighbour at number 12. The key keeps its space; only spaces around >
and , are removed.
Engraving text into an extended property¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
Metafield.engraving_text |
Target |
ExtendedProperty |
Format |
{{value}} |
Result: an extended property Metafield.engraving_text.
Shopify after the GraphQL upgrade¶
Once Linnworks upgrades a Shopify integration, new orders arrive in the GraphQL XML shape. Orders downloaded before the upgrade keep the old shape, so both exist side by side for a while. The macro records which shape each order has, so support can tell you which of yours are on the new one. Full details: shopify-graphql-migration.md.
Line-item custom attribute as a processing note¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
NoteAttribute.Letter/Character |
Target |
ProcessingNote |
Format |
Letter: {{value}} |
Result: a processing note such as Letter: F. The same configuration keeps
working on orders in the old shape, where the attribute is a name/value
pair.
Order name and SKU into extended properties¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
>>name, lineItems>nodes>sku |
Target |
ExtendedProperty |
Format |
{{value}} |
Result: >>name = #3104 and lineItems>nodes>sku = the first line's
SKU. name without >> would return the billing name instead.
Shipping service and payment status for the Rules Engine¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
shippingLines>nodes>code, displayFinancialStatus |
Target |
ExtendedProperty |
Format |
{{value}} |
Result: extended properties holding the checkout shipping code and PAID,
PENDING, or similar, ready for Rules Engine conditions.
Order total from a money object¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
totalPriceSet>shopMoney>amount |
Target |
ExtendedProperty |
Format |
{{value}} |
Result: an extended property such as 10.3. Plain price fields are blank in
the new shape; the amounts live inside ...Set > shopMoney > amount or
presentmentMoney > amount.
Etsy¶
Etsy sends the buyer's variation choices and personalisation as pairs of
formatted_name and formatted_value. Use the VariationSelectedOption.
prefix. The key is the option label exactly as shown on the listing,
including case.
Personalisation as a processing note¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
VariationSelectedOption.Personalization |
Target |
ProcessingNote |
Format |
Personalisation: {{value}} |
Result: a processing note such as Personalisation: Happy 40th, Dad.
Colour and size into extended properties¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
VariationSelectedOption.Colour, VariationSelectedOption.Size |
Target |
ExtendedProperty |
Format |
{{value}} |
Result: extended properties VariationSelectedOption.Colour and
VariationSelectedOption.Size. When an order has several lines, only the
first line's choices are found.
Plain paths¶
Plain paths work with any channel. The labels below are illustrative. Take the real ones from your order's XML.
Buyer phone number, labelled¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
Order>Buyer>Phone |
Target |
ExtendedProperty |
Format |
{{key}}: {{value}} |
Result: an extended property Order>Buyer>Phone with a value such as
Order>Buyer>Phone: 020 7946 0100.
Shipping service the buyer chose at checkout¶
| Parameter | Value |
|---|---|
NodesToBeExtracted |
ShippingDetails>ShippingServiceOptions>ShippingService |
Target |
ExtendedProperty |
Format |
{{value}} |
Result: an extended property you can use as a Rules Engine condition to assign the matching postal service.
When a short path finds the wrong node¶
Phone on its own finds the first node labelled Phone anywhere in the
document. If the billing address comes before the shipping address, that's
the billing phone. Add parents until the path is unambiguous:
ShippingAddress>Phone.
Rules Engine walkthrough¶
This example runs one configuration for WooCommerce orders and a different one for Etsy orders.
- Create two macro configurations under Apps > Macro Configuration, for
example
XmlExtractor - WooCommerceandXmlExtractor - Etsy, each with its ownNodesToBeExtracted. - Go to Orders > Rules Engine and add a new-order rule.
- Add a condition that identifies the channel, such as Source equals WooCommerce. Add a sub-source condition if you have more than one store on the same channel.
- Add an action of type Execute a macro and choose the WooCommerce configuration.
- Save and enable the rule.
- Repeat for Etsy with the Etsy configuration.
Orders that reach Linnworks after the rule is enabled are processed as they download.
Running the macro more than once¶
The macro is safe to run repeatedly on the same order:
- Extended properties are overwritten with the latest value.
- Notes are only added when no note of the same kind already has the same text.
So you can re-trigger a rule, or run the macro from any tool that executes macro configurations, without cleaning up first.