Rule MacroRIS-RM-2252 – Add Missing Last Name in Open Order

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

Key Features

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.

Step 1: Order retrieval

The macro reads each order ID supplied through the OrderIds parameter and retrieves the corresponding Linnworks order.

Step 2: Customer name retrieval

The delivery customer FullName is read from CustomerInfo > Address > FullName.

Step 3: Name-part validation

The FullName is split by spaces to determine how many name parts are present.

Step 4: Fallback last name application

When the FullName contains only one name part, the configured SetLastName value is appended.

Step 5: Linnworks customer update

The updated customer information is saved back to the order using the Linnworks customer-information update operation.

Step 6: Logging and completion

Updated orders, unchanged orders, errors, and macro completion are recorded in the execution log.

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

Go to Apps > Macro Configuration and click + Add new configuration.

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.

Usage of App

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

Execution

Trigger via Rule Engine

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.

Outcome

When the macro runs against an order, it:

Reads the customer FullName

Retrieves the delivery customer name from the selected Linnworks order.

Checks the number of name parts

Splits the FullName by spaces to determine whether only one name value is present.

Appends the fallback last name

Adds the configured SetLastName value when the FullName contains only one word.

Updates Linnworks customer information

Saves the corrected FullName back to the order.

Preserves complete names

Leaves the order unchanged when the FullName already contains multiple words.

Records execution results

Logs the order number, original name, updated name, unchanged status, errors, and completion.

Input Parameters

Add Missing Last Name requires the following inputs:

ParameterRequiredDescription
OrderIdsYesThe Linnworks order IDs to process. These are supplied through the Rule Engine action.
SetLastNameYesThe fallback last name value appended when the delivery FullName contains only one word.

The updated name follows this format:

OriginalName SetLastName

For example:

Original FullNameSetLastNameUpdated FullName
JohnCustomerJohn Customer

Name Update Rules

The macro applies the following customer-name rules:

Customer FullName ConditionMacro Behaviour
FullName contains one wordAppends the configured SetLastName value.
FullName contains more than one wordLeaves the customer information unchanged.
Order is supplied through OrderIdsProcesses the order through the configured Rule Engine action.
Customer information is updatedSaves the revised FullName back to the Linnworks order.

Important: The configured SetLastName value is appended exactly as entered in the macro configuration.

Example Scenario

When an order contains the following customer name:

The macro updates the FullName to:

Updated Customer Full Name

John Customer

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.

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.

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.

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.