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

# Missing Phone Number and Email

Automatically update missing customer phone numbers and email addresses in selected Linnworks orders using predefined default values.

Incomplete customer contact information can create delays during order processing, dispatch, and courier validation. The *Missing Phone Number and Email* macro helps ensure selected Linnworks orders contain the required customer phone number and email address before they move further through the fulfilment process.

This macro checks each selected order, identifies missing or placeholder contact details, and applies predefined default values where required. By automating this process, your team can reduce manual corrections, improve dispatch readiness, and avoid unnecessary fulfilment delays.

With this automated approach, you can maintain cleaner order data and ensure selected orders are updated consistently before dispatch.

> Keep order contact information complete by automatically filling missing phone numbers and email addresses before fulfilment.

## **Configure the Macro**

Once the app is installed, you need to create a macro configuration so the system knows which macro to run, when to run it, and which default contact details should be applied.

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 AddMissingPhoneAndEmail macro and click Create Configuration**

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

    This creates a new configuration where you can define the schedule and required parameter values.
  </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/1779094314455-icpe6gvxlka-pasted-image-1779094310964.png?fm=auto&auto=compress%2Cformat" width="680" height="522" alt="" />
  </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/1779095728767-km6ectvk9m-pasted-image-1779095724362.png?fm=auto&auto=compress%2Cformat" width="1264" height="26" 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="" />

    **Key Benefits**
  </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/1779094744747-qxi8n52k1it-pasted-image-1779094741449.png?fm=auto&auto=compress%2Cformat" width="299" height="177" alt="" style="width: 299px; 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/1779100000574-lo0y3cd9nd-pasted-image-1779099997216.png?fm=auto&auto=compress%2Cformat" width="600" height="389" alt="" style="width: 600px; height: auto; cursor: pointer; margin: 0 auto;" />
  </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/1779100219014-08dr6h5kxpm4-pasted-image-1779100215735.png?fm=auto&auto=compress%2Cformat" width="622" height="120" alt="" />

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

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

    `MissingPhoneAndEmail`

    - Set **Action type** to:

      `Execute a macro`

    - In **Action value**, select:

      `AddMissingPhoneAndEmail`

    - 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/1779101249445-t41mxgzx2p-pasted-image-1779101245049.png?fm=auto&auto=compress%2Cformat" width="1306" height="578" alt="" />

    - Verify the condition and action are connected correctly

    - Click **Save** in the bottom-right corner to save the rule
  </Tab>
</Tabs>

Missing phone numbers and email addresses can cause operational issues, especially when couriers or fulfilment teams require complete customer contact details. This macro helps reduce those issues by automatically correcting selected orders.

<Columns cols="2">
  <Card title="Reduce Manual Order Checks" icon="alarm-check" horizontal="false" target="_self">
    Eliminates the need to manually open each selected order and check whether customer phone numbers or email addresses are missing.
  </Card>

  <Card title="Improve Dispatch Readiness" icon="boxes" horizontal="false" target="_self">
    Ensures selected orders contain the contact information needed before dispatch processing begins.
  </Card>

  <Card title="Prevent Courier Issues" icon="bell" horizontal="false" target="_self">
    Helps avoid courier validation problems caused by missing phone numbers or email addresses.
  </Card>

  <Card title="Maintain Cleaner Order Data" icon="bar-chart-big-icon" horizontal="false" target="_self">
    Keeps customer contact fields more consistent by applying predefined default values where data is missing.
  </Card>

  <Card title="Save Operational Time" icon="lucide-fast-forward" horizontal="false" target="_self">
    Allows teams to correct multiple orders in one macro run instead of updating each order manually.
  </Card>

  <Card title="Update Only When Needed" icon="lucide-message-circle-x" horizontal="false" target="_self">
    The macro updates an order only when the phone number or email address needs to be changed.
  </Card>
</Columns>

### How It Works

The macro checks each selected order and updates only the missing or placeholder contact fields. It does not overwrite existing valid contact details.

<Steps>
  <Step title="Step 1" icon="airplay-icon" title-type="p">
    The macro starts execution and writes **Macro Start** to the log.
  </Step>

  <Step title="Step 2" icon="airplay-icon" title-type="p">
    It loops through each order ID provided in the **OrderIds** parameter.
  </Step>

  <Step title="Step 3" icon="airplay-icon" title-type="p">
    For each order, the macro retrieves the order details using the Linnworks Orders API.
  </Step>

  <Step title="Step 4" icon="airplay-icon" title-type="p">
    It checks the customer phone number. If the value is empty or equals **Phone number: N/A**, the macro applies the configured default phone number.
  </Step>

  <Step title="Step 5" icon="airplay-icon" title-type="p">
    It checks the customer email address. If the email address is empty, the macro applies the configured default email address.
  </Step>

  <Step title="Step 6" icon="airplay-icon" title-type="p">
    If any contact information was changed, the macro saves the updated customer information back to the order.
  </Step>

  <Step title="Step 7" icon="airplay-icon" title-type="p">
    The macro logs any errors and writes **Macro Finished** when execution ends.
  </Step>
</Steps>

### **Usage of App**

This macro is designed to update selected orders automatically once the required parameters are configured. It is useful before dispatch, during order validation, or whenever selected orders need contact information cleanup.

<Card title="OrderIds" horizontal="false" target="_self">
  Defines the Linnworks order IDs that should be processed. Only these selected orders are checked and updated.
</Card>

<Card title="DefualtPhoneNumber" horizontal="false" target="_self">
  Defines the phone number that will be applied when an order has an empty phone number or the placeholder value **Phone number: N/A**.
</Card>

<Card title="DefualtEmailAddress" horizontal="false" target="_self">
  Defines the email address that will be applied when an order has no customer email address.
</Card>

<Card title="Order Update Behaviour" horizontal="false" target="_self">
  The macro updates customer information only when at least one contact field has changed.
</Card>

<Card title="Execution Logging" horizontal="false" target="_self">
  The macro records the start, errors, and completion of the process using the macro logger.
</Card>

### **Key Points to Remember**

- The macro processes only the order IDs provided in **OrderIds**

- Existing valid phone numbers are not overwritten

- Existing valid email addresses are not overwritten

- Phone numbers are updated only when empty or set to **Phone number: N/A**

- Email addresses are updated only when empty

- The parameter names in the code are spelled **DefualtPhoneNumber** and **DefualtEmailAddress**

Once the macro is running, it helps ensure selected orders have the basic customer contact details required for smooth order processing.

### **What You Can Expect**

- **Missing phone numbers are automatically updated**\
  Orders with empty phone numbers or the placeholder value **Phone number: N/A** receive the configured default phone number

- **Missing email addresses are automatically updated**\
  Orders without an email address receive the configured default email address

- **Only required updates are saved**\
  Orders are updated only when customer contact information changes

- **Execution is logged**\
  The macro records when it starts, finishes, and if an error occurs

- **Improved dispatch preparation**\
  Orders are more likely to contain the contact details required before fulfilment

### **Overall Impact**

This macro improves order data completeness, reduces manual corrections, and helps prevent dispatch delays caused by missing customer phone numbers or email addresses.

### What To Do After the Macro Runs

After the macro has completed, review the selected orders if needed to confirm that missing contact information has been populated correctly.

### **Steps to Follow**

<Steps>
  <Step title="Step 1" title-type="p">
    Open Linnworks and locate the orders included in the **OrderIds** parameter.
  </Step>

  <Step title="Step 2" title-type="p">
    Review the customer contact details on the affected orders.
  </Step>

  <Step title="Step 3" title-type="p">
    Confirm that missing phone numbers were replaced with the configured default phone number.
  </Step>

  <Step title="Step 4" title-type="p">
    Confirm that missing email addresses were replaced with the configured default email address.
  </Step>

  <Step title="Step 5" title-type="p">
    Continue with normal order validation, picking, packing, or dispatch processing.
  </Step>
</Steps>

### **Why This Matters**

Keeping contact details complete helps:

- Reduce courier-related validation issues

- Prevent dispatch delays

- Avoid manual order correction

- Improve order processing accuracy

- Keep customer information consistent

### Best Practices

To get the most value from this macro, configure default values carefully and use the macro as part of your order validation process.

### **Recommended Guidelines**

- **Use realistic default values**\
  Make sure the default phone number and email address are accepted by your operational workflow and courier requirements

- **Run before dispatch**\
  Use the macro before dispatch processing so contact details are corrected before labels or courier services are applied

- **Review selected orders carefully**\
  Ensure the correct order IDs are passed into the macro before running it

- **Avoid using customer-specific defaults**\
  Since the macro applies predefined values, use only approved generic values where appropriate

- **Check logs after execution**\
  Review macro logs to confirm successful completion or identify any errors

> Correct contact information helps keep order processing smooth and reduces avoidable fulfilment delays.

### **Example Scenario**

To better understand how this works, here’s a simple example:

Configured values:

- **DefualtPhoneNumber** = 0000000000

- **DefualtEmailAddress** = [noemail@example.com](mailto:noemail@example.com)

Selected orders:

- **Order A** has no phone number and no email address → Both fields are updated

- **Order B** has **Phone number: N/A** and a valid email address → Phone number is updated only

- **Order C** has a valid phone number and no email address → Email address is updated only

- **Order D** has both phone number and email address → No update is made

### **What This Means**

- Only missing or placeholder contact values are updated

- Existing valid customer contact details are preserved

- Your team can focus on processing orders instead of manually correcting contact fields

## **Final Summary**

The *Missing Phone Number and Email* macro helps keep selected Linnworks orders ready for dispatch by automatically filling missing customer contact details with predefined default values.

By reducing manual checks, improving data completeness, and updating only the orders that require correction, this macro supports smoother fulfilment and more reliable order processing.
