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

# Add Missing Last Name

Automatically update Linnworks order customer names when the delivery full name contains only a first name by appending a configured fallback last name.

## Overview

Add Missing Last Name is an automated customer-name correction solution for Linnworks. It checks selected orders and updates the delivery customer **FullName** when the value contains only one name.

Some sales channels may supply customer names without a surname. This can create issues during courier validation, shipping-label generation, fulfilment, or dispatch.

The macro processes the order IDs supplied through the Linnworks Rule Engine. When the delivery FullName contains only one word, it appends the configured **SetLastName** value and saves the updated customer information back to the order.

Orders where the customer FullName already contains more than one word are left unchanged.

> Improve customer-name completeness by automatically adding a configured fallback last name to qualifying Linnworks orders.

## Who Should Use Add Missing Last Name

<Columns cols="2">
  <Card title="Warehouse & Fulfilment Teams" icon="package" horizontal="false" target="_self">
    Teams preparing orders for picking, packing, shipping-label generation, and dispatch can reduce manual customer-name corrections.
  </Card>

  <Card title="Logistics Teams" icon="truck" horizontal="false" target="_self">
    Logistics teams can improve name completeness before orders are passed to courier systems.
  </Card>

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

  <Card title="Operations Teams" icon="bar-chart-2" horizontal="false" target="_self">
    Operations teams benefit from consistent customer-name formatting across selected orders.
  </Card>
</Columns>

## Key Features

<Columns cols="2">
  <Card title="Single-Name Detection" icon="users" horizontal="false" target="_self">
    Checks the delivery customer FullName to determine whether it contains only one name value.
  </Card>

  <Card title="Configurable Fallback Last Name" icon="settings" horizontal="false" target="_self">
    Uses the SetLastName configuration parameter to define the value appended to qualifying customer names.
  </Card>

  <Card title="Automatic Customer Update" icon="edit" horizontal="false" target="_self">
    Saves the corrected FullName directly to the Linnworks order customer information.
  </Card>

  <Card title="Safe Update Logic" icon="check-circle" horizontal="false" target="_self">
    Leaves customer names unchanged when the FullName already contains more than one word.
  </Card>

  <Card title="Rule Engine Execution" icon="play" horizontal="false" target="_self">
    Processes only the Linnworks order IDs supplied through the configured Rule Engine action.
  </Card>

  <Card title="Execution Logging" icon="bar-chart-2" horizontal="false" target="_self">
    Logs macro start, order details, original name, updated name, unchanged orders, errors, and completion.
  </Card>
</Columns>

## How Add Missing Last Name Works

Add Missing Last Name runs through a defined sequence every time it processes one or more selected orders. The macro is triggered through the Linnworks Rule 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 Linnworks order.
  </Step>

  <Step title="Step 2: Customer name retrieval" title-type="p">
    The delivery customer FullName is read from `CustomerInfo > Address > FullName`.
  </Step>

  <Step title="Step 3: Name-part validation" title-type="p">
    The FullName is split by spaces to determine how many name parts are present.
  </Step>

  <Step title="Step 4: Fallback last name application" title-type="p">
    When the FullName contains only one name part, the configured `SetLastName` value is appended.
  </Step>

  <Step title="Step 5: Linnworks customer update" title-type="p">
    The updated customer information is saved back to the order using the Linnworks customer-information update operation.
  </Step>

  <Step title="Step 6: Logging and completion" title-type="p">
    Updated orders, unchanged orders, errors, and macro completion are recorded in the execution log.
  </Step>
</Steps>

## **Configure the Macro**

Once the app is installed, 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/1779254427126-xnza8d4jt7f-pasted-image-1779254422343.png?fm=auto&auto=compress%2Cformat" width="1368" height="568" alt="" priority={true} fetchPriority="high" />
  </Tab>

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

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

    This creates a new configuration where the macro can be enabled and used by the Rule Engine.
  </Tab>

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

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

    Example configuration name:

    `Add Missing Last Name`

    Configure the following parameter:

    - **SetLastName**

      Enter the fallback last name that should be added when the customer full name contains only one word.

      Example:

      `John Doe`

    The selected **OrderIds** are supplied by the Rule Engine when the macro action runs.
  </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/1779370446254-lrnjau2pr9-pasted-image-1779370442010.png?fm=auto&auto=compress%2Cformat" width="1482" 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/1779255464957-si7u81jpj-pasted-image-1779255459336.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/1779370467058-8z9zx8ozo2o-pasted-image-1779370462798.png?fm=auto&auto=compress%2Cformat" width="322" height="192" 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/1779255549614-n5fdqtc3fcl-pasted-image-1779255545314.png?fm=auto&auto=compress%2Cformat" width="1536" height="358" alt="" style="width: 1536px; height: auto; cursor: pointer;" />

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

    Choose the condition that identifies orders where the customer full name may be missing a last name.
  </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/1779370538837-7r9zpsqb0zd-pasted-image-1779370535587.png?fm=auto&auto=compress%2Cformat" width="685" height="132" alt="" />

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

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

    `Add Missing Last Name`

    - Set **Action type** to:

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

      `AddMissingLastName`
    - 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/1779370590554-iwfljvi56v-pasted-image-1779370587271.png?fm=auto&auto=compress%2Cformat" width="1537" height="703" 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 correcting incomplete customer names can slow down fulfilment and lead to inconsistent results. Add Missing Last Name applies the same fallback-name rule to every selected qualifying order.

> Reduce manual customer-name corrections, improve address completeness, and help orders move through courier and fulfilment workflows more smoothly.

<Columns cols="2">
  <Card title="Fix Missing Last Names" icon="users" horizontal="false" target="_self">
    Adds the configured fallback last name when the delivery FullName contains only one word.
  </Card>

  <Card title="Reduce Manual Editing" icon="trending-down" horizontal="false" target="_self">
    Removes the need to open and correct qualifying Linnworks orders individually.
  </Card>

  <Card title="Support Shipping Labels" icon="package" horizontal="false" target="_self">
    Helps ensure delivery names contain both a first-name and last-name-style value before label generation.
  </Card>

  <Card title="Improve Courier Compatibility" icon="truck" horizontal="false" target="_self">
    Helps reduce courier validation issues caused by incomplete delivery customer names.
  </Card>

  <Card title="Preserve Existing Full Names" icon="check-circle" horizontal="false" target="_self">
    Customer names containing more than one word are not changed.
  </Card>

  <Card title="Automate Through Rules Engine" icon="play" horizontal="false" target="_self">
    Processes selected orders automatically when they match the configured Linnworks rule.
  </Card>
</Columns>

## Usage of App

Add Missing Last Name is triggered through the **Linnworks Rule Engine** to update qualifying customer delivery names automatically.

### Execution

<Card title="Trigger via Rule Engine" icon="play" horizontal="false" target="_self">
  Call the AddMissingLastName macro through the Rule Engine with the required `OrderIds` and configured `SetLastName` value. No manual update is required after the macro is triggered.
</Card>

### Outcome

When the macro runs against an order, it:

<Steps>
  <Step title="Reads the customer FullName" title-type="p">
    Retrieves the delivery customer name from the selected Linnworks order.
  </Step>

  <Step title="Checks the number of name parts" title-type="p">
    Splits the FullName by spaces to determine whether only one name value is present.
  </Step>

  <Step title="Appends the fallback last name" title-type="p">
    Adds the configured SetLastName value when the FullName contains only one word.
  </Step>

  <Step title="Updates Linnworks customer information" title-type="p">
    Saves the corrected FullName back to the order.
  </Step>

  <Step title="Preserves complete names" title-type="p">
    Leaves the order unchanged when the FullName already contains multiple words.
  </Step>

  <Step title="Records execution results" title-type="p">
    Logs the order number, original name, updated name, unchanged status, errors, and completion.
  </Step>
</Steps>

## Input Parameters

Add Missing Last Name requires the following inputs:

| Parameter       | Required | Description                                                                              |
| --------------- | -------- | ---------------------------------------------------------------------------------------- |
| **OrderIds**    | Yes      | The Linnworks order IDs to process. These are supplied through the Rule Engine action.   |
| **SetLastName** | Yes      | The fallback last name value appended when the delivery FullName contains only one word. |

The updated name follows this format:

`OriginalName SetLastName`

For example:

| Original FullName | SetLastName | Updated FullName |
| ----------------- | ----------- | ---------------- |
| `John`            | `Customer`  | `John Customer`  |

## Name Update Rules

The macro applies the following customer-name rules:

| Customer FullName Condition          | Macro Behaviour                                                |
| ------------------------------------ | -------------------------------------------------------------- |
| FullName contains one word           | Appends the configured SetLastName value.                      |
| FullName contains more than one word | Leaves the customer information unchanged.                     |
| Order is supplied through OrderIds   | Processes the order through the configured Rule Engine action. |
| Customer information is updated      | Saves the revised FullName back to the Linnworks order.        |

<Callout kind="warning" collapsed="false">
  **Important:** The configured SetLastName value is appended exactly as entered in the macro configuration.
</Callout>

## Example Scenario

When an order contains the following customer name:

<Columns cols="2">
  <Card title="Original Customer Full Name" icon="users" horizontal="false" target="_self">
    John
  </Card>

  <Card title="Configured SetLastName" icon="settings" horizontal="false" target="_self">
    Customer
  </Card>
</Columns>

The macro updates the FullName to:

<Card title="Updated Customer Full Name" icon="check-circle" horizontal="false" target="_self">
  John Customer
</Card>

When the original FullName already contains multiple words, such as `John Smith`, the macro does not change the order.

## Best Practices

> Choose the fallback last name carefully and test the macro with sample orders before enabling it across a large order volume.

<Columns cols="2">
  <Card title="Use a suitable fallback value" icon="settings" horizontal="false" target="_self">
    Configure a fallback last name that is suitable for your courier, shipping-label, and operational requirements.
  </Card>

  <Card title="Use targeted rule conditions" icon="sliders" horizontal="false" target="_self">
    Configure the Rule Engine to process only orders that may contain incomplete delivery customer names.
  </Card>

  <Card title="Test sample orders first" icon="check-circle" horizontal="false" target="_self">
    Test single-word and multi-word customer names before enabling the rule for a larger order volume.
  </Card>

  <Card title="Run before label generation" icon="package" horizontal="false" target="_self">
    Trigger the macro before courier validation or shipping-label generation.
  </Card>

  <Card title="Review macro logs" icon="bar-chart-2" horizontal="false" target="_self">
    Monitor logs for updated names, unchanged orders, and customer-information update errors.
  </Card>

  <Card title="Avoid unnecessary repeated execution" icon="play" horizontal="false" target="_self">
    After the fallback value is added, the FullName contains multiple words and is not changed again by the macro.
  </Card>
</Columns>

## FAQ

**How is Add Missing Last Name 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 `SetLastName` value, which defines the fallback last name appended to qualifying customer names.

**Which customer name does the macro check?**

The macro checks `CustomerInfo > Address > FullName` on the selected Linnworks order.

**When is the customer name updated?**

The FullName is updated only when it contains one word.

**What happens when the customer name already contains multiple words?**

No update is made, and the macro logs **Order Info Not Changed**.

**How is the new name created?**

The macro combines the original FullName and the configured SetLastName value using this format:

`OriginalName SetLastName`

**Does the macro change the first name?**

No. The existing FullName is preserved, and the configured fallback value is appended.

**Does the macro process every Linnworks order?**

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

**Can the fallback last name be changed?**

Yes. Update the SetLastName value in the macro configuration.

**What happens after the customer name is updated?**

The revised customer information is saved back to the Linnworks order.

**Can the macro run more than once on the same order?**

Yes, but once the fallback value has been added, the FullName contains multiple words and will not be changed again by the same logic.

**Does the macro add an order note?**

The supplied documentation describes customer-information updates and execution logging. It does not specify that an order note is created.

**What information is recorded in the logs?**

The macro records start, order number, customer name, updated name, unchanged orders, errors, and completion.

**What should I check when the name is not updated?**

Confirm that the FullName contains only one word and that the SetLastName parameter has been configured.

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

Add Missing Last Name automates the correction of Linnworks delivery customer names that contain only one name value.

Once connected to the Rule Engine, the macro retrieves each selected order, checks the customer FullName, appends the configured SetLastName value when required, and saves the updated customer information.

<Columns cols="2">
  <Card title="Automatic name validation" icon="users" horizontal="false" target="_self">
    Delivery customer names are checked automatically to determine whether a fallback last name is required.
  </Card>

  <Card title="Configurable fallback value" icon="settings" horizontal="false" target="_self">
    The SetLastName parameter controls the value appended to qualifying customer names.
  </Card>

  <Card title="Safe customer updates" icon="check-circle" horizontal="false" target="_self">
    Names already containing multiple words are preserved without modification.
  </Card>

  <Card title="Rule Engine automation" icon="play" horizontal="false" target="_self">
    Selected orders are processed automatically through the configured Linnworks rule.
  </Card>
</Columns>

For orders that do not update as expected, review the Rule Engine and macro logs, confirm that the FullName contains only one word, and verify that the SetLastName parameter has been configured correctly.
