Rule MacroRIS-RM-2281 – Shopify Customisation to Notes

Shopify Customisation to Notes

Automatically extract order note details, line item SKU/title information, and usable customization properties from Shopify order XML into Linnworks order notes. Add Despatch Date as an order extended property when missing.

Shopify order XML can contain important order notes and line item customization details that may not be immediately visible during fulfilment or order review. When teams need to check these values manually inside order XML, it can slow down processing and increase the chance of missing important customization information.

The Shopify XML Data Extract macro helps make this information easier to access by reading selected Linnworks orders, extracting useful values from the order XML, and creating a clear order note containing the available details.

This macro can extract:

  • Order Note from the XML, when it matches the expected order number format

  • Line item SKU and title

  • Line item customization properties

  • Despatch Date, added as an order extended property when missing

The macro also avoids reprocessing orders that already contain a note created by this macro.

Keep Shopify XML customization and order note information visible by automatically copying it into Linnworks order notes.

Configure the Macro

Once the app is installed, you need to create a macro configuration so the system knows which macro to run and allows it to be selected in the Rule Engine.

This setup can be adjusted anytime based on your operational requirements.

Steps to Configure

Go to Apps > Macro Configuration and click + Add new configuration.

Shopify customization and XML order note details can be important during fulfilment, especially where products contain personalization, engraving, uploaded text, or other order-specific options. This macro helps reduce manual XML checks by copying relevant values into the order notes.

How It Works

The macro checks each selected order, reads the order XML, extracts useful order note and line item property values, and saves them into a Linnworks order note.

Step 1

The macro starts execution and writes Macro Start to the log with the number of orders to process.

Step 2

It loops through each order ID provided in the OrderIds parameter.

Step 3

For each order, the macro retrieves the order details using the Linnworks Orders API.

Step 4

It checks whether the order has a Despatch Date extended property.

Step 5

If Despatch Date is missing and the order has a Despatch By Date, the macro adds Despatch Date as an order extended property.

Step 6

The macro checks existing order notes to confirm whether the order was already processed by Add Note From ShopifyXMLDataExtract macro.

Step 7

If the order was already processed, the macro skips the order to avoid creating duplicate extracted notes.

Step 8

The macro retrieves the order XML and parses each available XML record.

Step 9

It checks the XML order note and extracts it only when it matches the expected order number pattern.

Step 10

It reads each LineItem node and adds the SKU and title to the final order note.

Step 11

It reads line item properties and adds valid property name/value pairs to the final order note.

Step 12

The macro skips unwanted property names such as Customily, image upload, hidden upload, and system-related properties.

Step 13

If at least one line item contains properties, the macro creates a new order note with the extracted details.

Step 14

The macro saves the new note with Internal set to false and CreatedBy set to Add Note From ShopifyXMLDataExtract macro.

Step 15

The macro logs errors where required and writes Macro Finished when execution ends.

Usage of App

This macro is designed to run against selected orders through the Rule Engine. It is useful when Shopify XML contains order note or customization details that need to be visible in Linnworks order notes.

OrderIds

Defines the Linnworks order IDs that should be processed. These are supplied by the Rule Engine when the macro action runs.

xmlnodelist

This parameter exists in the macro signature but is not used in the current macro logic.

dynamicFields

This parameter exists in the macro signature but is not used in the current macro logic.

Despatch Date Extended Property

If the order does not already have Despatch Date and the order has a Despatch By Date, the macro adds a Despatch Date extended property.

Order XML Note

The macro checks the XML Order/Note value and adds it to the extracted note only when it matches the expected order number pattern.

Line Item Properties

The macro reads each XML line item property and adds valid property name/value pairs to the final order note.

Order Note Creation

When valid line item properties exist, the macro creates a new non-internal order note containing the extracted XML details.

Execution Logging

The macro records start, skipped orders, XML parsing errors, successful note creation, and completion using the macro logger.

Key Points to Remember

  • The macro processes only the order IDs provided in OrderIds

  • The macro adds Despatch Date as an order extended property when missing and available from the order Despatch By Date

  • Despatch Date is formatted as:

    yyyy MMM dd

  • The macro checks whether the order has already been processed by looking for notes created by:

    Add Note From ShopifyXMLDataExtract macro

  • If an order has already been processed, the macro skips it

  • The macro reads all available XML records attached to the order

  • The macro searches for line items using:

    //Order/LineItems/LineItem

  • The macro adds each line item as:

    SKU - Title

  • The macro adds valid line item properties as:

    Name: Value

  • The macro creates an order note only when at least one line item has a Properties node

  • The final created note is set as Internal = false

  • Previous existing notes are marked as internal, except where the existing note matches the extracted XML order note

  • XML parsing errors are logged and the macro continues processing where possible

Once the macro is running, it helps make Shopify XML customization data easier to access directly from Linnworks order notes.

Property Values Skipped by the Macro

The macro skips property values when the value is empty or the property name starts with any of the following:

  • _customily

  • _Image Upload

  • _customily-production-url

  • **IMPORTANT

  • _Upload Image

  • _has_gpo

  • Image

  • Photo Upload

This keeps the final order note focused on useful customization details and avoids adding unnecessary upload, image, or system-related values.

What You Can Expect

  • Shopify customization details are added to order notes
    Valid line item properties from the XML are copied into a readable order note.

  • SKU and title are included
    Each line item is added using its SKU and title before its property details.

  • Despatch Date can be added automatically
    If missing, the macro creates a Despatch Date extended property from the order Despatch By Date.

  • Already processed orders are skipped
    Orders with an existing note created by this macro are not processed again.

  • Orders without line item properties are skipped
    If no line item contains properties, no extracted note is created.

  • Unwanted XML properties are ignored
    Image upload, Customily, hidden, and system-related values are filtered out.

  • Execution is logged
    The macro records processing progress, skipped orders, XML parsing failures, and successful saves.

Overall Impact

This macro improves visibility of Shopify customization information, reduces manual XML checking, and helps fulfilment teams access relevant order details directly from order notes.

What To Do After the Macro Runs

After the rule has triggered the macro, review selected orders if needed to confirm that Shopify XML details have been added to the order notes.

Steps to Follow

Step 1

Open Linnworks and locate the order processed by the rule.

Step 2

Open the affected order and review the order notes.

Step 3

Confirm that a note exists with CreatedBy set to Add Note From ShopifyXMLDataExtract macro.

Step 4

Confirm that the note contains the expected SKU, title, and customization property details.

Step 5

Check the order extended properties and confirm that Despatch Date was added if it was previously missing.

Step 6

Continue with normal order processing, production, fulfilment, or dispatch handling.

Why This Matters

Keeping Shopify XML customization details visible helps:

  • Reduce manual XML checks

  • Improve fulfilment accuracy

  • Make customization values easier to find

  • Support production and dispatch workflows

  • Reduce missed personalization details

  • Help teams process Shopify orders more efficiently

Best Practices

To get the most value from this macro, use it with rule conditions that target Shopify orders where XML customization data is expected.

  • Use clear rule conditions
    Configure the Rule Engine so the macro runs only for Shopify orders that may contain customization or XML property details.

  • Review sample orders after setup
    Confirm that the extracted note is created correctly before enabling the rule for wider use.

  • Check XML structure
    Confirm that the order XML contains LineItems, LineItem, and Properties nodes.

  • Avoid repeated execution where possible
    The macro skips orders already processed by this macro, but the rule should still be configured carefully.

  • Review filtered properties
    Confirm that skipped property names match your operational needs. The macro intentionally ignores image upload, Customily, and system-style properties.

  • Check Despatch Date values
    Confirm that the generated Despatch Date value is formatted correctly for your workflow.

Troubleshooting

No note was created

Confirm that the order XML contains at least one line item with a Properties node.

Order was skipped as already processed

Check whether the order already has a note created by Add Note From ShopifyXMLDataExtract macro.

Customization value is missing from the note

Check whether the property value is empty or whether the property name starts with one of the excluded prefixes.

XML parsing failed

Confirm that the order XML is valid and can be parsed.

No LineItem nodes were found

Confirm that the order XML contains line items under Order > LineItems > LineItem.

Despatch Date was not added

Confirm that the order has a Despatch By Date and does not already have a Despatch Date extended property.

Macro is not visible in the Rule Engine

Confirm that the macro configuration has been created and enabled in Apps > Macro Configuration.

Rule did not run

Confirm that the rule condition matches the order and that the rule has been saved and enabled.

Example Scenario

If a Shopify order XML contains:

  • Order Note: 206-4618037-1259539

  • Line Item SKU: CUSTOM-MUG-001

  • Line Item Title: Personalised Mug

  • Property: Name: John

  • Property: Message: Happy Birthday

And the order has no existing note created by the macro, the macro creates an order note similar to:

Created Order Note

Order Note: 206-4618037-1259539

CUSTOM-MUG-001 - Personalised Mug

Name: John

Message: Happy Birthday

If the order also has a Despatch By Date and does not already have a Despatch Date extended property, the macro adds the Despatch Date value to the order extended properties.

Despatch Date Example

Despatch Date: 2025 Jan 25

What This Means

  • The Shopify XML order note is copied into the new Linnworks order note only when it matches the expected order number format.

  • The line item SKU and title are included so warehouse and fulfilment teams can identify the item quickly.

  • Valid customization properties are added below the item details.

  • Unwanted image upload, Customily, hidden, and system-related properties are skipped.

  • A Despatch Date extended property is added only when it does not already exist and the order has a Despatch By Date.

  • Existing notes are marked as internal before the new extracted Shopify XML note is added.

Summary

The Shopify Customisation to Notes macro checks selected Linnworks orders, reads Shopify order XML, extracts useful order note and line item customization property details, and saves them into order notes.

It also adds a Despatch Date extended property when missing and skips orders already processed by the macro.

This helps teams reduce manual XML checks, improve customization visibility, and support smoother Shopify fulfilment workflows.