nCode Messages And Status Codes

nCode provides lots of feedback about the status of your addresses and what needs to be done to make them perfect. This article will tell you what kind of information is available and how you can use it.

Status Codes
When you analyze an address with nCode, it gives you helpful status information. The status codes available include:

  • Primary Status – tells you about the validity of your address.
  • Secondary Status – tells you about the kind of match that nCode made with the Canada Post reference data used to analyze your address.
  • Urban Indicator – tells you whether your address was matched using urban address or a rural address matching rules.

The values of the primary status code are: V, C, N, I, and F. The primary status code is retrieved using the nCode Toolkit avc_get_status() function. It is also the first character of the <strStatus> element of the nCode Web Services methods AnalyzeAddress and AnalyzeGetAlternatives.

An address that is valid (V) has all of the correct mandatory address elements. A valid address may need some cosmetic standardization, but it is essentially complete and accurate. It may also be merely Declared Valid. An address that is correctable (C) isn’t perfect, but nCode is confident that it has found one match that is better than any other potential matches. The address isn’t valid as input, but it is valid as modified by nCode. Note that when nCode corrects an address, it provides you with correction messages that explain what changes have been made – more on this below.

If nCode can’t match your address with confidence, it will give you one of these primary status codes: non-correctable (N) means there were no good matches or too many equally good matches. A status of invalid (I) is only issued when using the nCode validation feature. By default nCode operates in correction mode. In validation mode, nCode analyzes but doesn’t change your addresses. Status I is used for addresses which need corrections or which can’t be corrected automatically. Last, foreign addresses (F) are those which look to nCode like they are probably in the United States. nCode doesn’t correct U.S. addresses but it will tell you if it thinks an address is American.

The values of the secondary status code tell you more about what kind of Canada Post reference data matched your address. The primary status code is retrieved using the nCode Toolkit avc_get_second_status() function. It is also the second character of the <strStatus> element of the nCode Web Services methods AnalyzeAddress and AnalyzeGetAlternatives.

This code is often just a blank for typical matching scenarios. If it isn’t blank, it is usually telling you something about the address being an apartment or a rural address. You can see the nCode Toolkit API Reference for the avc_get_second_status() function for details of all of the values for this status code, however, there are two values that are particularly important, these are (A) and (Q), which are used for Questionable Addresses. Questionable addresses are acceptable to Canada Post but are known to be imperfect. If you can, you should try to resolve questionable addresses to ensure that you mail isn’t delayed or returned.

The values of the urban indicator are: U for urban addresses and R for rural addresses. The urban indicator is retrieved using the nCode Toolkit avc_get_urban_ind() function. It is also the third character of the <strStatus> element of the nCode Web Services methods AnalyzeAddress and AnalyzeGetAlternatives.

Correction Messages
In addition to status codes, nCode provides you with correction messages. These messages give you information about what nCode has changed in an address at the address element level. Valid addresses, which have no changes, may still have one or more element level informational messages. Correctable addresses will have one or more address element change messages. Non-correctable addresses can also have messages associated with the suggested possible matches that nCode provides. These messages describe the differences between what was input and what the suggested match would be.

Correction messages are retrieved using the nCode Toolkit avc_create_messages() and avc_get_msgcode() functions. They are a also provided as an array of ALTMessage elements in the response to the nCode Web Services AnalyzeGetAlternatives method.

Correction messages come in two parts, a code and a value. The code itself comes in three parts: a severity code, a message type code, and an address element code. The value is the correct address element value which nCode is suggesting. An example of a correction message is: 1M17 M5X1C7. This means: (1) serious error (M) missing element (17) Postal Code with the value M5X1C7.

See the nCode Toolkit API Reference for the avc_get_msgcode() function for a complete list of all of the possible code values for correction messages.

The status codes and correction messages are both human and machine readable, so you can use them for statistical reporting and for reporting status information to users in the language of your choice.

Other Messages
Many other nCode Toolkit functions and nCode Web Services methods provide status message information. These messages are available in English and provide you with feedback about nCode data quality operations like address analysis, searching and transformation.

If you’d like to know more about the status information that nCode provides, contact us and we will be happy to assist you.

Post a Reply