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

# Address Field Character Replacement

Automatically replace unsupported or accented characters in selected Linnworks order address fields, record the changes in order notes, and update zero-cost items for international orders.

## Overview

Address Field Character Replacement is an automated order-cleaning solution for Linnworks. It checks selected shipping and billing address fields and replaces configured unsupported, accented, or special characters with courier-friendly alternatives.

The macro processes order IDs supplied through the Linnworks Rules Engine. It reviews supported address fields, updates customer information when a replacement is required, and records the original and updated values in an order note.

For international orders, the macro also checks for order items with a cost of `0.0` and updates those items using the cost logic implemented within the macro.

> Address Field Character Replacement helps reduce courier validation issues, improve dispatch readiness, and create a traceable record of every address change.

## Who Should Use Address Field Character Replacement

<Columns cols="2">
  <Card title="Warehouse & Fulfilment Teams" icon="package" horizontal="false" target="_self">
    Teams responsible for picking, packing, label generation, and dispatch use the macro to reduce manual address checks before fulfilment.
  </Card>

  <Card title="Logistics Managers" icon="truck" horizontal="false" target="_self">
    Logistics managers use the macro to improve address compatibility with courier systems and reduce avoidable label-generation errors.
  </Card>

  <Card title="Integration Administrators" icon="settings" horizontal="false" target="_self">
    Administrators configure the macro, enable it for the Rules Engine, define suitable order conditions, and monitor execution logs.
  </Card>

  <Card title="Operations & Customer Service Teams" icon="bar-chart-2" horizontal="false" target="_self">
    Operations and customer service teams use the generated order notes to review the original and updated address values.
  </Card>
</Columns>

## Key Features

<Columns cols="2">
  <Card title="Automatic Character Replacement" icon="edit" horizontal="false" target="_self">
    Replaces configured accented, unsupported, and special characters with defined courier-friendly alternatives.
  </Card>

  <Card title="Shipping Address Cleaning" icon="package" horizontal="false" target="_self">
    Checks supported shipping fields including Address1, Address2, Town, and Full Name.
  </Card>

  <Card title="Billing Address Cleaning" icon="sliders" horizontal="false" target="_self">
    Checks supported billing fields including Address1 and PostCode.
  </Card>

  <Card title="Address Change Notes" icon="file-text" horizontal="false" target="_self">
    Adds an order note showing which fields changed and the original and updated values.
  </Card>

  <Card title="International Item Cost Handling" icon="globe" horizontal="false" target="_self">
    Checks non-UK orders for items with a cost of `0.0` and updates those item costs.
  </Card>

  <Card title="Conditional Linnworks Updates" icon="check-circle" horizontal="false" target="_self">
    Updates customer information only when at least one supported address field has changed.
  </Card>
</Columns>

## How Address Field Character Replacement Works

Address Field Character Replacement runs through a defined sequence every time it processes one or more orders. The macro is triggered through the Linnworks Rules Engine and receives the relevant order IDs automatically.

<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 from Linnworks.
  </Step>

  <Step title="Step 2: Address field analysis" title-type="p">
    The supported shipping and billing address fields are checked for characters included in the replacement dictionary.
  </Step>

  <Step title="Step 3: Character replacement" title-type="p">
    Matching characters are replaced with their configured alternatives. Empty fields and characters not included in the dictionary are left unchanged.
  </Step>

  <Step title="Step 4: Customer information update" title-type="p">
    When at least one address field changes, the updated customer information is written back to the Linnworks order.
  </Step>

  <Step title="Step 5: Order note creation" title-type="p">
    The macro adds an order note containing the original and updated values for each changed field.
  </Step>

  <Step title="Step 6: International item cost check" title-type="p">
    If the shipping country is not **United Kingdom**, the macro checks for order items where **Cost** is `0.0` and updates those items.
  </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 allows it to be selected in the Rule Engine.

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/1779260437722-x0nevdarzbs-pasted-image-1779260425496.png?fm=auto&auto=compress%2Cformat" width="1368" height="568" alt="" priority={true} fetchPriority="high" />
  </Tab>

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

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

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

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

    This macro uses the selected order IDs provided by the Rule Engine. No additional custom parameter values are required.
  </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/1779266946436-tqhh79ehic-pasted-image-1779266941962.png?fm=auto&auto=compress%2Cformat" width="1487" height="30" 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/1779266975429-3nt91udgnaw-pasted-image-1779266970397.png?fm=auto&auto=compress%2Cformat" width="1536" height="680" 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/1779267029902-wq4vegm87np-pasted-image-1779267024322.png?fm=auto&auto=compress%2Cformat" width="322" height="193" alt="" style="width: 322px; 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/1779267061642-6ch1fy9bu38-pasted-image-1779267055837.png?fm=auto&auto=compress%2Cformat" width="1536" height="358" alt="" />

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

    Use conditions that target orders where address cleanup is required, such as international orders, marketplace orders, or orders ready for dispatch.
  </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/1779267104699-hl1a67pcvr-pasted-image-1779267100156.png?fm=auto&auto=compress%2Cformat" width="653" height="130" alt="" />

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

    In the **Add action** window, enter the **Action name**, for example:

    `AddressCharacterReplacement`

    - Set **Action type** to:

      `Execute a macro`
    - In **Action value**, select:

      `AddressCharacterReplacement`
    - 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/1779267710296-cdr59fzsc9v-pasted-image-1779267703730.png?fm=auto&auto=compress%2Cformat" width="1535" height="638" alt="" />

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

## Key Benefits

Manually reviewing customer addresses across high order volumes can slow down fulfilment and introduce inconsistent corrections. Address Field Character Replacement applies the same configured cleaning rules to every selected order.

> Reduce manual address corrections, improve courier compatibility, and maintain a clear record of every change made to an order.

<Columns cols="2">
  <Card title="Reduce Manual Address Checks" icon="trending-down" horizontal="false" target="_self">
    Automatically checks supported address fields for configured accented or unsupported characters.
  </Card>

  <Card title="Improve Dispatch Readiness" icon="zap" horizontal="false" target="_self">
    Cleans address information before courier validation, shipping-label generation, packing, or dispatch.
  </Card>

  <Card title="Improve Courier Compatibility" icon="truck" horizontal="false" target="_self">
    Replaces configured characters with simpler alternatives that are less likely to cause courier validation issues.
  </Card>

  <Card title="Record Address Changes" icon="check-circle" horizontal="false" target="_self">
    Adds an order note containing the original and updated value for every changed field.
  </Card>

  <Card title="Avoid Unnecessary Updates" icon="sliders" horizontal="false" target="_self">
    Customer information is updated only when at least one supported address field has changed.
  </Card>

  <Card title="Support International Orders" icon="edit" horizontal="false" target="_self">
    Checks non-UK orders for items with a cost of `0.0` and updates those items automatically.
  </Card>
</Columns>

## Usage of App

Address Field Character Replacement is triggered through the **Linnworks Rules Engine** to automatically clean supported address fields on selected orders.

### Execution

<Card title="Trigger via Rules Engine" icon="play" horizontal="false" target="_self">
  Call the AddressCharacterReplacement macro through the Rules Engine with the required `OrderIds`. No additional manual input is required once the rule is active.
</Card>

### Outcome

When the macro runs against an order, it:

<Steps>
  <Step title="Reads order data" title-type="p">
    Retrieves the order, customer information, supported shipping and billing address fields, and order items from Linnworks.
  </Step>

  <Step title="Checks configured characters" title-type="p">
    Compares the supported address fields against the built-in character replacement dictionary.
  </Step>

  <Step title="Updates changed address fields" title-type="p">
    Replaces matching characters and writes the updated customer information back to Linnworks.
  </Step>

  <Step title="Creates an order note" title-type="p">
    Records the field name, original value, and updated value for each address change.
  </Step>

  <Step title="Updates international zero-cost items" title-type="p">
    For orders where the shipping country is not **United Kingdom**, checks for items with **Cost** equal to `0.0` and updates them.
  </Step>
</Steps>

## Input Parameters

Address Field Character Replacement requires the following input before it can process orders:

| Parameter    | Required | Description                                                                  |
| ------------ | -------- | ---------------------------------------------------------------------------- |
| **OrderIds** | Yes      | The Linnworks order IDs to process. Passed through the Rules Engine trigger. |

The macro does not require additional custom values in the Macro Configuration screen.

The following behaviour is defined within the macro code:

| Setting                       | Description                                                               |
| ----------------------------- | ------------------------------------------------------------------------- |
| **Replacement Dictionary**    | Defines the characters that can be replaced and their replacement values. |
| **Supported Address Fields**  | Defines which shipping and billing fields are checked.                    |
| **International Order Check** | Treats orders outside **United Kingdom** as international.                |
| **Zero-Cost Item Handling**   | Updates international order items where **Cost** is `0.0`.                |

## Character Replacement Rules

The macro uses the following configured replacement values:

| Original Character | Replacement |
| ------------------ | ----------- |
| á                  | a           |
| à                  | a           |
| â                  | a           |
| ä                  | a           |
| ã                  | a           |
| å                  | a           |
| ā                  | a           |
| ç                  | c           |
| é                  | e           |
| í                  | i           |
| ñ                  | n           |
| ó                  | o           |
| ú                  | u           |
| ý                  | y           |
| ž                  | z           |
| ß                  | ss          |
| œ                  | oe          |
| æ                  | ae          |
| ,                  | space       |

<Callout kind="warning" collapsed="false">
  **Important:** Character replacement is case-sensitive. Only the exact characters defined in the macro are replaced.
</Callout>

## Best Practices

> Consistent Rules Engine configuration and regular monitoring are key to getting the best results from Address Field Character Replacement.

<Columns cols="2">
  <Card title="Run before label generation" icon="package" horizontal="false" target="_self">
    Trigger the macro before courier allocation or shipping-label generation so addresses are cleaned before validation.
  </Card>

  <Card title="Use targeted rule conditions" icon="sliders" horizontal="false" target="_self">
    Configure the Rules Engine to process only the orders that require address cleaning.
  </Card>

  <Card title="Review order notes" icon="edit" horizontal="false" target="_self">
    Use the generated notes to confirm which fields were changed and review the original values.
  </Card>

  <Card title="Test before enabling at scale" icon="check-circle" horizontal="false" target="_self">
    Run the macro against a small sample of orders containing known supported characters before enabling it across a larger order volume.
  </Card>

  <Card title="Monitor Rules Engine execution" icon="bar-chart-2" horizontal="false" target="_self">
    Review Rules Engine and macro logs regularly to confirm that orders are being processed without errors.
  </Card>

  <Card title="Extend replacements carefully" icon="settings" horizontal="false" target="_self">
    Test any additions to the replacement dictionary before publishing an updated macro to a live workflow.
  </Card>
</Columns>

## FAQ

**How is Address Field Character Replacement triggered?**

The macro is triggered through the Linnworks Rules Engine. When an order matches a configured rule, the macro receives the relevant `OrderIds` automatically.

**What address fields does the macro check?**

The documented fields are shipping Address1, shipping Address2, shipping Town, shipping Full Name, billing Address1, and billing PostCode.

**Does the macro require additional configuration parameters?**

No. The macro uses the order IDs supplied through the Rules Engine. No additional custom parameter values are required in the Macro Configuration screen.

**Does the macro update every order it receives?**

The macro checks every supplied order, but customer information is updated only when at least one supported address field contains a configured character.

**Is an order note always created?**

No. An order note is created only when one or more address fields have changed.

**What information is included in the order note?**

The note records the changed field, its original value, and its updated value.

**Are the character replacements case-sensitive?**

Yes. Only the exact characters defined in the replacement dictionary are replaced.

**What happens when an address contains a character that is not configured?**

Characters that are not included in the replacement dictionary remain unchanged.

**How does the macro identify an international order?**

An order is treated as international when its shipping country is not **United Kingdom**.

**Does the macro update UK order item costs?**

No. The international zero-cost item step is skipped for orders where the shipping country is **United Kingdom**.

**Which international order items are updated?**

The macro checks international order items where **Cost** is `0.0`.

**Can additional characters be added to the replacement dictionary?**

Yes. The macro code must be updated and tested before the new replacement rules are used in a live workflow.

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

Address Field Character Replacement automates the cleaning of supported shipping and billing address fields on selected Linnworks orders.

Once configured through the Rules Engine, the macro checks each supplied order, replaces configured characters, updates customer information when required, and records every address change in an order note.

For international orders, the macro also checks for order items with a cost of `0.0` and updates those items using the logic implemented within the macro.

<Columns cols="2">
  <Card title="Automated address cleaning" icon="edit" horizontal="false" target="_self">
    Supported shipping and billing fields are checked automatically against the replacement dictionary.
  </Card>

  <Card title="Traceable address updates" icon="file-text" horizontal="false" target="_self">
    Original and updated field values are recorded in an order note whenever a change is made.
  </Card>

  <Card title="Rules Engine automation" icon="play" horizontal="false" target="_self">
    Matching orders are supplied to the macro automatically through the configured Linnworks rule.
  </Card>

  <Card title="International item handling" icon="globe" horizontal="false" target="_self">
    Non-UK orders are checked separately for items where the cost is `0.0`.
  </Card>
</Columns>

For orders that do not produce the expected result, review the Rules Engine logs, confirm that the macro configuration is enabled, and verify that the address contains an exact character from the replacement dictionary.
