Rule MacroRIS-RM-2220 – Dispatch Date Update from XML

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.

Overview

Dispatch Date Update from XML is an automated despatch-date management solution for Linnworks. It updates the Despatch By Date on selected orders using a custom dispatch date stored in the order XML.

The macro processes order IDs supplied through the Linnworks Rule Engine and checks whether each order belongs to the defined source. When a valid custom XML dispatch date is available, that date is applied to the Linnworks order.

If the custom XML dispatch date is missing or empty, the macro uses the configured DefualtDate value instead. Invalid XML date values are not applied and are recorded in the execution log.

Successfully updated orders are also assigned the Despatch By Date identifier, making them easier to identify within Linnworks.

Keep fulfilment planning consistent by automatically updating the Despatch By Date from order XML or a configured fallback date.

Who Should Use Dispatch Date Update from XML

Key Features

How Dispatch Date Update from XML Works

Dispatch Date Update from XML follows a defined sequence whenever it receives one or more order IDs from the Linnworks Rule Engine.

Step 1: Order retrieval

The macro reads each order ID supplied through the OrderIds parameter and retrieves the corresponding order details and XML records.

Step 2: Source validation

The macro checks whether the order belongs to the defined source. Orders from other sources are skipped.

Step 3: XML dispatch date retrieval

The custom dispatch date value is read from the order XML when it is available.

Step 4: XML date validation

The macro validates the custom XML dispatch date before attempting to update the Linnworks order.

Step 5: XML date application

When the custom dispatch date is valid, the order Despatch By Date is updated using the XML value.

Step 6: Default date application

When the custom XML dispatch date is missing or empty, the configured DefualtDate value is used.

Step 7: Updated order collection

Orders updated successfully are collected so the Despatch By Date identifier can be assigned.

Step 8: Identifier assignment

The macro creates the Despatch By Date identifier when necessary and assigns it to the updated orders.

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.

Key Benefits

Missing or incorrect despatch dates can affect fulfilment priorities and order planning. Dispatch Date Update from XML applies consistent date-selection logic to every selected qualifying order.

Reduce manual despatch-date updates, improve fulfilment planning, and clearly identify orders updated by the macro.

Usage of App

Dispatch Date Update from XML is triggered through the Linnworks Rule Engine to update the Despatch By Date on qualifying orders automatically.

Execution

Trigger via Rule Engine

Call the Dispatch Date Update from XML macro through the Rule Engine with the required OrderIds and configured DefualtDate. The macro processes only orders belonging to the defined source.

Outcome

When the macro runs against an order, it:

Validates the order source

Checks whether the selected order belongs to the source supported by the macro.

Reads the XML dispatch date

Retrieves the custom dispatch date value from the order XML when present.

Validates the XML value

Confirms that the XML dispatch date can be interpreted as a valid date.

Updates from XML

Applies the valid custom XML date to the order Despatch By Date.

Applies the fallback value

Uses the configured DefualtDate when the XML dispatch date is missing or empty.

Marks updated orders

Assigns the Despatch By Date identifier to orders updated successfully.

Records execution results

Logs macro start, invalid dates, API errors, and completion.

Input Parameters

Dispatch Date Update from XML requires the following inputs:

ParameterRequiredDescription
OrderIdsYesThe Linnworks order IDs to process. Supplied through the Rule Engine action.
DefualtDateYesThe fallback Despatch By Date used when the custom XML dispatch date is missing or empty.

Important: The parameter name is spelled DefualtDate in the macro configuration and must be used exactly as shown.

The following behaviour is built into the macro:

SettingDescription
Defined SourceOnly orders belonging to the source defined in the macro logic are processed.
Custom XML Dispatch DatePreferred value used for the Despatch By Date when it is present and valid.
Fallback DateDefualtDate is used only when the XML date is missing or empty.
Invalid Date HandlingInvalid XML dates are not applied and are recorded in the execution log.
Updated Order IdentifierSuccessfully updated orders receive the Despatch By Date identifier.

Date Update Rules

The macro applies the following date-selection rules:

Order or XML ConditionMacro Behaviour
Order belongs to the defined source and XML date is validUpdates Despatch By Date using the XML value.
Order belongs to the defined source and XML date is missingUpdates Despatch By Date using DefualtDate.
Order belongs to the defined source and XML date is emptyUpdates Despatch By Date using DefualtDate.
XML date is invalidDoes not apply the invalid date and logs an error.
Order belongs to another sourceSkips the order.
Order is updated successfullyAssigns the Despatch By Date identifier.

Example Scenario

Assume the macro is configured with:

Configured DefualtDate

2026-05-25

The selected orders produce the following outcomes:

OrderConditionResult
Order ADefined source with a valid XML dispatch dateDespatch By Date is updated from XML.
Order BDefined source with an empty XML dispatch dateDespatch By Date is updated using DefualtDate.
Order CDefined source with an invalid XML dispatch dateNo XML date is applied and an error is logged.
Order DOrder is not from the defined sourceThe order is skipped.

Orders A and B are assigned the Despatch By Date identifier after successful updates.

Best Practices

Configure a valid fallback date and test the macro with representative XML records before enabling it across a large order volume.

FAQ

How is Dispatch Date Update from XML triggered?

The macro is triggered through the Linnworks Rule Engine. Matching order IDs are supplied automatically through the OrderIds parameter.

What configuration value is required?

The macro requires the DefualtDate parameter.

Why is the parameter spelled DefualtDate?

That is the parameter name defined by the macro and shown in the Macro Configuration screen. It must be used exactly as provided.

Which date is preferred?

The valid custom dispatch date from the order XML is preferred.

When is DefualtDate used?

DefualtDate is used when the custom XML dispatch date is missing or empty.

What happens when the XML date is invalid?

The invalid value is not applied, and the error is recorded in the macro log.

Does the macro update orders from every source?

No. Only orders belonging to the source defined within the macro logic are processed.

What happens to orders from another source?

They are skipped.

Which Linnworks field is updated?

The macro updates the order Despatch By Date.

How are successfully updated orders identified?

They receive the Despatch By Date identifier.

What happens if the identifier does not already exist?

The macro creates the identifier before assigning it to updated orders.

Does the macro process every Linnworks order automatically?

No. It processes only the order IDs supplied through the configured Rule Engine action.

Can the macro update multiple orders in one execution?

Yes. It loops through all order IDs passed through OrderIds.

What should be checked when an order is not updated?

Confirm that the order belongs to the defined source, the rule supplied the order ID, and either a valid XML date or valid DefualtDate is available.

What should be checked when no identifier is assigned?

Confirm that the order Despatch By Date was updated successfully and review the macro log for errors.

Please review these pages to understand how data is handled and the terms governing the use of this application.

Summary

Dispatch Date Update from XML automates the management of the Linnworks Despatch By Date for selected orders.

Once connected to the Rule Engine, the macro validates the order source, reads the custom XML dispatch date, applies a valid XML value where possible, uses DefualtDate when the XML value is missing, and assigns an identifier to successfully updated orders.

For orders that do not update as expected, review the Rule Engine and macro logs, confirm that the order belongs to the defined source, and verify that the XML date or configured DefualtDate is valid.