Dispatch Date Update from XML
Automatically update the Despatch By Date on selected Linnworks orders from a custom XML dispatch date field, using a default date when the XML date is not available.
Incorrect or missing despatch dates can create delays during order planning, fulfilment prioritisation, and dispatch preparation. The Dispatch Date Change from XML macro helps keep selected Linnworks orders aligned with the correct fulfilment date by reading the dispatch date from the order XML for orders from the defined source.
This macro checks each selected order, reads the custom dispatch date value from the order XML, and updates the Linnworks Despatch By Date field when a valid date is found. If the custom XML date is missing or empty, the macro applies the configured default date instead.
With this automated approach, your team can reduce manual order updates, improve dispatch planning, and clearly identify orders that have been updated with a despatch date.
Keep fulfilment planning consistent by automatically updating the Despatch By Date from order XML or from a configured default date.
Configure the Macro
Once the app is installed, you need to create a macro configuration so the system knows which macro to run and what default despatch date should be applied when the XML date is missing.
This setup can be adjusted anytime based on your operational requirements.
Steps to Configure
Go to Apps > Macro Configuration and click + Add new configuration.

Select the DispatchDateUpdatefromXML macro and click Create Configuration.

This creates a new configuration where you can define the required parameter value.
In the Macro Configuration screen, add the configuration name and parameter values.

Configure the required parameter:
- DefualtDate — enter the fallback despatch date that should be used when the custom XML dispatch date is missing or empty.
Make sure to enable the macro to continue with the Rule Engine configuration.

Note: If the macro is not enabled, it will not appear in the Action value list when setting up the rule.
Go to Orders > Rules engine and click + Add new rule.

Enter the rule name and click Create.

Click Add new, select Condition, set the condition as required, and save it.


Add the macro action and click Save.


In the Add action window, enter the Action name, for example:
Dispatch Date Update from XML
-
Set Action type to:
Execute a macro -
In Action value, select:
Dispatch Date Update from XML
-
Click Save
Note: If the macro is not enabled, it will not appear in the Action value list when setting up the rule.
Review the saved rule setup.

-
Verify the condition and action are connected correctly
-
Click Save in the bottom-right corner to save the rule
Missing or incorrect despatch dates can affect order prioritisation and fulfilment planning. This macro helps reduce those issues by automatically setting the Despatch By Date for selected orders from the defined source.
Reduce Manual Order Updates
Eliminates the need to manually open each selected order and update the Despatch By Date field.
Improve Dispatch Planning
Ensures selected orders from the defined source receive the correct despatch date before fulfilment.
Use XML Order Data
Reads the custom dispatch date value directly from the order XML when it is available.
Apply a Fallback Date
Uses the configured default date when the custom XML dispatch date is missing or empty.
Save Operational Time
Allows teams to update multiple selected orders in one macro run instead of changing each order manually.
Identify Updated Orders
Assigns the Despatch By Date identifier to orders that were successfully updated.
How It Works
The macro checks each selected order and updates the Despatch By Date only when the order belongs to the defined source and a valid date can be applied.
Step 1
The macro starts execution and writes Macro Start to the log.
Step 2
It loops through each order ID provided in the OrderIds parameter.
Step 3
For each order, the macro retrieves the order XML and order details using the Linnworks Orders API.
Step 4
It checks whether the order belongs to the defined source. Orders from other sources are skipped.
Step 5
If the order XML contains a custom dispatch date value, the macro validates the date format.
Step 6
If the custom dispatch date is valid, the macro updates the order Despatch By Date with that value.
Step 7
If the custom dispatch date is missing or empty, the macro updates the order Despatch By Date using DefualtDate.
Step 8
Updated orders are collected so the Despatch By Date identifier can be assigned after processing.
Step 9
The macro creates the Despatch By Date identifier if it does not already exist, then assigns it to the updated orders.
Step 10
The macro logs any errors and writes Macro Finished when execution ends.
Usage of App
This macro is designed to update selected orders automatically once the required parameter is configured. It is useful when despatch dates are supplied in XML data from a defined source, or when a fallback date should be used when that XML value is unavailable.
OrderIds
Defines the Linnworks order IDs that should be processed. Only these selected orders are checked and updated.
DefualtDate
Defines the fallback date that will be applied when the custom XML dispatch date is missing or empty.
Defined Source
Defines the order source that the macro is intended to process. Orders from other sources are skipped.
Custom Dispatch Date XML Field
Defines the XML value used to update the order Despatch By Date when a valid date is available.
Despatch By Date Identifier
The macro creates or uses the Despatch By Date identifier and assigns it to orders that were updated successfully.
Execution Logging
The macro records the start, errors, and completion of the process using the macro logger.
Key Points to Remember
-
The macro processes only the order IDs provided in OrderIds
-
Only orders from the defined source are updated
-
Orders from other sources are skipped
-
The custom XML dispatch date is used when it is available and valid
-
DefualtDate is used when the custom XML dispatch date is missing or empty
-
Invalid XML date values are logged as errors and are not applied
-
Updated orders receive the Despatch By Date identifier
-
The parameter name in the code is spelled DefualtDate
Once the macro is running, it helps ensure selected orders have the correct Despatch By Date for smoother fulfilment planning.
What You Can Expect
-
Despatch dates are automatically updated
Selected orders from the defined source receive a Despatch By Date from the custom XML dispatch date field when available. -
Fallback dates are applied when needed
If the custom XML dispatch date is missing or empty, the configured DefualtDate value is applied. -
Invalid dates are not saved
If the XML date value is not in a valid date format, the macro logs an error and does not apply that value. -
Updated orders are marked clearly
Orders successfully updated by the macro are assigned the Despatch By Date identifier. -
Execution is logged
The macro records when it starts, finishes, and if an error occurs.
Overall Impact
This macro improves despatch date accuracy, reduces manual order updates, and helps your team identify orders that have been updated for dispatch planning.
What To Do After the Macro Runs
After the macro has completed, review the selected orders if needed to confirm that the Despatch By Date field was updated correctly.
Steps to Follow
Step 1
Open Linnworks and locate the orders included in the OrderIds parameter.
Step 2
Review the Despatch By Date field on the affected orders.
Step 3
Confirm that orders with a valid custom XML dispatch date were updated using the XML value.
Step 4
Confirm that orders without a custom XML dispatch date were updated using DefualtDate.
Step 5
Check that updated orders have the Despatch By Date identifier assigned.
Step 6
Continue with normal order validation, picking, packing, or dispatch processing.
Why This Matters
Keeping despatch dates accurate helps:
-
Improve fulfilment planning
-
Prioritise orders more effectively
-
Reduce manual order corrections
-
Avoid missed despatch deadlines
-
Keep selected orders consistent with source order data
Best Practices
To get the most value from this macro, configure the default date carefully and run the macro before dispatch-related processing begins.
Recommended Guidelines
-
Use a valid default date
Make sure DefualtDate is entered in a date format that Linnworks can parse successfully. -
Run before dispatch
Use the macro before dispatch processing so the Despatch By Date is available for order prioritisation. -
Review selected orders carefully
Ensure the correct order IDs are passed into the macro before running it. -
Keep source conditions clear
Use the macro only for orders that should be handled by the defined source rule. -
Check logs after execution
Review macro logs to confirm successful completion or identify invalid date values.
Accurate despatch dates help keep order processing organised and reduce avoidable fulfilment delays.
Example Scenario
To better understand how this works, here’s a simple example:
Configured value:
- DefualtDate = 2026-05-25
Selected orders:
-
Order A is from the defined source and has a valid custom XML dispatch date → Despatch By Date is updated from XML
-
Order B is from the defined source and has an empty custom XML dispatch date → Despatch By Date is updated using DefualtDate
-
Order C is from the defined source but has an invalid XML date → No date update is applied and an error is logged
-
Order D is not from the defined source → The order is skipped
What This Means
-
Orders from the defined source are evaluated for despatch date updates
-
The XML date is preferred when it is available and valid
-
The configured default date is used only when the XML date is missing or empty
-
Orders from other sources are not changed
-
Successfully updated orders are marked with the Despatch By Date identifier
Final Summary
The Dispatch Date Change from XML macro helps keep selected Linnworks orders ready for dispatch by automatically updating the Despatch By Date from custom XML order data or a configured fallback date.
By reducing manual updates, applying dates consistently, and marking updated orders with an identifier, this macro supports smoother fulfilment planning and more reliable order processing.