# Missing Phone Number and Email

<figure><img src="/files/55wmjk6iXKOeVrw7P7Qk" alt=""><figcaption></figcaption></figure>

The *Missing Phone Number and Email* application contains a macro that runs as the [*Rules Engine*](https://docs.linnworks.com/articles/documentation/rules-engine-actions)[ action](https://docs.linnworks.com/articles/documentation/rules-engine-actions). This macro automatically fills in the shipping address phone number and email in the open order details with the default one from the preset configuration if it was initially empty.

This guide provides a step-by-step explanation of how to install and set up the macro in Linnworks.

### Start using the macro

There are three steps you need to complete to start using the macro:

1. Install the application.
   * Go to *Apps > Application Store > Missing Phone Number and Email >* click Install and follow the on-screen instructions until the installation is complete.
2. Configure the macro.
3. Configure the rule in the *Rules Engine* screen.

#### Configure the macro

Once the *Missing Phone Number and Email* app is installed:

1. &#x20;Go to *Apps > Macro Configuration* and click  <mark style="color:purple;">+ Add new configuration.</mark>

   <figure><img src="/files/B8wMrMJeWVEJX60T9xug" alt=""><figcaption></figcaption></figure>
2. Select the *MissingPhonenumberandEmail* macro and click  <mark style="color:purple;">Create Configuration.</mark> <mark style="color:purple;">.</mark>

   <figure><img src="/files/GvrlPuyyVYqHps3if8z6" alt=""><figcaption></figcaption></figure>
3. In the *Macro Configuration* screen, specify the below details and click *Save*:

   <figure><img src="/files/98mTJ9J0of1oFRQF3HXp" alt=""><figcaption></figcaption></figure>
4. Make sure to enable the macro to continue with the *Rules Engine* configuration.

<figure><img src="/files/UpcTpXIGBYUwl6X25eU7" alt=""><figcaption></figcaption></figure>

**Functionality:**

1. **Parameter Input:**
   * `OrderIds`: List of OrderIds representing the open orders for which the phone numbers and email addresses need to be checked and potentially updated.
   * `DefaultPhoneNumber`: Default phone number to be used if the shipping address phone number is initially empty.
   * `DefaultEmailAddress`: Default email address to be used if the shipping address email is initially empty.
2. **Rules Engine Integration:**
   * The macro operates within a Rules Engine environment, allowing it to be triggered based on predefined conditions or scheduled intervals.
3. **Data Check and Update:**
   * For each order in the provided list (`OrderIds`), the macro examines the shipping address details.
   * If the phone number or email address is initially empty, the macro fills in the missing information with the default phone number or email address specified in the configuration.
4. **Logging and Error Handling:**
   * The macro incorporates logging mechanisms to record its actions, ensuring transparency and facilitating troubleshooting in case of errors.

**Usage:**

* **Parameters:**
  * `OrderIds`: List of OrderIds representing open orders where phone numbers and email addresses need to be checked and potentially updated.
  * `DefaultPhoneNumber`: Default phone number to be used if the shipping address phone number is empty.
  * `DefaultEmailAddress`: Default email address to be used if the shipping address email is empty.
* **Execution:**
  * The macro is configured to run within a Rules Engine environment, either triggered by specific events or scheduled to execute at defined intervals.
  * Upon execution, it takes the provided list of OrderIds and default values for phone numbers and email addresses as input.
  * The macro iterates through each order, checks the shipping address details, and updates them if phone number or email address fields are empty.
* **Outcome:**
  * Orders that originally had empty shipping address phone numbers or email addresses now have them filled with default values.
  * The macro helps ensure completeness and accuracy of shipping address information, which is crucial for communication and order processing.
  * Through logging, administrators can track the macro's actions and monitor changes made to orders.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rishvi.gitbook.io/rishviappdocuments/missing-phone-number-and-email.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
