> For the complete documentation index, see [llms.txt](https://docs.rishvi.co.uk/linnworks/llms.txt).
> Use it to discover all available pages before exploring further.

# 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

<Columns cols="2">
  <Card title="Warehouse & Fulfilment Teams" icon="package" horizontal="false" target="_self">
    Teams responsible for picking, packing, and dispatch can use the updated Despatch By Date to prioritise orders correctly.
  </Card>

  <Card title="Operations Managers" icon="bar-chart-2" horizontal="false" target="_self">
    Operations managers can reduce manual date corrections and improve consistency across fulfilment workflows.
  </Card>

  <Card title="Integration Administrators" icon="settings" horizontal="false" target="_self">
    Administrators configure the fallback date, enable the macro, create the Rule Engine action, and monitor execution logs.
  </Card>

  <Card title="Dispatch Planning Teams" icon="calendar" horizontal="false" target="_self">
    Planning teams can use XML-provided dates and fallback values to keep order priorities aligned with source data.
  </Card>
</Columns>

## Key Features

<Columns cols="2">
  <Card title="XML Dispatch Date Extraction" icon="file-text" horizontal="false" target="_self">
    Reads the custom dispatch date value from the order XML when the value is available.
  </Card>

  <Card title="Automatic Despatch Date Update" icon="calendar" horizontal="false" target="_self">
    Updates the Linnworks Despatch By Date with a valid date extracted from the order XML.
  </Card>

  <Card title="Configurable Fallback Date" icon="settings" horizontal="false" target="_self">
    Uses the configured DefualtDate value when the custom XML dispatch date is missing or empty.
  </Card>

  <Card title="Defined Source Validation" icon="sliders" horizontal="false" target="_self">
    Processes only orders belonging to the source defined within the macro logic.
  </Card>

  <Card title="Updated Order Identification" icon="check-circle" horizontal="false" target="_self">
    Assigns the Despatch By Date identifier to orders that were updated successfully.
  </Card>

  <Card title="Date Validation and Logging" icon="bar-chart-2" horizontal="false" target="_self">
    Prevents invalid XML dates from being applied and records errors in the execution log.
  </Card>
</Columns>

## 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.

<Steps>
  <Step title="Step 1: Order retrieval" title-type="p">
    The macro reads each order ID supplied through the `OrderIds` parameter and retrieves the corresponding order details and XML records.
  </Step>

  <Step title="Step 2: Source validation" title-type="p">
    The macro checks whether the order belongs to the defined source. Orders from other sources are skipped.
  </Step>

  <Step title="Step 3: XML dispatch date retrieval" title-type="p">
    The custom dispatch date value is read from the order XML when it is available.
  </Step>

  <Step title="Step 4: XML date validation" title-type="p">
    The macro validates the custom XML dispatch date before attempting to update the Linnworks order.
  </Step>

  <Step title="Step 5: XML date application" title-type="p">
    When the custom dispatch date is valid, the order Despatch By Date is updated using the XML value.
  </Step>

  <Step title="Step 6: Default date application" title-type="p">
    When the custom XML dispatch date is missing or empty, the configured DefualtDate value is used.
  </Step>

  <Step title="Step 7: Updated order collection" title-type="p">
    Orders updated successfully are collected so the Despatch By Date identifier can be assigned.
  </Step>

  <Step title="Step 8: Identifier assignment" title-type="p">
    The macro creates the Despatch By Date identifier when necessary and assigns it to the updated orders.
  </Step>
</Steps>

## **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**

<Tabs>
  <Tab title="Step 1">
    **Go to Apps > Macro Configuration and click + Add new configuration.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779094211819-m4d4f11jrx-pasted-image-1779094207771.png?fm=auto&auto=compress%2Cformat" width="1368" height="568" alt="" priority={true} fetchPriority="high" />
  </Tab>

  <Tab title="Step 2">
    **Select the DispatchDateUpdatefromXML macro and click Create Configuration.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779429057783-qhk6neir8g-pasted-image-1779429054111.png?fm=auto&auto=compress%2Cformat" width="1014" height="443" alt="" priority={true} fetchPriority="high" />

    This creates a new configuration where you can define the required parameter value.
  </Tab>

  <Tab title="Step 3">
    **In the Macro Configuration screen, add the configuration name and parameter values.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779429098858-ex5li23k8nj-pasted-image-1779429095364.png?fm=auto&auto=compress%2Cformat" width="719" height="515" alt="" style="width: 719px; height: auto; cursor: pointer; margin: 0 auto;" />

    Configure the required parameter:

    - **DefualtDate** — enter the fallback despatch date that should be used when the custom XML dispatch date is missing or empty.
  </Tab>

  <Tab title="Step 4">
    **Make sure to enable the macro to continue with the Rule Engine configuration.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779429134985-lddaxd6tta-pasted-image-1779429131666.png?fm=auto&auto=compress%2Cformat" width="1257" height="28" alt="" />

    <Callout kind="warning" collapsed="false">
      **Note:** If the macro is not enabled, it will not appear in the **Action** value list when setting up the rule.
    </Callout>
  </Tab>

  <Tab title="Step 5">
    **Go to Orders > Rules engine and click + Add new rule.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779094587683-vdcfps4fxa-pasted-image-1779094584371.png?fm=auto&auto=compress%2Cformat" width="1369" height="606" alt="" />
  </Tab>

  <Tab title="Step 6">
    **Enter the rule name and click Create.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779429185200-3ls7s9gavpp-pasted-image-1779429181700.png?fm=auto&auto=compress%2Cformat" width="318" height="190" alt="" style="width: 318px; height: auto; cursor: pointer; margin: 0 auto;" />
  </Tab>

  <Tab title="Step 7">
    **Click Add new, select Condition, set the condition as required, and save it.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779099941621-j5whfpzeq2-pasted-image-1779099937975.png?fm=auto&auto=compress%2Cformat" width="468" height="109" alt="" style="width: 468px; height: auto; cursor: pointer; margin: 0 auto;" />

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779429217849-u6h38w3323j-pasted-image-1779429214877.png?fm=auto&auto=compress%2Cformat" width="637" height="364" alt="" />
  </Tab>

  <Tab title="Step 8">
    **Add the macro action and click Save.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779429261489-t8vc6cf5m1-pasted-image-1779429258846.png?fm=auto&auto=compress%2Cformat" width="662" height="142" alt="" />

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779429282973-sv2mpkth9fa-pasted-image-1779429280093.png?fm=auto&auto=compress%2Cformat" width="645" height="262" alt="" />

    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**

    <Callout kind="warning" collapsed="false">
      **Note:** If the macro is not enabled, it will not appear in the **Action** value list when setting up the rule.
    </Callout>
  </Tab>

  <Tab title="Step 9">
    **Review the saved rule setup.**

    <Image src="https://blob-cdn.documentation.ai/org-87fb0951-1e07-4f5d-a887-8a7327c7777d/doc-98941d2e-0032-424f-8414-3034ac5fa6ee/1779429310737-5r123scs0y-pasted-image-1779429307208.png?fm=auto&auto=compress%2Cformat" width="1296" height="565" alt="" />

    - Verify the condition and action are connected correctly
    - Click **Save** in the bottom-right corner to save the rule
  </Tab>
</Tabs>

## 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.

<Columns cols="2">
  <Card title="Reduce Manual Order Updates" icon="trending-down" horizontal="false" target="_self">
    Removes the need to open and update the Despatch By Date manually on each selected order.
  </Card>

  <Card title="Improve Dispatch Planning" icon="calendar" horizontal="false" target="_self">
    Helps ensure qualifying orders receive a usable despatch date before fulfilment begins.
  </Card>

  <Card title="Use Source XML Data" icon="file-text" horizontal="false" target="_self">
    Applies the custom dispatch date directly from the order XML when a valid value is available.
  </Card>

  <Card title="Apply a Fallback Date" icon="settings" horizontal="false" target="_self">
    Uses DefualtDate automatically when the XML dispatch date is missing or empty.
  </Card>

  <Card title="Avoid Invalid Date Updates" icon="shield-check" horizontal="false" target="_self">
    Invalid XML dates are not applied and are recorded as errors in the macro log.
  </Card>

  <Card title="Identify Updated Orders" icon="check-circle" horizontal="false" target="_self">
    Assigns the Despatch By Date identifier to orders updated successfully.
  </Card>
</Columns>

## 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

<Card title="Trigger via Rule Engine" icon="play" horizontal="false" target="_self">
  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.
</Card>

### Outcome

When the macro runs against an order, it:

<Steps>
  <Step title="Validates the order source" title-type="p">
    Checks whether the selected order belongs to the source supported by the macro.
  </Step>

  <Step title="Reads the XML dispatch date" title-type="p">
    Retrieves the custom dispatch date value from the order XML when present.
  </Step>

  <Step title="Validates the XML value" title-type="p">
    Confirms that the XML dispatch date can be interpreted as a valid date.
  </Step>

  <Step title="Updates from XML" title-type="p">
    Applies the valid custom XML date to the order Despatch By Date.
  </Step>

  <Step title="Applies the fallback value" title-type="p">
    Uses the configured DefualtDate when the XML dispatch date is missing or empty.
  </Step>

  <Step title="Marks updated orders" title-type="p">
    Assigns the Despatch By Date identifier to orders updated successfully.
  </Step>

  <Step title="Records execution results" title-type="p">
    Logs macro start, invalid dates, API errors, and completion.
  </Step>
</Steps>

## Input Parameters

Dispatch Date Update from XML requires the following inputs:

| Parameter       | Required | Description                                                                               |
| --------------- | -------- | ----------------------------------------------------------------------------------------- |
| **OrderIds**    | Yes      | The Linnworks order IDs to process. Supplied through the Rule Engine action.              |
| **DefualtDate** | Yes      | The fallback Despatch By Date used when the custom XML dispatch date is missing or empty. |

<Callout kind="warning" collapsed="false">
  **Important:** The parameter name is spelled `DefualtDate` in the macro configuration and must be used exactly as shown.
</Callout>

The following behaviour is built into the macro:

| Setting                      | Description                                                                   |
| ---------------------------- | ----------------------------------------------------------------------------- |
| **Defined Source**           | Only orders belonging to the source defined in the macro logic are processed. |
| **Custom XML Dispatch Date** | Preferred value used for the Despatch By Date when it is present and valid.   |
| **Fallback Date**            | DefualtDate is used only when the XML date is missing or empty.               |
| **Invalid Date Handling**    | Invalid XML dates are not applied and are recorded in the execution log.      |
| **Updated Order Identifier** | Successfully updated orders receive the Despatch By Date identifier.          |

## Date Update Rules

The macro applies the following date-selection rules:

| Order or XML Condition                                      | Macro Behaviour                                    |
| ----------------------------------------------------------- | -------------------------------------------------- |
| Order belongs to the defined source and XML date is valid   | Updates Despatch By Date using the XML value.      |
| Order belongs to the defined source and XML date is missing | Updates Despatch By Date using DefualtDate.        |
| Order belongs to the defined source and XML date is empty   | Updates Despatch By Date using DefualtDate.        |
| XML date is invalid                                         | Does not apply the invalid date and logs an error. |
| Order belongs to another source                             | Skips the order.                                   |
| Order is updated successfully                               | Assigns the Despatch By Date identifier.           |

## Example Scenario

Assume the macro is configured with:

<Card title="Configured DefualtDate" icon="calendar" horizontal="false" target="_self">
  2026-05-25
</Card>

The selected orders produce the following outcomes:

| Order       | Condition                                        | Result                                         |
| ----------- | ------------------------------------------------ | ---------------------------------------------- |
| **Order A** | Defined source with a valid XML dispatch date    | Despatch By Date is updated from XML.          |
| **Order B** | Defined source with an empty XML dispatch date   | Despatch By Date is updated using DefualtDate. |
| **Order C** | Defined source with an invalid XML dispatch date | No XML date is applied and an error is logged. |
| **Order D** | Order is not from the defined source             | The 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.

<Columns cols="2">
  <Card title="Use a valid fallback date" icon="calendar" horizontal="false" target="_self">
    Enter DefualtDate in a format that can be parsed successfully by the macro and Linnworks.
  </Card>

  <Card title="Use targeted rule conditions" icon="sliders" horizontal="false" target="_self">
    Configure the Rule Engine to select only orders expected to belong to the defined source.
  </Card>

  <Card title="Validate sample XML" icon="file-text" horizontal="false" target="_self">
    Confirm that sample orders contain the expected custom dispatch date value before enabling the macro widely.
  </Card>

  <Card title="Run before fulfilment planning" icon="package" horizontal="false" target="_self">
    Trigger the macro before orders are prioritised for picking, packing, or dispatch.
  </Card>

  <Card title="Review updated identifiers" icon="check-circle" horizontal="false" target="_self">
    Confirm that successfully updated orders receive the Despatch By Date identifier.
  </Card>

  <Card title="Monitor execution logs" icon="bar-chart-2" horizontal="false" target="_self">
    Review logs for invalid date values, skipped sources, API errors, and successful completion.
  </Card>
</Columns>

## 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.

## Legal Information

- **Privacy Policy:** [https://rishvi.co.uk/privacy-policy/](https://rishvi.co.uk/privacy-policy/)
- **Terms and Conditions:** [https://rishvi.co.uk/terms-conditions/](https://rishvi.co.uk/terms-conditions/)

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.

<Columns cols="2">
  <Card title="Automatic XML date updates" icon="file-text" horizontal="false" target="_self">
    Valid custom XML dispatch dates are applied directly to the Linnworks Despatch By Date.
  </Card>

  <Card title="Fallback date handling" icon="calendar" horizontal="false" target="_self">
    DefualtDate is applied when the XML dispatch date is missing or empty.
  </Card>

  <Card title="Controlled source processing" icon="sliders" horizontal="false" target="_self">
    Orders are updated only when they belong to the source defined by the macro.
  </Card>

  <Card title="Updated order identification" icon="check-circle" horizontal="false" target="_self">
    Successfully updated orders receive the Despatch By Date identifier.
  </Card>
</Columns>

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.
