# How Intelligent Address Formatting Works

### <span style="color: rgb(245, 89, 64);">**Overview**</span>

Voila empowers users with the capability to validate both domestic and international addresses before generating labels. This functionality mitigates the risk of failed deliveries stemming from inaccurate address information. As part of our commitment to enhancing delivery services, we are pleased to provide this feature to all our users at no cost.

This documentation elucidates the utilisation of this valuable feature and expounds upon the techniques employed by the Intelligent Address Formatter.

#### <span style="color: rgb(245, 89, 64);">**Intelligent Address Formatting**</span>

<span data-preserver-spaces="true">Only accurate or complete customer data can lead to a critical issue, often concerning incorrect address information. To address this challenge, we introduce the "format\_address\_default" parameter in the shipment object of the create-label request. Enabling this parameter activates the Intelligent Address Formatting feature for the associated request.</span>

<span data-preserver-spaces="true">By activating this feature, the system smartly handles scenarios where requested alterations conflict with a specific courier's capabilities. In such cases, incompatible adjustments are gracefully bypassed, thereby preventing label request rejections.</span>

<span data-preserver-spaces="true">Beneath, we outline a comprehensive array of methods employed by the Intelligent Address Formatter to rectify these concerns. An illustrative sample of the addressing section within a label request is visualised in the image below.</span>

<video controls="controls" height="477" src="https://shipping-documentation.despatchcloud.app/attachments/205?open=true" style="width: 848px; height: 477px;" width="848"></video>

<p class="callout info">Click to Play or Pause the Video</p>

<span data-preserver-spaces="true">Methods of Intelligent Address Formatting:</span>

- **<span data-preserver-spaces="true">ISO and Country Harmony:</span>**<span data-preserver-spaces="true"> Voila quickly intervenes when a particular courier necessitates the human-readable country name and its corresponding ISO code. It automatically populates the country name based on the provided ISO code. For instance, "GB" is transformed into "United Kingdom."</span>
- **<span data-preserver-spaces="true">Standardisation via State Codes:</span>**<span data-preserver-spaces="true"> For shipments headed to the US, Canada (CA), or Australia (AU), human-readable county values are converted into ISO format. For instance, "Florida" becomes "FL," and "New South Wales" becomes "NSW."</span>
- **<span data-preserver-spaces="true">Phone Country Validation:</span>**<span data-preserver-spaces="true"> The Intelligent Address Formatter eliminates symbols from phone numbers (except for "+"). Additionally, an extra check confirms whether the provided number falls within the 11-14 character range for shipments bound for GB. If compliant, the number remains unchanged; if not, it defaults to "01111111111."</span>
- **<span data-preserver-spaces="true">Default Phone Number Fill:</span>**<span data-preserver-spaces="true"> In cases where a phone number isn't specified in the request, a default value of "01111111111" is automatically inserted.</span>
- **<span data-preserver-spaces="true">Rectification of Phone Number Plus Symbol:</span>**<span data-preserver-spaces="true"> If your phone number includes a "+" symbol, it is replaced with "00."</span>
- **<span data-preserver-spaces="true">Default Email Address Insertion:</span>**<span data-preserver-spaces="true"> When no email address is provided, a default value of "\[email protected\]" is used.</span>
- **<span data-preserver-spaces="true">Name Auto-Population:</span>**<span data-preserver-spaces="true"> When a "company\_name" is provided but not a "name," the "company\_name" value is duplicated into the "name" field.</span>
- **<span data-preserver-spaces="true">UK Post Code Correction:</span>**<span data-preserver-spaces="true"> The system validates and corrects postcode formatting for shipments destined for GB, ensuring accurate presentation to the courier. Adjustments could involve proper spacing between the prefixes and suffixes.</span>
- **<span data-preserver-spaces="true">Address Line Length Management:</span>**<span data-preserver-spaces="true"> If Address Line 1 exceeds the courier's character limit, it is automatically split into Address Line 2. Similarly, if Address Line 2 exceeds the limit, it's divided into Address Line 3.</span>