Address Object:FAQ

From Melissa Data Wiki
Jump to navigation Jump to search

← Address Object


Address Object Field Maximum Lengths

Maximum Field lengths are a bit of a tricky topic. Address Object does not have any built in maximum length. The effective maximum length depends on two factors:

  • The length of the data available from the USPS and CanadaPost
  • The length of the input data


For addresses that we do not code

We will return the input (sometimes with a few standardizations, if possible) back to the user. This effectively makes the output length the same as the input length. We do not truncate the input data to fit a pre-determined field length.


For addresses that we do code

We are, in essence, returning the official postal data. The maximum length is effectively the same as the longest data string in the source data.

  • Note
Since addresses change and are added frequently, this is a number that constantly changes. It is important to put a buffer to account for future cases. Our recommended maximum lengths below of coded records are based on this information.


USPS

Field Name Recommended Maximum Length
Company 75 characters (The company name is usually returned as is based on the input)
Address1 65 characters
Address2 Address2 is not part of the official address. Extra data like care of information will be returned here based on the input.
Suite 20 characters (This is one where we can code the address to the house number put pass through a suite from the input that is only any length)
PrivateMailbox 20 characters (This is one where there is no official source data for so the input is passed though as long as it is in the expected format)
City 35 characters
Urbanization 35 characters
State 2 characters
Zip 5 characters


CanadaPost

Field Name Recommended Maximum Length
Company 75 characters (The company name is usually returned as is based on the input)
Address1 65 characters
Address2 Address2 is not part of the official address. Extra data like care of information will be returned here based on the input.
Suite 20 characters (This is one where we can code the address to the house number put pass through a suite from the input that is only any length)
City 35 characters
State 2 characters
Zip 7 characters


Recommendations

Based on this information we recommend the maximum field lengths as:

  • Set the maximum field length to at least match the input maximum data length
  • Set the maximum field length to far beyond (100+ characters) the numbers of the source data above. In this day and age, storage space is much less a limiting factor than before. We suggest setting a length that guarantees nothing gets truncated.


Can we submit Unicode characters to Address Object?

Answer
No, you can't submit Unicode characters for address validation. Address Object accepts ASCII format only. Address Object won't be able to recognize Unicode characters. You may see sometimes that address object is returning valid address as invalid or throwing an unexpected error. Then there is strong possibility that your input data is in Unicode format. Almost every language supports the conversion of Unicode to ASCII format.


How Address Checking Process works?

Answer
Address Checking verifies and standardizes address data against the most current reference data from the U. S. Postal Service® and CanadaPost®.
The programming logic used by Address Check is CASS™ and SERP Certified™. This stringent certification ensures the quality of the data that is returned by the AddressCheck service and the certifications are renewed every calendar year.
Steps to validate an Address.
  1. Decide on a target area to search – Use the ZIP Code/City & State Postal Code/Municipality/Province fields to decide where to search for an address. If all three components agree the match is attempted. If they don’t agree, the logic favors the City & State over the ZIP/Postal code field. If City & State cannot be reconciled, it uses the ZIP/Postal Code field.
  2. Parse the address – breaks it into 9 possible categories of Range, Predirection, StreetName, Suffix, PostDirection, SuiteName, SuiteNumber, PMBName, PMBNumber.
  3. Look for that street name within the search area.
  4. If street name is found, check the remaining address components such as directionals, suffix and ranges. Fix what it possible and return back status codes indicating the results.
  5. If street name is not found, use a combination of reparsing and fuzzy matching to locate candidate records until a most likely candidate is found. Return back status codes indicating the results.
  6. Address Check service will Find Suggestions for candidate records. The Service returns possible correct addresses if the logic was unable to verify or correct the submitted address.


The basic methodology for Address Check is using an exact match the input address is referenced against the USPS or CanadaPost database. If the address cannot be matched the street name is then soundexed and the address parsed attempted till it can either be phonetically matched or fail matching. The Soundex algorithm works by stripping out consonants from street names and then trying to match the remainder. Directionals, Street Suffixes and Street Names can be rectified in some cases as well, but never an Address Range. The only time an Address Range can be fixed if it is Rural Route renumber or LACSLink address or when the Address is coded by chasing the Base alternate record. The City and State can be corrected only when the ZIPCode is valid and the ZipCode can be corrected if the City State is valid. Addresses are always returned standardized to postal specifications. Street becomes ST, Road becomes RD, etc: Standardization means that some conversion was done on the address (for example, changing Post Office Box to PO Box or abbreviating street suffixes)


How to script the monthly updates?

How do I automate getting and installing the monthly Address Object updates?

Answer
Melissa Data has provided a set of scripts to download the DQ Suite and its misc Address files every month. Download the scripts and insert your custom download links within the configuration params file and then set the scripts to run as a scheduled task. The Windows batch scripts are provided on the DQ Suite DVD, the monthly download in the extras-scripts directory and also here: http://www.melissadata.com/scriptcode. UNIX shell scripts will be available soon.


What are Unique ZIP Codes?

Answer
A unique ZIP Code is assigned to a company or organization. The USPS rule is that any information on the address line is acceptable when coding an address to a unique ZIP Code for which the object will always append a plus4 of 0001.


What are Multiple Matches?

Answer
A multiple match is an error in the national database in which two identical street ranges were found with different ZIP+4s. CASS rules state that Address Object cannot guess which ZIP+4 should be appended.


What are Vanity and Prestige City Names?

Answer
A vanity city name is an acceptable city name for the address and ZIP Code submitted. If the city name is an acceptable or vanity city name, the object will not change the city property. If the city appended is not acceptable, the object will change the city to the USPS referred city name.


What does General Delivery mean?

Answer
Addressing mail pieces with "General delivery" is intended primarily as a temporary means of delivery for transients and customers not permanently located, and for customers who want Post Office box service when boxes are not available. A postmaster may refuse or restrict general delivery so it is not available everywhere. Each general delivery mailpiece is held for no more than 30 days, although a shorter time period may be requested by the sender.


What is a Simplified Address?

Answer
A simplified address is derived from a DSF walk sequence list which includes 100% of addresses in a Carrier Route. A simplified address is CASS certified on a higher level than Address Object can perform, therefore it cannot be validated or CASS certified.


What is a CMRA?

Answer
CMRA stands for Commercial Mail Receiving Agency. These are companies that will receive and store you mail for you, like Mailboxes Etc. The individual mail boxes inside a CMRA are called private mailboxes. Address validation will detected the presence of a CMRA but cannot validate individual private mailboxes. Even if a private mailbox is missing, the CMRA iteself can often find the correct mailbox based on the name.


What is a Canadian Rural Postal Code?

Answer
A rural postal code in Canada is a postal code that designates a rural part of the country. In this case, most mail is deliverable based on local data, and CanadaPost regards any address input as valid when a rural postal code is present. A rural posta code is designated by a 0 in the 2nd digit.


What is a LVR Postal Code?

Answer
LVR stands for Large Volume Receiver and apply to Canadian addresses only. A LVR postal code is a postal code dedicated on a single Large Volume Receiver. These postal code behaves similarly to Unique Postal Codes for the US in that CanadaPost regards any address as valid when a LVR Postal code is present.


What is CASS?

Answer
CASS certification is designed in cooperation with the mailing industry to improve the accuracy of postal automation. CASS implies the existence of an address by validating the range of a street number and the street name. It provides a common measure by which to test the quality of address matching software and also addresses known deficiencies common across software products that require correction. Melissa Data CASS software is tested annually with a USPS provided test file to verify that sufficient overall percentage (98%) of the output addresses are coded correctly.


What Add-ons are available for Address Object and what do they do?

Answer
Add-on's are additional features for Address Object that require additional data files and can provide you with extra or increasingly accurate information.
DPV
Delivery Point Validation definitively confirms and validates the actual street number, not just the zip4 range as well as identifying CMRA's. Originally optional, DPV is required for CASS by the USPS and we recommend you always use this add-on.
LACSLink
LACS was developed in response to local 911 systems to convert business and residential rural route addresses to street-style addresses. These permanent address conversions typically involve renumbering and renaming rural route, highway route and box numbers as city-style addresses. Originally optional, LACSLink is required for CASS by the USPS and we recommend you always use this add-on.
Canada
This add-on allows the verification of canadian addresses through our SERP certified canadian engine.
RBDI
RBDI stands for Residential and Business Delivery Indicator. RBDI can identify whether an address is a business or a residence. This may be of valuable importance for shippers who use carriers that charge differently for residences and businesses.
SuiteLink
SuiteLink was added by the USPS in 2009 as part of the requirements in order to pass CASS Certification. SuiteLink provides the ability to append missing suite information based on the Company Name.
AddressPlus
AddressPlus, released in 2009, is a Melissa Data exclusive product that appends missing suite information based on the provided LastName. Thus if you have an address that is missing the required suite information, it is possible to retrieve this information given the last name. The AddressPlus database is consolidated from several different sources.
eLot
eLot stands for Enhanced Line of Travel. It is used by mailing customers to qualify for enhanced carrier route discounts by sorting their mail in the order that the mail carrier would deliver them.
EWS
EWS stands for Early Warning System from the USPS. EWS addresses are flagged by Address Check when they are scheduled for inclusion in the USPS database but are not added yet. The addresses are typically new high rises, or new housing subdivisions that are being assigned deliverable mail addresses. The EWS file when present in the Address Object directory ensures that addresses not present in the USPS master file will not be eliminated or coded inaccurately. The EWS file is updated weekly and can be downloaded via the Melissa Data HTTPS site to give customers the freshest new address information.


How much time does it take for new streets to show up in Address Object?

Answer
There is some lag in the data updates for new streets. It may take anywhere from a week to a month for that data to make it to us once the USPS adds the new street to their database. Additionally, since our updates are shipped every two months, it may take even longer for the new data to reach you [MelissaData does offer monthly instead of bi-monthly updates for faster updates]. So, depending on when the street name was added, it could take up to two months before the update reaches you.
However, there is a system in place call EWS (Early Warning System) that will alert you that although a street don’t not officially exist in the official database, it is scheduled for addition in the next update. The EWS file (which can be downloaded here: https://download.melissadata.com/Updates/ews.txt) is updated every week and will give you an error code of “W” if the street in contained in the EWS file. While EWS will be able to pick up new streets in one week of its addition to the USPS database, it will not be able to verify ranges on that street. You must wait for the official update for that.
For details on how to use EWS, please review the Address Object Reference Guide.


What fields are required for Address Verification?

Answer
To correctly validate an address, you need at least one of the following combinations: [Address,City,State] or [Address,ZIP]. It is recommended that you always use Address,City,State, and Zip. City/State and Zip can correct each other if one of them is incorrect.


What files are required in order to initialize the Address Object?

Answer
The files that must be present are when using PathToUSFiles:
mdAddr.nat
mdAddr.str
mdAddr.dat
mdAddr.lic
PathToCanadaFiles
mdCanada3.db
PathToDPVDataFiles
dph.dte
dph.hsa
dph.hsc
dph.hsf
dph.hsv
dph.hsx
lcd
month.dat
PathToLACSLinkDataFiles
mdLACS.dat
PathToSuiteLinkDataFiles
mdSteLink.dat
PathToRBDIDataFiles
mdRBDI.dat
PathToSuiteFinderDataFiles
mdSuiteFinder.db


How do I run Address Object in batch mode?

Answer
There is no batch mode in Address Object. It will always verify one address at a time. To verify multiple addresses, simply create a loop and feed the addresses in one at a time. Make sure to call the ClearProperties method before each iteration to clear any remnants of the previous address.


What are the other interfaces of Address Object?

Answer
Address Object currently has four different interfaces, each of which performs different functions. These interfaces are AddressCheck, Parse, StreetData, and ZIPData.
The AddressCheck interface is the main interface that handles all the regular address verification processes. It is the one used by virtually all of our customers.
The Parse interface is used to split the individual components of an address. It can also be used to change around the components in order to attempt verification. For example, if “3901 10A Parkview” is entered, the suite is incorrectly placed before the street name and Address Object cannot verify that address. However, if you pass the line through the Parse interface, by the third parse, you will get “3901 Parkview 10A” which will verify correctly.
The StreetData interface is used to search for street information. If you enter a street name and the ZIP Code, the interface will return all records for that street. With that information, you can make determinations like which street ranges and suites are possible. For example, if you get an address with an incorrect range, you can use StreetData to pull out all the possible ranges for that street. If you get an incorrect suite, you can pull out all the possible suite values. With this tool, if you have the street name of an apartment complex, you can pull out all the suites that are present in that complex. This interface supports the use of wildcards so that “Park*” will return any street that begins with “Park” in that particular ZIP Code.
The ZIPData interface is used to find information about ZIP Codes, find all ZIP Codes in a city, and find all cities in a state. This interface also supports the use of wildcards so that you can search for all cities that begin with “Las” if you enter “Las*”. The ZIPData interface is also used to construct elementary Dealer Locators and to just pull up information about a ZIP without using the full address.


What are Results Codes?

Answer
The Results property is intended to replace the StatusCode and ErrorCode properties. Instead of having to look in several output properties in order to identify the status of an address, the Results property should now be the only property needed to asses in order to determine whether an address was good, partially good, or completely undeliverable. The status of an address is defined through several combinations of result codes.
A list of result codes and what they mean are listed here:
Results Codes


What are Alias and Base/Alternate Addresses?

Answer
Alias matching is generally dealing with hints about how a longer name is frequently abbreviated by the locals. Abbreviations such as 333 MARTIN LUTHER KING DR, 33701 really coding as 333 MLK ST N, 33701 in that ZIP code. Or 2215 LWE, 46544 as 2215 LINCOLNWAY E, 46544.
Base/Alternate records involves the same location being referred to by two different street addresses. However, it usually involves people “creating” their own more prestigious or abbreviated names for the location. For example a person might create an address such as 17 Pearson Hall instead of 125 Academy St Rm 17. In other cases, the same physical location shares two names, one of which is official. Lookup both 1325 CAVE ST APT B , 92037 and 1325 COAST BLVDT APT B , 92037 you will find they plot to the same point.


How do I generate suggestions?

Answer
Added on April, 2010, this new feature gives you the ability to automatically provide address suggestions without the use of the StreetData Interface. By making use of Find Suggestions, you can easilly generate the possible and sensible alternatives to addresses that did not verify.
Using Find Suggestions:
In order to correctly use Find Suggestions, you must first proceed with the standard procedure in initializing and verifying an address:

// * In order to activate FindSuggestions, you are required to initialize both the US National Data Files and the DPV Data Files.

//set path to data filess
drobj.PathToUSFiles = “Path to mdaddr Data files”

//set path to required add-on
addrobj.PathToDPVDataFiles = “Path to DPV Data files”

//set License Key
addrobj.SetLicenseString(“License”)

//Initialize
Result = addrobj.InitializeDataFiles()

//Set your address input
addrobj.Address = "Address Here"
addrobj.City = "City Here"
addrobj.State = "State Here"
addrobj.Zip = "Zip Here"

//Verify Your Address
addrobj.Verify()

// * Naturally, you'd want to provide suggestions to customers when there is an error in the address. So you would first want to check for errors in the address. If lets say for example you wanted to provide suggestions for Unknown Streets (AE02) and Component Errors (AE03), this is how you would code it:

if(addrobj.Results.Contains("AE02")||addrobj.Results.Contains("AE03")){
// Call the Find Suggestion Method and proceed if it returns 1
if(addrobj.FindSuggestion())
{
// Output the current suggestion found
Address.Text = addrobj.Address
City.Text = addrobj.City
State.Text = addrobj.State
Zip.Text = addrobj.Zip
Suite.Text = addrobj.Suite

// Keep calling FindsuggestionNext until it returns 0
while(addrobj.FindSuggestionNext())
{
// Output the next suggestions found
Address.Text = addrobj.Address
City.Text = addrobj.City
State.Text = addrobj.State
Zip.Text = addrobj.Zip
Suite.Text = addrobj.Suite
}
} 
}


What affects the speed of Address Object?

Answer
The speed of Address Object can vary widely depending on how it is used. Here are some information that is good to know when looking to affect the speed of Address Object:
Factors that affect speed of Address Object:
  • Development Language: Since address object is written in C++, calling it from a C++ program would be fastest. There is often not a lot of flexibility in the choice of programming language but if there is, this is something to consider.
  • Which version of Address Object you use: For windows, there are two versions of Address Object available. AddrObj.dll which is a COM Object and mdAddr.dll which is a standard windows PE dll. The address verification engine is the same but AddrObj.dll has a COM layer to facilitate communication with programming languages that support COM. Using mdAddr.dll without the COM layer can increase the speed slightly.
  • The quality of the addresses: Bad addresses take longer than good addresses because more searching and computation is involved.
  • Location of the data files: The Address Object data files should be on a local hard drive. Address checking will still work if you host the data files on a network share but there will be significant speed loss and can become unstable under heavy load.
  • Hardware: Adding more ram will help increase the speed. At least 2GB is recommended, 4GB preferable. Hard drive improvements like a SCSI or SSD drive will also increase speed.
Tips to increase speed:
  • Sorting your data by zip code will increase speed: The US data files are stored in zip code order and processing data in that order will decrease internal memory swapping, thereby make the process faster.
  • Only initialize once: Each instance of Address Object only needs to be initialized once. Initialization is the most time intensive process, so the more records you can verify with only one initialize will decrease the time per record.
  • Do not initialize add-ons you do not need: Certain add-ons for Address Object provide additional data that not everyone will need. The eLot add-on provides Lot order and Lot number, RBDI indicates if an address is a residence or a business. If you do not need this data, you should not unnecessarily initialize these data files.
  • Using more threads: Multiple instances of Address Object can be instantiated and used at the same time. It is thread neutral so as long as you ensure each instance stays in one thread, using multiple threads can maximize your computing power and increase speed. Do not expect double the speed for double the number of threads though.


Why does my Canadian address code differently than CanadaPost.com?

Answer
Many of the differences that arise from our Canadian address check engine and CanadaPost.com are due to the very different way in which addresses are entered. On CanadaPost.com, you must have your address already completely parsed out already and you do not enter a postal code. This allows CanadaPost.com to skip many complicated parsing issues with Canadian addresses. Our Canadian address check engine takes an entire address line, city, province, and postal code. There are many rules in CanadaPost’s SERP guideline that we must follow as a certified vendor that their own website does not due to their particular address input format. Please read the additional FAQ entries for some common cases.


How does an obviously bad address get coded as correct?

Answer
Sometimes, an obviously bad address will be coded as correct. It may look like a bug in the address checking engine, but it is often times, it is due to SERP guidelines. If we detect a certain type of postal code, can try to correct it, but if we cannot correct it, we must code the input address as valid. You can tell if an address falls under this situation by looking at the postal code and the addresstype property. If the postal code’s 2nd character is a 0 (zero), then it is a rural postal code and must be coded as valid no-matter the input address. You can also look at the addresstype property. If the addresstype is not a 1, 2, or 3, it is likely it will also fall under this category.


Why can’t the engine change 1st St to First St or 1 to 1st during verification?

Answer
Actually, we can but the Canadian SERP guideline does not want us to, so we had to take out this functionality. Sometimes, you may see a change like this occur, but it is most likely due to another rule instead. See “Why is my address coding to a completely different street name.”


Why is my address coding to a completely different street name?

Answer
According to the SERP guidelines, if all these criteria are met, we must code the address to the street name in the database:
  1. We cannot find a matching street in the postal code provided
  2. The postal code provided only has one street
  3. The input range exist in that postal code
So, if the street name is completely changes by the address check engine, it is likely your address matched these 3 criteria.


Why is the city not being corrected?

Answer
A Canadian city may have many different spelling variations. If you put in an alternate spelling, we are often required to keep the spelling as is. Each city has individual flags set by CanadaPost on whether to keep alternate spellings.


Why do my addresses come back in different formats sometimes?

Answer
In the Canadian postal system, both the English version and the French version of an address are acceptable. French style addresses have slightly different suffixes and directionals than English style addresses as well as different placement. For example, the English style address “123 Main Ave W” would be “123 Av Main O” in French style. We will keep the style that we determine the original input to be in.


Additionally, some street and province names may have special French characters not present in the English alphabet, called diacritics. We have an option to turn diacritics ON (add diacritics), AUTO (keep existing diacritics), and OFF (strip out all diacritics).


How do I resolve Multiple Matches with Street Data?

Answer
When Address Object return to you an error code of 'M' indicating a multiple match address, you can use street data to figure out exactly which addresses the input can be matched to. You do so by using the street data interface, which is used to look up the address records inside the USPS database. Here are the steps to find those matches:


  1. Call the FindStreet Method (and FindStreetNext) by passing in the street name and zip code of the input
    1. You must isolate the street name out of the address. To do so, you can use the Parse interface to split the address into its address components, including street name.
    2. If you do not have a zip and only have the city and state in the input, but can generate a zip by using the ZipData interface FindZip method. Pass in the city and state to get a list of all zip codes in that city/state. You can use any of the zip codes returned by FindZip because FindStreet will search all zip codes within the city of the given zip.
  2. Take the results of the street data search and filter out the records that your input range does not fall into by using the IsAddressInRange2 method.
    1. Once again, you need to isolated range of the input. You can get that value from the Parse interface just like the street name.


Let’s take a look at an example using the steps above. The address 30 Ardsley, 11570 returns a Multiple Match Error.
  1. We call the FindStreet("Ardsley","11570",0) and FindStreetNext to retrieve all streets named "Ardsley" in that zip code. We get the following result (at the time of this writing):
  2. 1-99 Odd Ardsley Cir 11570-2003
    1-99 Odd Ardsley PL 11570-2005
    2-98 Even Ardsley Cir 11570-2007
    2-98 Even Ardsley PL 11570-2004
  3. We use IsAddressInRange2 to see if our range, "30" fits within the range of each record.
  4. Doing so, we get the following filtered results:
    2-98 Even Ardsley Cir 11570-2007
    2-98 Even Ardsley PL 11570-2004
  5. We can now present Ardsley Cir and Ardsley PL as possible addresses to our user.


Note: There are a few caveats. Some records have a plus4 of xxxx. This means that they are undeliverable and you may choose to not show them to the user. Due to these undeliverable records, a multiple match search by only have one final result. You may also want to experiment with the ZipCodeOnly option in the FindStreet method. You may choose to search just within the given zip code before searching the entire city of the given zip code. Disclaimer: This tip is not intended to be a comprehensive guide. Please review all methods and properties in the Address Object manual as well as the data returned by Street data. The best way to proceed is to familiarize yourself with the data returned and perform test cases.


What is the difference between the COM and Standard version of Address Object?

Answer
There are essentially no differences in the underlying code for the COM version and the Standard version of Address Object. The COM version has a COM interface layer used to communicate between your code and Address Object, and it is supported by many different languages. The Standard version of Address Object is an unmanaged dll that must be included into your program which eliminates the extra latency created by the COM layer.


How do I Strongly name an application that calls Address Object?

Answer
With Visual Studio 2003 - 2005 C#, generate the keyfile with the command 'sn -k keyfile.snk' from the Visual Studio Command Line. Next, copy the snk file to the folder containing your application. Open Visual Studio and in the Solution Explorer Tree, right click the project and choose Properties. Set the attribute for the Wrapper Assemble KeyFile to keyfile.snk from the common properties dialog.


Next, rebuild the C# application.
Now all references to the Runtime Callable Wrapper or the Interop wrapper should be strongly named.


Additional information:
Microsoft support page: http://support.microsoft.com/?kbid=313666