Reference Guide
Melissa's Address Object cleans up bad and incomplete contact data. This can help you reduce undeliverables, increase communication, and save money on direct marketing and CRM campaigns.
To do this, the Address Object is broken into four different interfaces:
For far more information, continue reading deeper into this document!
The Address Object has the following system requirements:
Hardware | Detail |
---|---|
HDD | 20GB Hard Disk Space |
Operating System | Details |
---|---|
Windows | Windows 7 or later personal computer OS version. Windows Server 2008 R2 or later Windows Server version. |
Linux | Linux distribution supporting GCC 3.3 or GCC 4.1. |
Solaris | Solaris 8.0 and newer supporting Workshop6 compiler or Workshop 12. |
AIX | AIX 5.2 supporting XLC6 |
HP-UX | Version 11 or later supporting ACC3 or GCC 3.4 |
Operating System | Install File Name |
---|---|
Windows | setup.exe |
Unix | setup.sh |
Melissa requires a License Key to access the full features of Address Object. Your License Key will be sent to you from your Melissa representative. Without the License Key, Address Object will only run in DEMO mode.
Your license key will determine what functionality you have access to and your valid subscription dates are. Once a license key expires, your application using Address Object will no longer work. This is why it is important to make sure you keep your license up to date. Your Melissa representative will work with you closely to make sure you have time to renew your subscription and update your license.
The AddressCheck Interface verifies and standardizes your address data using the most current USPS® and CanadaPost data. We also use and make available additional data that is proprietary to Melissa:
Use the AddressCheck Interface of Address Object to verify addresses in real time, either as part of your in-house data entry system or when gathering customer data via your website. Standardizing street names and abbreviations will also help eliminate duplicate entries.
Address Object is both CASS™ certified and SERP™ certified. We are official postal solution providers for the United States Post Office and CanadaPost. You have the ability to generate a CASS™ 3553 Form or SOA™ Form to facilitate your mailing campaign and quality for postal discounts.
Make sure to first set up the Address Object before you continue below and use the AddressCheck interface.
To use the AddressCheck Interface, we've grouped the functions in order of use. Follow the steps below to use the interface:
The rest of this document will walk you through these different steps and expand on their implementation and use.
After you've set your License Key in an Environment Variable, you need to initialize the AddressCheck Interface and set up the data files. These data files are how Address Object knows if an address is valid. If you don't set these right Address Object is going to "New phone, who dis" you. Be sure to set these up and that they work.
You have to first instantiate the AddressCheck Interface.
You can set your license in two ways:
Once you've realized setting an environment variable is the smart thing to do, set the data file paths. There are multiple data files for Address Object. We recommend you set the paths for all the files.
These are the basic data file paths that you should set and use.
SetPathToUSFiles
SetPathToDPVDataFiles
SetPathToLACSLinkDataFiles
SetPathToSuiteLinkDataFiles
SetPathToRBDIFiles
SetPathToSuiteFinderDataFiles
If you have Canadian addresses, you will need to set the path for the Canada files.
SetPathToCanadaFiles
To use the Meilssa proprietary persistent unique identifier, enable this data path:
SetPathToAddrKeyDataFiles
Once you set the data file paths you need to initialize them to load them and ensure everything is working. Call InitializeDataFiles
. If it returns anything other than 0 the initialization has failed and you need to check the return value of GetInitializeErrorString
to find out why it failed. It's important to do this step since the data files are integral to the functionality of Address Object.
InitializeDataFiles
GetInitializeErrorString
Have you ever went to take a sip of some nice cold milk but instead you had to chew it? That's what it's like for Address Object when you try to use old data. Use these methods to check the dates of the databases and the build number of the object.
GetBuildNumber
GetCanadianDatabaseDate
GetCanadianExpirationDate
GetExpirationDate
GetUSDatabaseDate
GetUSExpirationDate
GetLicenseExpirationDate
//Initialize AddressCheck Interface
SET addPtr = NEW instance of AddressCheck
//Set Data File paths
CALL SetPathToUSFiles WITH PathToUSDataFiles
CALL SetPathToDPVDataFiles WITH PathToDPVFiles
CALL SetPathToLACSLinkDataFiles WITH PathToLACSLinkFiles
CALL SetPathToSuiteLinkDataFiles WITH PathToSuiteLinkFiles
CALL SetPathToCanadaFiles WITH PathToCanadaDataFiles
CALL SetPathToRBDIFiles WITH PathToRBDIFiles
CALL SetPathToSuiteFinderDataFiles WITH PathToSuiteFinderFiles
CALL SetPathToRBDIFiles WITH PathToRBDIFiles
CALL SetPathToAddrKeyDataFiles WITH PathToAddrKeyDataFiles
//Initialize Data Files and check for errors
CALL InitializeDataFiles RETURNING result
IF result <> 0 THEN
CALL GetInitializeErrorString RETURN ErrorMessage
DISPLAY ErrorMessage
ELSE
Process Addresses
END IF
The environment variable method of setting the license will override the value entered into SetLicenseString() via code. The environment variable method is the recommended method as it can be easily changed without re-compiling. When your current subscription expires and you renew, you will be issued a new license string.
Most of these are updated monthly and you'll need at least 20GB of Hard Disk space for these files. The main exception is the EWS file which is updated weekly.
Originally, CASS™ processing only used the USFiles. However, over the years, the USPS® has added additional files like DPV™, LACSLink®, and SuiteLink®. They are required now for CASS™ processing but were not required when first added.
Some rural addresses are confusing, so they were updated to be easier to find for emergency services. LACSLink® checks the old rural addresses with the updated version and corrects it.
Residential Business Delivery Indicator (RBDI) can save you money! Most shipping carriers charge a higher price for residential deliveries. RBDI helps you select the most cost-effective shipping by identifying residential addresses.
Make sure you call the GET database date methods AFTER you initialize the data files. Otherwise you'll get crazy dates, like 1969 or 1899.
Now that you have the object initialized and the data files set up and working, you get to decide what options to use with the AddressCheck Interface. You're the captain now.
DisableAddressSwapping
If set to True
this will disable address swapping. With address swapping, AddressCheck will swap SetAddress and SetAddress2 when SetAddress cannot be coded but SetAddress2 can.
EnableEarlyWarningSystem
If set to True
this enables checking for new addresses using the Early Warning System (EWS) data. EWS data is composed of new addresses (e.g. New Housing Developments) that are scheduled for inclusion in the USPS® National Database.
UseUSPSPreferredCityNames
U.S. Only - If set to True
then VerifyAddress
will always return the preferred city name for the submitted address, regardless of whether or not an approved vanity name was sent.
SetDiacritics
Canada Only - This takes an enumerated value to determine how AddressCheck will handle diacritic characters in French words for addresses located in Quebec.
Auto
- If the input value contains diacritic characters, AddressCheck will use diacritics in the output. If it does not, it will not use diacritics.On
- The return values will always have diacritics and all addresses will be returned in the French format.Off
- The return values will never have diacritics and all addresses will be returned in the English format.SetStandardizationType
This takes an enumerated value to determine how AddressCheck handles the abbreviations of suffixes and directionals when standardizing a street address.
ShortFormat
- The street address is returned with directionals and suffixes shortened according to postal standards. This is the default setting.LongFormat
- The street address is returned with directionals and suffixes spelled out rather than abbreviated.AutoFormat
- The street address is returned with the abbreviation or non-abbreviation of the directionals and suffixes preserved. If any of these components need to be corrected and replaced, the replacement will preserve the original standardization.SetSuiteParseMode
This takes an enumerated value to determine how AddressCheck handles the parsing of a suite into its own field or appended to Address1.
ParseSuite
- The suite is parsed into the suite field. This is the default setting.CombineSuite
- The suite is appended to Address1.SetAliasMode
This takes an enumerated value to determine how AddressCheck handles if a street address alias (nickname or former name) will be converted or preserved.
ConvertAlias
- The street address alias is converted to the USPS preferred street name. This is the default setting.PreserveAlias
- The street address alias is preserved and returned as sent.//Set Options
CALL UseUSPSPreferredCityNames WITH TRUE
CALL SetStandardizationType WITH LongFormat
EWS files are updated every week. Grab them here: ftp://ftp.melissadata.com/updates/ews.txt. They should go in the same directory as all of your other data files.
Off:
"Musée du Louvre" ...is returned as: "Musee du Louvre"
ShortFormat:
"100 West Main Street East" ...is returned as: "100 W Main ST E"
LongFormat:
"100 W Main ST E" ...is returned as: "100 West Main Street East"
AutoFormat:
"100 W Main Ave East" ...is returned as: "100 W Main ST East"
These functions supply the address data to be verified by calling VerifyAddress
. Start with clearing all properties, then add your address data fields using their respective function.
Once you've verified the address, the Get Output functions will have the verified and standardized address data.
ClearProperties
This clears all of the stored address information values of the AddressCheck Interface. Always call this before the address setting functions to ensure the data for each verified address belongs only to that address.
These methods set the address information to be verified. They are quite self-explanatory.
SetAddress
SetAddress2
SetSuite
SetCity
SetState
SetZip
SetCountryCode
Address Object can take in two lines of street address data with SetAddress
and SetAddress2
.
SetAddress
will typically contain the primary street address (Street number, street name, plus any directionals and street suffixes). It can contain a secondary address (suite number, address number, unit number, or a private mailbox located at a CMRA).
SetAddress2
will often contain the secondary address information if it is not submitted with SetAddress
or SetSuite
. However, SetAddress2
can also be used if there is another primary address that is part of the same record. This could be a Post Office Box or a separate street address.
If secondary address information is submitted with SetAddress2
, Address Object will append this information to SetAddress
before processing the record.
For Example:
Address Line 1: 1234 Main Street Address Line 2: Suite #101
Would actually be verified as:
Address Line 1: 1234 Main Street Suite #101 Address Line 2: <empty>
SetCompany
If a company name is supplied for a company that has been assigned a specific Plus4 by the USPS® the address checking logic will return a more accurate Plus4 code.
VerifyAddress
will not change the company name you set.
SetLastName
This sets the last name associated with the address. If you have the last name, Melissa’s proprietary AddressPlus database can append missing residential suites to an address.
SetLastLine
If your City, State, and ZIP™ do not have their own separate fields you can use this method to set them all at once.
This can be used as an alternative to SetCity
, SetState
, and SetZip
.
SetUrbanization
Puerto Rico Only - This sets an urbanization name associated with the input address. When more than one address is found for a ZIP Code™, the urbanization is used to know which neighborhood to look in and provide more accurate results.
SetCountry
Address Object handles US and CA addresses. Setting the country is not necessary as we can detect the country based on the postal code. However, if you have the country, you should pass it in.
You'll use these when your address data is already parsed, which we have found is rare. Otherwise you probably won't really care about these methods.
SetParsedAddressRange
SetParsedPreDirection
SetParsedStreetName
SetParsedSuffix
SetParsedPostDirection
SetParsedSuiteName
SetParsedSuiteRange
SetParsedRouteService
- Canada OnlySetParsedDeliveryInstallation
- Canada OnlySetPlus4
SetParsedLockBox
- Canada OnlyA lock box is the Canadian equivalent of a Post Office Box in the U.S. (The two terms are often used interchangeably in Canada)
//First clear properties!
//This ensures no left over data from a previous call will contaminate the current call
CALL ClearProperties
//Set the address data
CALL SetCompany WITH CompanyName
CALL SetAddress WITH AddressLine1
CALL SetAddress2 WITH AddressLine2
CALL SetSuite WITH SuiteNumber
CALL SetCity WITH City
CALL SetState WITH State
CALL SetZip WITH Zip5
CALL SetUrbanization WITH Urbanization
CALL SetCountryCode WITH CountryCode
Address Object needs the city/state/zip to be parsed out in their own fields or in last line format. If you do not have that, we have several options. Rightfielder is a tool to parse out the individual fields needed. You can also use our Global Address product which can handle addresses with only address lines.
US addresses actually only officially has 1 address line. Address2 is typically used to hold additional information but will not be used for verification. The exception is if we see that this data is part of the address like a suite or a private mailbox.
SuiteLink® enables Address Object to assign the suite information tied to the Company Name. If the company name has an assigned suite GetSuite
will have the suite information.
For Example you can send:
Rancho Santa Margarita, CA 92688-2212
instead of:
Rancho Santa Margarita //to SetCity CA //to SetState 92688 //to SetZip
For Example:
Mr John Smith
URB Fair Oaks ←The Urbanization
Ave Wilson Churchill 123
Rio Piedras PR 00926-0123
If we see a country that is not US or CA, we will return a result code of AS09. If you have records outside of US and CA, you should use our Global Address product.
VerifyAddress
Calling VerifyAddress
will verify, standardize, and enhance a U.S. or Canadian address based on the input data. After calling VerifyAddress
, check the Result codes with GetResults
to see the level of matching and verification on the input address. This will also let you know if there were any problems with the call.
//Verify the address data
CALL VerifyAddress
VerifyAddress returns an integer. This is an artifact of an older version of the product and left for compatibility reasons. However, you should not use the return value for any purpose.
GetResults
This returns a comma-delimited string of four-character codes that detail the level of matching found for the current address, any errors that occurred, and any changes that were made while standardizing the information. For a general primer on Result Codes, please visit: Quickstart Result Codes.
For a list of all possible codes, visit: Melissa Address Object Wiki - Result Code Details
To determine validity of an address, you should look at our 3 main indicators:
Code | Description | Validity |
---|---|---|
AS01 |
USPS Address Fully Verified | Good Data |
AS02 |
Address partially verified to building level. Error with suite. | Partially Good Data |
AS03 |
Non-USPS address fully verified. | Good Data |
AS02 is a judgement call. The street address is good but the suite was either missing or invalid. However, often times if you have the name or company name, the mail can still be delivered or the address is still good enough to use for deduplication.
Let’s look at some other possible scenarios. Let’s say you want to also filter out any addresses that are rental addresses like a PO Box or a private mailbox. The thing to keep in mind here is that you can use more than Result codes for your decision handling. You want to use these result codes:
Code | Description | Type |
---|---|---|
AS10 |
CMRA Address | Rental Address |
AS11 |
PBSA Address | Rental Address |
But you also want to look at the AddressType.
Now, let’s say we want “Mailable only” addresses where we think it only be addresses that is actively lived in or used. This is different than AS01/AS03, which really just means that this address exists. We will consider AS03 as non-mailable as almost all main active residences would be registered with the USPS.
Code | Description | Mailable |
---|---|---|
AS16 |
Vacant Address | Not Mailable |
AS17 |
No USPS Mail Delivery | Not Mailable |
Lastly, let’s say we want to differentiate between using USPS and a third part Delivery Company like Fedex or UPS. There are a couple of considerations.
USPS or Third Party Delivery?
Code | Description | Type |
---|---|---|
AS01 |
USPS Address Fully Verified | Mostly Both. More Info Needed |
AS03 |
Non-USPS address fully verified. | Third Party |
AS16 |
Vacant Address | Both. USPS may hold mail. |
AS17 |
No USPS Mail Delivery | Third Party |
AS20 |
Deliverable only by USPS | USPS |
AS16 and AS17 are the judgement calls. Vacant means the USPS lists the address as having been vacant for 90 days. They may not even attempt delivery. However, a third part delivery may fail if a signature is required.
AS17 means the USPS marks the address as not being deliverable. Our experience is that these addresses are often deliverable with a third party. That is not a guareentee though.
For Example:
AS01, AS14, AC01
If(Results.Contains(“AS01”) or Results.Contains(“AS03”))
{
//Handle good address
}
else if (Results.Contains(“AS02”))
{
//Handle partially good address
{
else
{
//Handle bad address
}
//Non-Rental Address Decision Tree
If((Results.Contains(“AS01”) or Results.Contains(“AS03”)) and not Results.Contains(AS10) and not Results.Contains(AS11) and AddressObject.AddressType <> “P”)
{
//Handle good non-rental address
}
else if((Results.Contains(“AS01”) or Results.Contains(“AS03”))
{
//Handle good rental address
}
else if (Results.Contains(“AS02”))
{
//Handle partially good address
{
else
{
//Handle bad address
}
//Mailable Address Decision Tree
If((Results.Contains(“AS01”) and not Results.Contains(AS16) and not Results.Contains(AS17))
{
//Handle good Mailable address
}
else if((Results.Contains(“AS01”) or Results.Contains(“AS03”))
{
//Handle good non-mailable address
}
else if (Results.Contains(“AS02”))
{
//Handle partially good address
{
else
{
//Handle bad address
}
//USPS vs Third Party Delivery
If((Results.Contains(“AS01”) or Results.Contains(“AS03”))
{
if(Results.Contains(“AS20”)
{
//Use USPS Only
}
else if(Results.Contains(“AS03”) or (Results.Contains(“AS17”))
{
//Third party delivery only. AS17 is a judgement call.
}
else
{
//Delivery by USPS or Third party
}
}
else if (Results.Contains(“AS02”))
{
//Handle partially good address
{
else
{
//Handle bad address
}
These return the address information that has been verified and standardized.
GetCompany
GetAddress
GetAddress2
GetSuite
GetPrivateMailbox
GetCity
GetState
GetZip
GetPlus4
GetCountyName
GetCountryCode
GetUrbanization
These return the parsed street address parts.
GetParsedAddressRange
GetParsedPreDirection
GetParsedStreetName
GetParsedPostDirection
GetParsedSuffix
GetParsedSuiteName
GetParsedSuiteRange
GetParsedPrivateMailboxName
GetParsedPrivateMailboxNumber
GetParsedRouteService
- Canada OnlyGetParsedLockBox
- Canada OnlyGetParsedDeliveryInstallation
- Canada OnlyGetParsedGarbage
This returns any unused characters left over from the street address after it has processed, up to 50 characters.
These return additional information linked to the input address.
GetAddressTypeCode
and GetAddressTypeString
These are the code and string definition combos detailing the type of address returned.
U.S. Address Type Codes
Code | Description |
---|---|
A | Alias |
F | Firm or Company address |
G | General Delivery address |
H | High Rise or Business complex |
P | PO Box address |
R | Rural Route address |
S | Street or Residential address |
Canadian Address Type Codes
Code | Description |
---|---|
1 | Street |
2 | Street Served By Route and GD |
3 | Lock Box |
4 | Route Service |
5 | General Delivery |
B | LVR Street |
C | Government Street |
D | LVR Lock Box |
E | Government Lock Box |
L | LVR General Delivery |
K | Building |
GetCityAbbreviation
City abbreviation. Any city with a name longer than 28 characters must have an official abbreviation. If the city name is more than 28 characters long, this will contain the official USPS abbreviation for the city.
GetCongressionalDistrict
An electoral division in a US State where a member of the U.S. House of Representatives is elected. You can use this information to target particular congressional districts or to refer people to their Representative in Congress.
GetCountyFips
The Federal Information Processing Standard (FIPS) is a 5-digit code assigned to each county in the U.S. by the Bureau of the Census. The first two digits are the state code and the last three digits are the county number.
GetTimeZone
and GetTimeZoneCode
The time zone is a 2-digit number representing the hours past Greenwich Mean Time. The time zone code is a code returned corresponding to a time zone. See the table below for a list of the time zones.
Time Zone Codes
Code | Time Zone |
---|---|
4 | Atlantic Time |
5 | Eastern Time |
6 | Central Time |
7 | Mountain Time |
8 | Pacific Time |
9 | Alaska Time |
10 | Hawaii-Aleutian Time |
11 | Samoa Time |
GetZipType
Returns a code indicating the type of address belonging to the ZIP Code™.
ZIP™ Type Codes
Code | ZIP™ Type |
---|---|
M | Military/APO |
P | PO Box |
U | Unique (assigned to specific organizations) |
Blank | Standard |
GetCarrierRoute
The Carrier Route (CRRT) code applies to pieces grouped by individual mail carrier routes. CRRT-coded mail can receive presort discounts if enough pieces qualify per Carrier Route.
Carrier Route First Letter Codes
Code | Description |
---|---|
B | PO Box |
C | City Delivery |
G | General Delivery |
H | Highway Contract |
R | Rural Route |
GetDeliveryPointCode
This field contains a 3-digit number composed of a “check digit” (which is the last digit of this 3-digit number), plus two additional numbers (usually the first 2 digits of the address number).
GetDeliveryPointCheckDigit
This field contains the last digit in the Delivery Point Barcode. The DPB Check Digit enables bar code scanners to verify that they have scanned the first 11 digits of the Delivery Point Barcode correctly. If the Delivery Point field and the DPB Check Digit field are both formatted, AddressCheck will return a 2-digit number for the Delivery Point and a 1-digit number for the DPB Check Digit.
GetRBDI
This returns a code indicating if the address is a residence, business, or unknown. This is useful to filter out addresses based on their types, or sort them to determine the best carrier for delivery.
RBDI Address Type Codes
Code | Description |
---|---|
R | Residential |
B | Business |
U | Unknown |
GetAddressKey
This returns a 11 digit code representing the combination of the ZIP Code™, the plus4, and the delivery point. This is a fairly good representation of a unique US address and often used as the core of postal barcode. However, this code is not guaranteed to be unique to an individual address, please use the GetMelissaAddressKey
instead for that purpose. It is possible that this field is empty or not 11 digits if the address is a Non-USPS® address.
GetMelissaAddressKey
This is a globally unique and persistent key for the location, even if parts of the address change. When an address is fully validated this field returns a 10-digit proprietary key for the address.
With AddressKey (US and Canada only), if an address ZIP Code™ changes, the AddressKey would also change. Melissa Address Key (MAK) is independent and will not change. This makes MAK a good way to permanently identify and locate addresses. Once you have a MAK it can be used as an input in most Melissa services and thus is a good tool for deduping.
GetMelissaAddressKeyBase
Every full address has its own Melissa Address Key (MAK). If that address is a suites or apartment, we will also return a Melissa Address Key Base (BaseMAK) that corresponds to the overall building. This provides a link between all the individual MAK addresses that belong to the same building. This field also returns a 10-digit proprietary key. Note, if we can validate the address to the building but not the suite, we can return just the BaseMAK.
IMPORTANT! Make sure to look at and keep this data. The Suite and PrivateMailbox data is not included in the Adddres or Address2 fields.
Common items found returned by this method are community center names, names of individuals, additional delivery instructions, and so on.
If VerifyAddress
was unable to correct the input address, you can still get possible correct addresses by using the Find Suggestions functions.
FindSuggestion
This can be called after VerifyAddress
if the original address could not be verified by Address Object.
FindSuggestion
will only work if SetCASSEnable
is set to false. You cannot combine suggestions with CASS™ verification. You must also have DPV™ enabled and a valid directory path to the DPV™ data files set.
If the method returns a 1, a suggestion was found and you can retrieve the suggested address using the regular output fields.
If you get a 0 then no suggestion was found.
FindSuggestionNext
This returns the next suggestion, if any, based on the originally submitted address.
You can call this after a successful call to FindSuggestion
and can be repeated until you get a 0, indicating that no further suggestions are available.
If you get a 1, that means a new suggestion is available and can be retrieved using the same regular output fields.
//If the address could not be verified, find the most likely alternative
IF FindSuggestion <> 0 THEN
{
CALL GetAddress RETURNING AddressLine1
//get remaining address outputs
WHILE(FindSuggestionNext <> 0)
{
CALL GetAddress RETURNING AddressLine1
//get remaining address outputs
}
}
FindSuggestion
will take a long time! Be sure to plan for this if you want to use it.
CASS™ (Coding Accuracy Support System) certification is used by the USPS® to ensure accuracy in address data software. For you it means we check and correct your address data to USPS® specifications, giving you the best mailable address you can get. Many clients use Address Object to improve their data quality and are very happy with it. However, if you want to actually get the CASS™ 3553 form for discount bulk mailings, here are some additional steps to take.
To see what the CASS™ form 3553 looks like, click here:
SetCASSEnable
This enables full CASS Certified™ address verification. It's disabled by default so you're first step in using CASS™ will be to set this to True. You can set it before or after calling InitializeDataFiles() but make sure to call it before passing in any address data.
These set the information on CASS™ Form 3553 item D3 for the company that owns the list or for whom the mailing is being prepared.
SetPS3553_D3_Name
SetPS3553_D3_Company
SetPS3553_D3_Address
SetPS3553_D3_City
SetPS3553_D3_State
SetPS3553_D3_ZIP
SetPS3553_B4_ListName
This sets the name or identification number of the address list. If you use more than one list, this will be left blank. If you use an identification number, you have to precede it with ID#
.
SetPS3553_B1_ProcessorName
This sets the name of the company that coded the address list(s) and/or used the Address Object to perform ZIP+4® matching.
GetFormPS3553
After you are done processing, call this method to get the HTML string for the CASS 3553 form. You can then save that string to a file of your choosing or store it in a database.
SaveFormPS3553
This will save the CASS™ Form 3553 as either an HTML or PDF file. Pass in the full directory path and filename with an [extension].
ResetFormPS3553
Use this to reset the running totals for a CASS™ processing.
You must call this method if you need to produce several CASS™ forms in sequence for multiple jobs.
//Enable CASS™ functionality
//Required BEFORE InitializeDataFiles
CALL SetCASSEnable WITH TRUE
//Provide CASS™ owner name/address
CALL SetPS3553_B1_ProcessorName WITH ProcessorName
CALL SetPS3553_B4_ListName WITH ListName
CALL SetPS3553_D3_Name WITH ListOwnerName
CALL SetPS3553_D3_Address WITH strListOwnerAddr
CALL SetPS3553_D3_City WITH ListOwnerCity
CALL SetPS3553_D3_State WITH ListOwnerState
CALL SetPS3553_D3_ZIP WITH ListOwnerZip
//After verification, and if using USPS® CASS™
CALL SaveFormPS3553 WITH CASSFormPath
If you want to use CASS™ Processing you must ensure you're using the required data files. They are the DPV™, LACSLink™, and SuiteLink® data files.
You must include the extension you want in your CASS™ Form 3553 filename, either .HTML
or .PDF
!
For Example:
SaveFormPS3553(“C:\Program Files\Melissa Data\Data Files\CASSForm.pdf”)
Each instance is only able to keep track and maintain a single CASS™ form. You will not be able to split a job into multiple threads and combine back into a single cass form. You will need to maintain the values yourself to do that.
If you want to use SOA™ Processing you need to have it enabled on your account. If you don't have this service, call your Melissa sales representative to subscribe. Then you need use the required Canada data files.
You then have to set the SOA™ Customer info and contract number.
Finally set a path for the SOA™ form to be saved. This form will be required by the Canada Post for your mailing.
SetSOACustomerInfo
This sets the Company name and mailing address for use on the Statement of Accuracy (SOA™) report. This takes two string values as parameters:
CustName
- The Company name on your Canada Post contract.CustAddress
- The mailing address on your Canada Post contract.SetSOACPCNumber
The CPC Number is an eight-digit number that appears on your Canada Post contract.
GetFormSOA
This returns the current Statement of Accuracy in HTML format as a string.
For more methods on retrieving individual parts of the SOA™ Form, see the Appendix.
ResetFormSOA
Use this to reset the running totals for Canadian addresses.
You must call this method if you want to process multiple databases with the same instance of Address Object.
SaveFormSOA
This saves an HTML file of the Statement of Accuracy (SOA™).
//Provide SOA™ customer info/number
CALL SetSOACustomerInfo WITH CustomerInfo
CALL SetSOACPCNumber WITH CPCNumber
//After verification, and if using Canada Post SOA™
CALL SaveFormSOA WITH SOAFormPath
It's a good practice to always call ResetFormSOA
before processing Canadian addresses.
Good news everybody! The SOA™ is good for one year after it's generated. You don't need to generate another one unless your address data changes.
You must include the .HTML
extension in the filename you pass to this method!
I bet you want to know the maximum and minimum lengths of properties for Address Object. Well you're in luck, that's exactly what's here!
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:
For addresses that we do not code, we will return the input (sometimes with a few standardizations, if possible) back to you. 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 essentially returning the official postal data. The maximum length is effectively the same as the longest data string in the source data. Since addresses change and are added frequently, this is not a number that is guaranteed to be stable, so 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.
Field Name | Max Length Recommended |
---|---|
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 |
Field Name | Max Length Recommended |
---|---|
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 |
The StreetData Interface is provided to access U.S. street address data directly rather than through the AddressCheck Interface.
You might want this data to show customers alternate addresses if the address checking logic is unable to code their address. All records that match their range can be displayed, allowing for the correction of misspellings. Other uses can include filtering our data, since you may only need the street names in a particular carrier route, congressional district, or county FIPS code.
The records returned this interface contain address ranges, but that does not mean that each address in that range is a deliverable address. For example you may see a range of 1 to 10 Main Street. The deliverable addresses may be 1, 2, 3, 5, 6, 9, and 10. That means 4, 7, and 8 will not be deliverable. These records are effective for checking existing addresses, but not for creating addresses, which is prohibited by the USPS®.
Make sure to first set up the Address Object before you continue below and use the StreetData interface.
Follow the steps below to use the interface:
After you've set your Licence Key in an Environment Variable, you need to initialize the StreetData Interface and set up the data files. These data files are key to StreetData working. As in, no key, you're not getting anywhere.
You have to first instantiate the StreetData Interface.
Then you have the choice of setting the license string. But it's not recommended. We really want you to do the right thing and set the license string via Environment Variables.
SetLicenseString
Unlike the other interfaces, with StreetData initialization also opens the required data files.
Initialize
Initialize
takes two parameters, one for each required data file. It then, quite unsurprisingly, initializes StreetData - readying it for that data you're about to sling at it.
DataPath
- The path to the mdAddr.dat
file.NationalPath
- The path to the mdAddr.nat
file.Initialize
returns one of the following codes: (and GetInitalizeErrorString
returns the corresponding description.)
Initialize Return Codes
Code | Description |
---|---|
0 | No error - initialization was successful. |
1 | Could not open the mdAddr.dat file. |
2 | Could not open the mdAddr.nat or mdAddr.str file. |
4 | The internal database date of the mdAddr.dat and mdAddr.nat files do not match. |
5 | Not all the memory buffers could be initialized. |
6 | Unknown error |
GetInitializeErrorString
This returns the definition of the code returned by Initialize
.
Wondering why something isn't working? Have you checked your expiration dates? That's what these methods are for - to check the dates of the databases and the build number of the object.
GetBuildNumber
GetDatabaseDate
GetLicenseExpirationDate
//Instantiate StreetData Interface
Set streetPtr in New Instance of StreetData
//Initialize Data Files and check for errors
CALL Initialize WITH DataPaths RETURNING Result
IF Result <> 0 THEN
Call GetInitializeErrorString RETURN ErrorMessage
Display ErrorMessage
End If
Initialize
, Data Files, and YouIf the data files are in the same directory as the Component, you do not need to call Initialize
. However, if there is an error, an exception will be reported instead of an error code.
Your next big step is to search for those street addresses! FindStreet
locates the range of street addresses that matches the pattern and ZIP Code™ you send it.
FindStreet
This method requires three parameters to do it's magic:
StreetName
- Obviously the street name. You can use wildcards at the end of this value. e.g. MA* would match any streets beginning with MA.ZIP
- The five digit ZIP Code™.CodeOnly
- A Boolean. By default set to 0 and will match any records within the city of the ZIP Code™. If you set this to 1, FindStreet
will only return records in the set ZIP Code™.FindStreetNext
This method gets the next StreetData record. It will return either True or False.
Use this to cycle through multiple results.
FindStreet
CALL FindStreet WITH StreetName, Code RETURNING Result
IF Result is TRUE THEN
CALL GetAddressType RETURNING AddressType
CALL GetPrimaryRangeLow RETURNING RangeLow
CALL GetPrimaryRangeHigh RETURNING RangeHigh
CALL GetPrimaryRangeOddEven RETURNING RangeOddEven
CALL GetPreDirection RETURNING PreDirection
CALL GetStreetName RETURNING StreetName
CALL GetSuffix RETURNING Suffix
CALL GetPostDirection RETURNING PostDirection
CALL GetSuiteName RETURNING SuiteName
CALL GetSuiteRangeHigh RETURNING SuiteHigh
CALL GetSuiteRangeLow RETURNING SuiteLow
CALL GetSuiteRangeOddEven RETURNING SuiteOddEven
CALL GetZip RETURNING Zip
CALL GetPlus4Low RETURNING Plus4Low
CALL GetPlus4High RETURNING Plus4High
WRITE VALUES TO LIST OR SPREADSHEET
End If
FindStreet
Once you have the range of street addresses you can then cycle through multiple results using the FindStreetNext
method.
FindStreetNext
CALL FindStreetNext RETURNING Result
WHILE Result Is TRUE
CALL GetAddressType RETURNING AddressType
CALL GetPrimaryRangeLow RETURNING RangeLow
CALL GetPrimaryRangeHigh RETURNING RangeHigh
CALL GetPrimaryRangeOddEven RETURNING RangeOddEven
CALL GetPreDirection RETURNING PreDirection
CALL GetStreetName RETURNING StreetName
CALL GetSuffix RETURNING Suffix
CALL GetPostDirection RETURNING PostDirection
CALL GetSuiteName RETURNING SuiteName
CALL GetSuiteRangeHigh RETURNING SuiteHigh
CALL GetSuiteRangeLow RETURNING SuiteLow
CALL GetSuiteRangeOddEven RETURNING SuiteOddEven
CALL GetZip RETURNING Zip
CALL GetPlus4Low RETURNING Plus4Low
CALL GetPlus4High RETURNING Plus4High
WRITE Values TO Range Lost
CALL FindStreetNext RETURNING Result
ENDWHILE
Once you call FindStreet
you're going to need to get the Street Range.
These methods return the parsed street data.
GetAddressType
This method returns a 1-character code indicating what type of address was returned. For a list of the codes, see U.S. Address Type Codes
GetBaseAlternateIndicator
This method returns a 1-character code indicating if the record is a base (preferred) B or alternate A.
GetCarrierRoute
This returns a 4-character code indicating the type of delivery for that address. For a list of the codes, see Carrier Route Codes
GetPreDirection
GetStreetName
GetSuffix
GetPostDirection
GetSuiteName
GetZip
GetCompany
GetCongressionalDistrict
GetCountyFips
GetLACSIndicator
GetLastLineNumber
GetUrbanizationCode
GetUrbanizationName
GetDeliveryInstallation
These methods return the lowest or highest street number in a 10-character string padded on the left with zeroes.
For example, for GetPrimaryRangeLow
, if the street range is 100 to 200 Main Street, you'll get 0000000100. Don't forget those padded zeroes.
GetPrimaryRangeLow
- Returns the lowest street number.GetPrimaryRangeHigh
- Returns the highest street number.These methods return the lowest or highest suite number in an 8-character maximum string.
For example, for GetSuiteRangeHigh
, if the suite range is 1001 to 2001, you'll get 2001. This time there are no padded zeroes... don't get confused.
GetSuiteRangeLow
- Returns the lowest street number.GetSuiteRangeHigh
- Returns the highest street number.These methods return a single character telling you the parity of the range, in a mathematical sense. (It tells you if it's odd, even, or both).
GetPrimaryRangeOddEven
- Returns the parity of the street range.GetSuiteRangeOddEven
- Returns the parity of the suite range.Get Range Odd/Even Codes
Code | Description |
---|---|
O |
Only Odd street numbers are in the range. |
E |
Only Even street numbers are in the range. |
B |
Both odd and even street numbers are in the range. |
These methods return the lowest or highest Plus4 number in a 4-character maximum string. Both of these methods usually contain the same value, except when dealing with PO Boxes. (Every PO Box has its own Plus4 code).
GetPlus4Low
- Returns the lowest Plus4 number. If the value is xxxx, the USPS® considers the street record undeliverable.GetPlus4High
- Returns the highest Plus4 number.GetBaseAlternateIndicator
will tell you which type a record is, but what does it mean to have a base or alternate record?
A Base record can represent a range of addresses or an individual address, such as a firm record. They are generally preferred over alternate records.
Alternate records are individual delivery points.
A hyphen in front of the range field indicates a significant leading zero. This means the leading zero is part of the range and is required. For example, -7 means the range is 07 and cannot be just 7. Got it?
IsAddressInRange2
This method tells you if an address falls within the address range of a compared USPS® address record and matches at an Odd/Even level. It will return either 1 or 0.
When you have multiple matches from VerifyAddress
, use this method with FindStreet
and FindStreetNext
to match the address with a valid address record.
GetAutoCompletion
This returns possible street address matches based off of a ZIP Code™ and at least one character of a street address. You get one possible street address per call.
It's also a really good idea to wait until you have at least four characters or an alphabet letter before you call GetAutoCompletion
. Why you ask? Because you'll be trying to fit 20 gallons of addresses in a 10 gallon hat. There will likely be way too many addresses to be useful (Think about all the addresses that begin with 1 in a single ZIP Code™). If you wait for a few more characters the list will be much more user friendly.
There are four parameters you pass to the method:
string streetAddress
- The full or partial street address.string Zip
- The full or partial street address.mdStreet.AutoCompletionMode enumeration
- Enumeration for the handling of suites.AutoCompleteSingleSuite
- Show each individual suite. AutoCompleteRangedSuite
- Show the suite ranges. AutoCompletePlaceHolderSuite
- Use a ’#’ to denote where a suite should go. AutoCompleteNoSuite
- Do not show suites. bool DPV_on_or_off
- True to return only DPV™ valid street addresses. False to return all street addresses.ResetAutoCompletion
This resets the auto-completion. You'll want to use this before you call a new record. If you don't, bad things happen. And it'll be because you didn't listen to me.
FOR EACH Range IN LIST
IF IsAddressInRange2(StreetNum,RangeHigh,RangeLow,
RangeOddEven) THEN
Match Is TRUE
ENDIF
NEXT
You can cycle through the entire list of possible street addresses by calling GetAutoCompletion
until it returns an empty string.
The ZipData Interface gives you access to ZIP Code™ related information. You can:
Make sure to first set up the Address Object before you continue below and use the ZipData interface.
To use the ZipData Interface, we've grouped the methods in order of use. Follow the steps below to use the interface:
The rest of this section will walk you through these different steps and expand on their implementation and use.
After you've set your Licence Key in an Environment Variable, you need to initialize the ZipData Interface and set the path to the data files (if they are not in the same directory as the Address Object component file).
You have to first instantiate the ZipData Interface.
Then you have the choice of setting the license string. But please remember that this is not recommended. Use your noodle and set the license string via Environment Variables.
SetLicenseString
Once you've come to your senses and decided to set an environment variable, call the Initialize
method, passing the paths to mdAddr.dat
and mdAddr.nat
. If Initialize
returns anything other than 0 the initialization has failed and you need to check the return value of GetInitializeErrorString
to find out why it failed. It's important to do this step since the data files are integral to the methodality of Address Object.
Initialize
GetInitializeErrorString
Have you ever went to take a sip of some nice cold milk but instead you had to chew it? That's what it's like for Address Object when you try to use old data. Use these methods to check the dates of the databases and the build number of the object.
GetBuildNumber
GetDatabaseDate
GetLicenseExpirationDate
Initializing the ZipData Interface is slightly different from the procedure for the AddressCheck Interface, so please proceed with caution and read through the section!
//Instantiate ZipData Interface
CALL Initialize WITH DataPaths RETURNING Result
IF Result <> 0 Then
CALL GetInitializeErrorString RETURNING ErrorString
PRINT ErrorString
END IF
The three main methods of the ZipData Interface retrieve information based on ZIP Code™ or city names.
These return the first record of the ZIP Code™ passed in. If GetLastLineRecord = 1 is set, they will return the last line record for the ZIP Code™ passed in.
The FindZipNext
method finds the next ZIP Code™.
FindZip
FindZipNext
These return a list of ZIP Code™s for a given city. You must pass both a city and state (two character abbreviation).
GetAreaCode
is not populated by these methods.
FindZipInCity
FindZipInCityNext
These return a list of cities in a state, matching a set pattern. They are good for matching cities or verifying that a city exists in a state. You must supply both a city (may contain a wildcard) and a state (two character abbreviation, no wildcard allowed).
Only GetCity
and GetState
are populated by these methods.
FindCityInState
FindCityInStateNext
These methods do not require the data files to be initialized. They can be used with the GetLatitude
and GetLongitude
methods to calculate distances and bearing between two records.
Both methods have the same input parameters:
lat1
— Latitude for point 1 in degrees 90 to –90long1
— Longitude for point 1 in degrees 180 to –180lat2
— Latitude for point 2 in degrees 90 to –90long2
— Longitude for point 2 in degrees 180 to –180ComputeBearing
This returns a bearing in degrees (0 to 360) representing the compass direction from point 1 to point 2.
North is 0 degrees, East is 90, South is 180, and West is 270.
ComputeDistance
The ComputeDistance method returns a distance in miles between point 1 and point 2.
FindZipNext
If GetLastLineRecord is set to 1, you will not be able to call the FindZipNext
method.
FindZip
Pseudo CodeCALL FindZip WITH Code RETURNING Result
IF Result Is TRUE THEN
CALL GetAreaCode RETURNING AreaCode
CALL GetAutomation RETURNING Automation
CALL GetCity RETURNING City
CALL GetState RETURNING State
// Multiple Methods Returned.
CALL GetZipType RETURNING ZipType
ENDIF
WHILE FindZipNext Returns TRUE
// Call the same functions as above.
ENDWHILE
FindZipInCity
Pseudo CodeCALL FindZipInCity WITH City, State RETURNING Result
IF Result Is TRUE
CALL GetAutomation RETURNING Automation
CALL GetCity RETURNING City
// Multiple Methods Returned.
CALL GetZip RETURNING 5
CALL GetZipType RETURNING ZipType
End If
WHILE FindZipInCityNext Returns TRUE
// Call the same functions as above.
ENDWHILE
FindCityInState
Pseudo CodeCALL FindCityInState WITH City, State RETURNING Result
IF Result Is TRUE
CALL GetCity RETURNING City
CALL GetState RETURNING State
End If
WHILE FindCityInStateNext Returns TRUE
CALL GetCity RETURNING City
CALL GetState RETURNING State
ENDWHILE
You do not have to call Initialize
before ComputeBearing
or ComputeDistance
are called.
Negative longitudes lie west of the Greenwich Meridian, positive longitudes to the east. Longitudes for the continental U.S. are in the range from -65 to -125 degrees.
GetAreaCode
GetCity
GetCityAbbreviation
GetCountyFIPS
- US OnlyGetCountyName
GetFacilityCode
- US OnlyGetLatitude
- US OnlyGetLongitude
- US OnlyGetState
GetTimeZone
- US OnlyGetTimeZoneCode
- US OnlyGetZip
GetZipType
- US OnlyGetAutomation
- US OnlyThis returns the carrier route rate mail indicator.
GetLastLineIndicator
- US OnlyThis returns a one-character string value. An L in this field indicates that the city name is the official U. S. Postal Service name for the ZIP Code™ (Only one record per ZIP Code™ is coded with an L).
GetLastLineNumber
- US OnlyThis returns a six-character string value. This number is used with address matching to break ties on certain records using the city name.
GetPreferredLastLineNumber
- US OnlyThis returns a six-character string value. This is similar to the GetLastLineNumber method mentioned earlier. If the preferred last line number is the same as the last line number, this city name is the one the Post Office will recognize as the official name for that ZIP Code™.
If a ZIP Code™ has more than one area code assigned to it, the dominant area code will be returned.
GetCityAbbreviation
, More Than, Not LessGetCityAbbreviation
will only return a value if the city name is longer than 13 letters.
The Parse Interface allows a user to separate a street address into its individual components, a process known as parsing. There are nine possible components that make up an address:
Addresses can usually be parsed correctly on the first try. For example, the address “100 Main St” can easily be separated so “100” is the Range, “Main” is the StreetName, and “St” is the StreetSuffix.
Some addresses require more attention. The address parser uses multiple pass parsing to handle any ambiguous addresses. If the address is not parsed correctly the first time, the parse can be called a second or third time. Each time it is called it will rearrange the tokens into a new order to try to get a match.
Make sure to first set up the Address Object before you continue below and use the Parse interface.
To use the Parse Interface, we've grouped the functions in order of use. Follow the steps below to use the interface:
**Note that the Parse Interface is different from the other Address Object Interfaces and does not need to be initialized nor does it require a license string to use. You may still use GetBuildNumber to determine the build number you are using.
The rest of this section will walk you through these different steps and expand on their implementation and use.
StreetData
database to manually correct records that AddressCheck
couldn't code. Pretty nifty.100 N Ave C can be parsed several ways:
Range | Pre | Street Name | Street Suffix | Suite Name |
---|---|---|---|---|
100 | N | Ave C | ||
100 | N | Avenue C | ||
100 | N | Ave | C | |
100 | N | Avenue | C | |
100 | N | Ave | C | |
100 | North | Ave | C |
Any of the above combinations can be correct, and all probably exist to some degree somewhere in the country.
The Parse
method will return the first parse shown here and it will be correct 90 to 95% of the time. If you need a second look at the address, repeated calls to the ParseNext
method will produce the additional combinations that are listed above.
GetBuildNumber
, why you do this?If you are running the Demo version of Address Object, DEMO will be appended to the build number.
These methods parse a submitted street address and then return all possible variations on how the address can be parsed.
These methods take a string of the full street address to parse. If the parsing was successful they'll return a boolean of1.
Parse
ParseCanadian
- For Canadian AddressesParseNext
This juggles the street address components separated in your first call to either Parse
or ParseCanadian
. This can be useful when the first parse fails to find a matching address. While there are more possible parses ParseNext
will return a boolean of 1. If there are no more parses you'll get a 0 returned.
LastLineParse
This method takes a single string and breaks it into city, state, and ZIP Code™. This can be used for both U.S. and Canadian cities.
These return the parsed components of a street address after a call to the Parse, ParseCanadian, or ParseNext function.
GetRange
GetPreDirection
GetStreetName
GetSuffix
GetPostDirection
GetSuiteName
GetSuiteNumber
GetPrivateMailboxName
GetPrivateMailboxNumber
GetRouteService
- Canada OnlyGetLockBox
- Canada OnlyGetDeliveryInstallation
- Canada OnlyGetGarbage
This returns any unused characters left over from the street address after it has processed, up to 50 characters.
GetCity
GetState
GetZip
GetPlus4
- (US Only)LastLineParse
Does What Now?LastLineParse does not perform address checking and will not append a Plus4 if the input address does not have one.
These are common words you'll see when dealing with address data quality.
If you're new to mailing, use this section to understand addresses and address parts in USA and Canada. This intro is for use with the AddressCheck Interface.
There are quite a few parts to an address! Here we'll break it down for you and explain what's going on. Buckle up!
You're probably familiar with the address format and components below, since they're present in most addresses.
Take the address below as an example:
1500 E MAIN AVE STE 201 SPRINGFIELD VA 22162-1010
Example | Component Name | How would I set this input in Address Object? |
---|---|---|
1500 |
Address Range | SetParsedAddressRange |
E |
PreDirection* | SetParsedPreDirection* |
MAIN |
Street Name | SetParsedStreetName |
AVE |
Suffix | SetParsedSuffix |
STE |
Suite Name | SetParsedSuiteName |
201 |
Suite Suffix | SetParsedSuiteRange |
SPRINGFIELD |
City | SetCity |
VA |
State | SetState |
22162 |
Zip Code | SetZip |
-1010 |
Zip+4 | SetPlus4 |
*An address could also have a PostDirection after the suffix, which would be handled similarly.
You can verify a PO Box or PMB as well! Not sure what those are? Check out the glossary for definitions!
Example | Component Name | How would I set this input in Address Object? |
---|---|---|
PO BOX 1234 |
Address Line 1 or Street Address | SetAddress |
SPRINGFIELD NY 12345 |
City, State, Zip Code, Zip+4 | SetCity, SetState, SetZip, SetPlus4 |
Did you know some Puerto Rican addresses can have the same street address and city as another Puerto Rican Address in the same Zip Code™? To cut through the confusion, the USPS® has an an extra element, called an Urbanization. An address with an urbanization is often preceded by "URB" and lists the urbanization name.to identify locations with identical street names and address ranges found within the same ZIP Code™.
Example | Component Name | How would I set this input in Address Object? |
---|---|---|
URB ROYAL OAKS |
Urbanization | SetUrbanization |
123 CALLE 1 |
Address Line 1 or Street Address | SetAddress |
SAN JUAN PR 12345-6789 |
City, State, Zip Code, Zip+4 | SetCity, SetState, SetZip, SetPlus4 |
Canadian addresses have pretty similar components to US addresses - switch out a state for a province and you've pretty much got it down! However, there are a couple of different components, that we will go over in more detail here.
Canada has two different types of addresses: Civic and Postal Installation.
Civic address types are like the basic US address that you might be familiar with (if not, check out the previous section). While Postal Installation addresses consist of a description of the type of delivery, the Canada Post delivery installation name, the municipality name, the province code and postal code. We'll go into more detail about Postal Installation addresses now.
There are three types of Postal Installation addresses:
The Delivery Installation is generally preceded by an abbreviation such as STN, RPO, or LCD.
*In Canada, a Lock Box is the equivalent of a US PO Box (and it sometimes still called a PO Box or Postal Box).
Example | Component Name | How would I set this input in Address Object? |
---|---|---|
PO BOX 1234 STN 1 |
AddressLine 1 or Street Address. Delivery Installation ("STN 1") | SetParsedLockBox, SetParsedDeliveryInstallation |
VICTORIA BC V8P 5L4 |
City, State, Zip Code* | SetCity, SetState, SetZip, SetPlus4 |
*In Canada, the Zip Code™ equivalent is called a Postal Code, but you will still use the "Zip" methods, so we will continue to refer to it as a zip code.
A General Delivery Address will just have "GD" in one line, and the city, state, and zip code in the last line.
Example | Component Name | How would I set this input in Address Object? |
---|---|---|
GD |
Delivery Installation | SetParsedDeliveryInstallation |
VICTORIA BC V8P 5L4 |
City, State, Zip Code | SetCity, SetState, SetZip, SetPlus4 |
Route Service addresses are often in rural areas with no street address. To make up for this, these addresses will often use a rural route identifier (preceded by "RR").
An address with a Route Service component can include a few different elements:
Example | Component Name | How would I set this input in Address Object? |
---|---|---|
123 CEDAR ST |
Address Line 1 or Street Address | SetAddress |
RR 4 |
Route Service (also called rural route identifier) | SetParsedRouteService, or as part of SetAddress |
VICTORIA BC V8P 5L4 |
City, State, Zip Code | SetCity, SetState, SetZip |
These are a few common USPS® standard abbreviations. For a full list of these abbreviations, see the USPS® web site.
Primary Name | USPS® Standard |
---|---|
AVENUE | AVE |
BOULEVARD | BLVD |
BRIDGE | BRG |
CIRCLE | CIR |
COURT | CT |
CROSSING | |
CROSSROAD | XRD |
DRIVE | DR |
EXPRESSWAY | EXPY |
FREEWAY | FWY |
HIGHWAY | HWY |
JUNCTION | JCT |
LANE | LN |
MOTORWAY | MTWY |
MOUNT | MT |
PARKWAY | PKWY |
ROAD | RD |
ROUTE | RTE |
STREET | ST |
TRAIL | TRL |
VILLAGE | VLG |
Primary Name | USPS Standard |
---|---|
North | N |
Northeast | NE |
East | E |
Southeast | SE |
South | S |
Southwest | SW |
West | W |
Northwest | NW |
These methods retrieve CASS™ Form 3553 and return the information used to populate the form.
GetPS3553_B6_TotalRecords
GetPS3553_C1a_4Coded
GetPS3553_C1d_FiveDigitCoded
GetPS3553_C1e_CRRTCoded
GetPS3553_C1f_eLOTAssigned
GetPS3553_E_EWSCount
GetPS3553_E_HighRiseDefault
GetPS3553_E_HighRiseExact
GetPS3553_E_LACSCount
GetPS3553_E_RuralRouteDefault
GetPS3553_E_RuralRouteExact
GetPS3553_X_SuiteLinkCodeACount
These methods return details on the SOA™ processing of your Canadian addresses.
GetSOAAAExpiryDate
GetSOAErrorString
GetSOASoftwareInfo
GetSOATotalRecords
GetSOAAAPercentage
This returns the percentage of accurate Canadian records processed since either ResetFormSOA
was called or the current instance of Address Object was created.
These methods have been deprecated and you should not use them. We are keeping them here just so you know what's up. But don't use them. You've been warned.
The following methods have all been deprecated in favor of using GetResults
to simplify the address verification process.
GetStatusCode
GetErrorCode
GetErrorString
GetDPVFootnotes
GetSuiteStatus
These are additional outputs available in the object that are either deprecated or not frequently used. They return information about the level and types of data matches found after calling VerifyAddress
. They aren't really needed anymore, but are here for backwards compatibility.
GetEWSCount
GetEWSFlag
GetLACS
GetCMRA
GetLACSLinkIndicator
GetLACSLinkReturnCode
GetSuiteLinkReturnCode
GetELotNumber
GetELotOrder
The Metropolitan Statistical Area (MSA) and Primary Metropolitan Statistical Area (PMSA) information is no longer updated, so the following methods are deprecated.
These methods are also deprecated for the ZipData Interface.
GetMSA
GetPMSA
The following methods were deprecated because their respective fields were removed from the CASS™ form.
GetPS3553_C1c_DPBCAssigned
GetPS3553_E_DPVCount
IsAddressInRange
This method was deprecated because it did not consider whether the address range to be tested contained odd, even, or both types of numbers. It has been superceded with IsAddressInRange2
.