WooCommerce Shipping: How Canada Post Address Validation works

Canada Post address validation

Canada Post Address Validation and Canada Posts AddressComplete are not alike but have the same purpose, to validate addresses while filling up online forms. In this article we will cover Canada Posts’ AddressComplete tool. We will also cover the function of Canada Post Address Validation within the Canada Post Shipping plugin for WooCommerce.

Canada Post Address Validation

What is AddressComplete and is it any different from Canada Post address validation?

Canada Post provides its users with a premium feature called AddressComplete. Customers are able to fill up their shipping address form with ease.

Start by typing the address or your postal code and AddressComplete takes care of the rest by providing you with suggestions in a drop-down. The suggestions provided in the drop down are obtained from some of the major Postal service providers in the world. Canada Post acquires this information by going over the master international data set (a complex tool to minimise any and all error) and further supplementing those values with the address data received from the Postal service providers. This is ideal for those e-commerce business owners who would prefer a faster and accurate checkout experience.

You can achieve this by either typing the First line of the Address; the Street Name; City; Country or Postal Code.

Canada Post Address Validation on the other hand is not far off, here you are able to confirm if the address entered into the form is a valid address or not. Notifications, error messages and generally pop-ups appear in instances when any address that is entered fails its Canada Post Address Validation check. This prevents the customer to proceed with their checkout until and unless a valid address has been entered.

Is AddressComplete from Canada Post Free to use?

No. Unfortunately, Canada Post provides users with a 14 day Free trial post which there are a number of plans which can be purchased based on the volume of entries each store receives. You can read on to find out more.

Why would a store owner use AddressComplete?

As a store owner it is important to make sure that your customers have a seamless experience while completing their checkout formalities. AddressComplete helps both the Shipper as well as the Recipient by providing them with the following advantages:

  • It speeds up the checkout process for your customers by cutting keystrokes by nearly 80%
  • Does not permit duplicates and will ensure that the addresses entered are done so in a standard and consistent format.
  • Populates accurate addresses and ensures that deliveries and invoices get shipped to the right place thus cutting down on missed deliveries.
  • Utilises a next-gen search logic that provides accurate addresses regardless of the spelling entered by customers.

AddressComplete works well and is normally used in the following cases

  • Submitting Online Registration Forms
  • E-commerce websites (shipping addresses & billing addresses)
  • Point of Sale (machines used by physical store owners who have to enter forms and complete tasks in a timely manner.
  • Call Centre employees to submit detailed forms containing addresses.

Does AddressComplete support International/Overseas addresses and if so what is the benefit behind this?

Yes. AddressComplete does work with International and Overseas addresses. AddressComplete provides users with the ability to choose language and format for the specific country. Thus, you can have the addresses on mails and documents sent to International addresses in their appropriate language, format and will reduce the possibility of misspellings.

Customising AddressComplete for your E-Commerce website

AddressComplete is a customizable tool that gives the store owner the ability to restrict where and when AddressComplete is to be used. There are 4 areas in AddressComplete that are customizable, these are:

Countries limiter — Manually set the countries you would prefer AddressComplete to work for.
Find country by IP — Automatically detects the IP address of the person filling up the form and provides addresses based on his/her location.
Single language — Manually set the preferred language of choice.
Valid IP addresses —Manually set AddressComplete to limit a specific IP address or user.

How do we go ahead and sign-up for AddressComplete?

If you’re an interested customer/store owner you can sign-up for the 14 day trial provided by Canada Post. You can do so by clicking on this link.

Choose the plan that’s most appropriate for your expected usage and go over the official page to be up to date in case of any policy changes.

The available plans post completion of the trial period are:

Low Volume users

Plans $100 $240 $450 $850 $2,000
Total look-ups 1000 2500 5000 10000 25000
Cost per lookup
Canadian addresses only*
10¢ 9.5¢ 8.5¢

High Volume users

Plans $3,750 $7,000 $13,000 $16,500 $20,000
Total look-ups 50000 100000 200000 300000 500000
Cost per lookup
Canadian addresses only*
7.5¢ 6.5¢ 5.5¢

*NoteAddressComplete is a service that can be utilised on multiple sites. In order to have AddressComplete setup for more than one website you will have to create a new installation for the sites you would require it to be enabled on. Doing so gives the store owner the ability to set customise the security for each website at no extra charge.

Implementing AddressComplete for your WooCommerce store

The set-up is fairly easy and is not time consuming. Once the sign-up has been completed, you will be provided with a list of steps to follow in order for AddressComplete to successfully function in your website. In order to do you, you will have to

  • Start by entering the URL for which you will be using AddressComplete. Doing so, provides security for that URL and the AddressComplete snippet will not work on another domain or URL.
  • Copy the code snippet and paste it into the HTML source of your website and have that uploaded onto your server.
  • Now, load the web page in your browser match your address fields to the appropriate AddressComplete result.
  • Under “Valid URLs”, in the dashboard enter the URLs where you plan to use AddressComplete. These are measures which must be taken to prevent anyone else from using your account
  • Once done, your set-up has been completed. You can now proceed by adding extra information and secure the installation.
  • The trial period is for a total of 14 days post which you will have to enter your credit card details to complete payment. This must be done in order to keep AddressComplete function enabled and functioning.

*FYI* – A code snippet is a portion of source code that is included into the main HTML of the website with the help of an editor program. 

Sample screenshots of the functionality of AddressComplete

  • In the first screenshot, you see an option toward the bottom right corner of the drop-down. This enables the user to select the country of choice.
Canada post Address Validation
Country selection
  • The second screenshot depicts the list of addresses in Canada beginning with the number 2
Canada post Address Validation
Address Selection
  • Select and International/Overseas country and the drop-down provides you with the list (176 addresses – shown below)
Canada post Address Validation
International Address

5 suggestive tips to customise AddressComplete for your web store.

  • You’re able to match AddressComplete to the width of the address field. Doing so, ensures that AddressComplete will not appear longer or shorter than the address field. (replace the values ‘300’ for height and width with the desired dimensions)
<script type=”text/javascript”>
addressComplete.listen(‘ready’, function() {
addressComplete.setWidth(300);
addressComplete.setHeight(300);
});
</script>
  • As a website owner you are able to change the font and colour of the results list shown in the drop-down. You can do this to match the appearance of your website. (replace ’15px Verdana with the size and font of your choice; replace #4682b4 with the colour code you’d require’)
<script type=”text/javascript”>
.pca .pcatext {
font: 15px Verdana;
color: #4682b4;
}
</script>
  • Set boundaries of your service area by disabling those areas where your business would not operate. (replace ON and QC with the appropriate province codes. Similarily, you can also do the same with cities and postal codes. You can customize the error message with the wording of your choice)
addressComplete.listen(‘load’, function(control) {
control.listen(“populate”, function (address) {
if ( address.ProvinceCode == “ON” || address.ProvinceCode == “QC”) { //EXAMPLE – do not deliver to ON or QC alert(“Sorry, we do not deliver to your province.”);
}
});
});

Tip: Modify the code to trigger a message while entering other address elements such as, cities and postal codes.

  • You can also hide the ‘Select Country’ option at the footer of the drop-down. Limit this only if your business ships to one country. (change ‘false’ to ‘true’ if you will require the ‘Select Country’ option in the footer of the drop-down)
<script type=”text/javascript”>
addressComplete.listen(‘options’, function(options) {
options.bar = options.bar || {};
options.bar.showCountry = false;
options.bar.showLogo = false;
});
</script>
  • As a website owner you can even specify if the customer will have the ability to manually enter the address. Make use of this option when particular address which are entered may not be in the database. (replace the text in the sample code in case you would require a different message to appear)
//modify options – persistent bail option
var controlToHide = null;
function AddressCompleteLoaded(ctrl)
{
controlToHide = ctrl;
ctrl.messages.en.KEEPTYPING = “<a href=’Javascript: HideAC();’>I don’t see my address. Let me type it in.</a>”;
ctrl.messages.fr.KEEPTYPING = “<a href=’Javascript: HideAC();’>Je ne vois pas mon adresse. Je vais l’entrer manuellement.</a>”;
}
function HideAC()
{
controlToHide.manualEntry ();
}

Canada Post Address Validation with WooCommerce

Canada Post address validation

WooCommerce does not provide standalone Canada Post Address Validation. You will be able to obtain Canada Post Address Validation in 2 ways; namely:

  1. By purchasing AddressComplete from Canada Post for your store
  2. By purchasing the Canada Post Shipping plugin for WooCommerce

You are able to generate shipping labels and fetch Real-time rates from the Canada Post API with the help of the Canada Post Shipping plugin. Store owners are given the Canada Post Address Validation feature in the Live environment ONLY. Unlike AddressComplete where the API is able to provide you with a list of addresses in a drop-down to choose from, Canada Post Address Validation has been pre-defined within the plugin and will determine if the Zip/Postal code entered is valid and matches that of a location which is serviceable.

  • Proceed to the cart page and enter the wrong or incorrect ZIP. The error message will appear above the cart as shown in the red banner (below). Stating ‘Please enter a valid postcode/ZIP
Canada Post Address Validation
Error in the Cart page
  • The customer is notified when a wrong/incorrect ZIP is typed out on the checkout page. This states ‘Billing Postcode/ZIP is not a valid postcode/ZIP. Shipping Postcode/ZIP is not a valid postcode/ZIP. No shipping method has been selected. Please double check your address, or contact us if you need any help.
  • This will not permit a customer to proceed to complete payment for the order. In the instance where there is Flat Rate shipping services or Free Shipping services; the order will get processed and is up-to the Store owner to get in touch with the customer to obtain the right address or the order will get cancelled.
Canada Post Address Validation
Error on Checkout page

 

  • The store owner will receive this error message in the Order Details page of his store. This will not permit the store owner to ship the product nor Generate packages and create Shipping labels

(Canada Post Create Shipment Error:Error Code: Server Error Msg: /rs/0002008260-0008789159/0002008260/shipment: cvc-simple-type 1: element {http://www.canadapost.ca/ws/shipment-v7}requested-shipping-point value ‘T1Y2EE’ is not a valid instance of type {http://www.canadapost.ca/ws/shipment-v7}PostalCodeType)

Canada Post Address Validation
Error message while Generating packages

Conclusion…

Upon reading the article you will be able to understand the usage and importance of Address Validation for your WooCommerce store. Canada Post Address Validation which has been widely requested by many WooCommerce store owners and allows them to have the correct and accurate address entered in cart and checkout page. That alongside AddressComplete, there would be no more missed deliveries based on wrong addresses. Rather this feature within the plugin will be one of the reasons behind a happy customer and a pleased store owner.

If you are having issues or face any difficulty setting up the plugin, reach our customer support team. We will surely help you out.

 

Leave a Reply