> For the complete documentation index, see [llms.txt](https://rishvi.gitbook.io/rishviappdocuments/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rishvi.gitbook.io/rishviappdocuments/missing-phone-number.md).

# Missing Phone Number

RIS-RM-1029 MissingPhoneNumber

The Missing *Phone Number* 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 in the 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 >* 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* app is installed:

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

   <figure><img src="https://2079576606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFRkrZGowwT8Xbb5HKclZ%2Fuploads%2FNpq21HmKJ6r4W5YZ0Yhp%2FAddOrderNoteMacro%20-%20AddNew.png?alt=media&amp;token=d20f691f-8e50-4e49-a80a-440d0830a9c7" alt=""><figcaption></figcaption></figure>
2. Select the Missing *Phone Number* macro and click  <mark style="color:purple;">Create Configuration</mark>.

<figure><img src="https://2079576606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFRkrZGowwT8Xbb5HKclZ%2Fuploads%2FBCbta2YRxTuovECVnHg7%2Fmissing3.PNG?alt=media&amp;token=2a5aa65c-8bce-4425-b45b-b65f8c93fee5" alt=""><figcaption></figcaption></figure>

3. In the *Macro Configuration* screen, specify the below details and click *Save*:<br>

* Configuration name (*required*): The name of the configuration. This field is required; without it, the system will not allowed to save the configuration.
* Default phone number (*required*): In the *Value* field, specify the default phone number to be added to orders with the shipping address phone number initially empty.&#x20;

<figure><img src="https://2079576606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFRkrZGowwT8Xbb5HKclZ%2Fuploads%2Fk9hNwIVc7gMFGrVKQ6Ws%2FMISSING4.PNG?alt=media&amp;token=bb7cc55a-5bc3-45c9-bd8a-35bfcbb30017" alt=""><figcaption></figcaption></figure>

4. Make sure to enable the macro to continue with the *Rules Engine* configuration.<br>

<figure><img src="https://2079576606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFRkrZGowwT8Xbb5HKclZ%2Fuploads%2F6zp6dmxGc3bUecEZAuoh%2FMISSING5.PNG?alt=media&amp;token=fd8246cf-b4f1-4bbc-9153-bebb5479796e" alt=""><figcaption></figcaption></figure>

**Functionality:**

1. **Identify Orders**: The macro takes a list of OrderIds as input to identify orders with missing phone numbers.
2. **Default Phone Number**: It also takes a default phone number as input, which will be used to fill in missing phone numbers.
3. **Rules Engine**: The macro operates within a rules engine or scheduling system to regularly check for orders with missing phone numbers.
4. **Processing Logic**: For each order in the provided list, the macro checks if a phone number is missing.
5. **Update Phone Number**: If a phone number is missing, the macro updates the order with the default phone number provided.
6. **Logging and Notifications**: It logs actions taken, such as orders processed and phone numbers updated. Notifications can be implemented to alert administrators or users about orders that were updated.

**Usage:**

* **Parameters:**
  * `OrderIds`: List of OrderIds for which phone numbers need to be checked and updated.
  * `DefaultPhoneNumber`: Default phone number to be used for orders with missing phone numbers.
* **Execution:**
  * The macro is executed within a rules engine or scheduled system at predefined intervals.
  * It takes the list of OrderIds and the default phone number as parameters.
  * The macro iterates through the provided list of orders, checks for missing phone numbers, and updates them if necessary.
* **Outcome:**
  * Orders that originally had missing phone numbers now have the default phone number associated with them.
  * The macro ensures that all orders have valid phone numbers, which is crucial for communication and shipping purposes.
  * Logs and notifications provide transparency and allow administrators to track the actions taken by the macro.
