Rule MacroRIS-RM-2252 – ADD MISSING LAST NAME IN OPEN ORDER

Add Missing Last Name

Automatically add a last name to Linnworks orders where the customer gave only one name, so courier labels always show a full name.

Overview

Add Missing Last Name is an automated order-cleaning solution for Linnworks. It finds orders where the customer's name is a single word and adds a last name that you choose.

The macro runs through the Linnworks Rules Engine. It checks the full name on the shipping address and, if there is no last name, adds yours after the first name. Orders that already have a full name are left as they are.

Many couriers need both a first and last name on the label. This macro fills the gap automatically, so these orders do not get stuck at despatch.

Add Missing Last Name helps you avoid courier label errors, save time editing names by hand and keep orders moving.

Video Walkthrough

Configure the Macro

Once the app is installed, please create a macro configuration. This tells Linnworks which macro to run and lets you select it in the Rules Engine.

You can change this set-up at any time to suit how you work.

Steps to Configure

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

Macro Configuration screen with the Add new configuration button
Macro Configuration screen with the Add new configuration button

Who Should Use Add Missing Last Name

Key Features

How Add Missing Last Name Works

Add Missing Last Name follows the same steps each time it processes one or more orders. The Rules Engine starts it and sends it the matching orders automatically.

Step 1: The setting is checked

The macro reads your SetLastName value. If it is blank, the macro stops straight away and does not change any order.

Step 2: The customer name is read

For each order, the macro reads the full name on the shipping address. Orders with no address or an empty name are skipped.

Step 3: Single-word names are completed

If the name is one word, such as "John", the macro adds your last name to make "John Customer". Names with two or more words are left unchanged.

Step 4: The order is saved

The macro saves the new name on the order and on the customer record in Linnworks.

Key Benefits

The macro replaces the manual job of finding orders with a single name and typing in a last name before despatch.

Complete names mean fewer courier rejections and faster despatch.

Usage of App

Add Missing Last Name runs through the Linnworks Rules Engine to complete customer names on the orders you choose.

Execution

Once your rule is active, the macro runs automatically on every order that matches it. You can also run it yourself on the orders you choose. This is handy for testing, or for orders that need it straight away.

Quick path: Orders > Open Orders → select your orders → Actions → Other actions → Run rules engine → Add Missing Last Name

Select your orders

Go to Orders > Open Orders and tick the box next to each order you want the macro to process.

Open the Actions menu

Click the Actions button at the top left of the screen. You can also right-click any of the selected orders.

Go to Other actions > Run rules engine

Point to Other actions, then Run rules engine. A list of your rules appears.

Choose your rule

Click the name of the rule you created in Step 6 of Steps to Configure, for example Add Missing Last Name. The macro runs on the selected orders straight away.

Good to know: The rule's conditions still apply, so the macro only changes selected orders that match them. If you choose All instead of your rule's name, every active rule runs on the selected orders.

Outcome

When the macro runs on an order, it:

Reads the customer name

The macro checks the full name on the shipping address.

Adds the last name

A single-word name such as "John" becomes "John Customer" when SetLastName is Customer.

Please note: The macro changes the customer name directly on the order and on the customer record in Linnworks. We recommend testing on a few orders first.

Input Parameters

You enter this macro's only setting, SetLastName, in Step 3 of Steps to Configure. Please fill it in, as the macro does not change any order while it is blank.

The Rules Engine sends the matching orders to the macro automatically, so you do not need to enter any order numbers.

The following behaviour is built into the macro and cannot be changed on the Macro Configuration screen:

SettingDescription
Field checkedThe full name on the shipping address only. The billing name is not changed.
Single-word nameA name with no space in it, such as "John" or "Mary-Jane".
Customer recordThe updated name is also saved to the customer record in Linnworks.

Best Practices

A few simple checks before you switch the rule on will give you the best results.

FAQ

How is Add Missing Last Name triggered?

The macro runs through the Linnworks Rules Engine. When an order matches your rule, the Rules Engine sends it to the macro automatically.

Can I run the macro on an order straight away?

Yes. Select the orders in Orders > Open Orders, then click Actions or right-click them. Choose Other actions > Run rules engine and select the rule name you created in Step 6. The rule's conditions still apply.

Does the macro need any settings?

Yes. Please enter a last name in SetLastName, for example Customer. This is the only setting.

What happens if SetLastName is left blank?

The macro stops without changing any order and records the reason in the macro log. Please add a last name and run it again.

Which names does the macro change?

Only names that are a single word with no space, such as "John". Names such as "John Smith" or "Mary Ann Jones" are never changed.

Does the macro change the billing name?

No. It changes only the full name on the shipping address.

Is the customer record in Linnworks updated too?

Yes. The new name is saved on the order and on the matching customer record.

What happens if the macro runs on the same order twice?

Nothing changes the second time. The name already has two words, so the macro leaves it alone.

Does the macro add an order note?

No. You can see each change in the macro log in Linnworks.

What happens if many orders are sent at once?

The macro works within the Linnworks time limit for macros. If time runs short, it stops before starting the next order. Orders it did not reach are left untouched and are processed the next time the rule runs on them.

Please review these pages to understand how data is handled and the terms that apply to this application.

Summary

Add Missing Last Name automatically completes customer names on the Linnworks orders you choose.

Once it is set up through the Rules Engine, the macro adds your chosen last name to any single-word name. Orders that already have a full name are left unchanged.

If an order does not give the expected result, please check that the macro configuration is enabled and that SetLastName is filled in. Please also make sure the order matches your rule's conditions.