|
RightAddress
online real-time data hygiene and enhancement tool
|

|
|

|
|
|
|
Index
-
What is RightAddress?
-
How can
RightAddress be used to process my data?
-
What data can be returned by RightAddress?
3.1
SOA Codes
3.2 SOA Reason Codes
-
Sample setup for VB.NET2003
-
Sample setup for VB.NET 2005
-
Sample setup for Java web integration
6.1. Required Tools
6.1.1.
Download JAVA Sample Source Code
6.2.
Creating Web Services Artifacts
6.3. Using the
Artifacts 6.4.
Within an IDE
-
Sample
setup for processing a database using MS Access
7.2.11 Download
Sample MS Access application
|
|
1.
What is RightAddress? |
|
RightAddress is an online web service that enables any modern computer
application to format and enhance any NZ or Australian address in real
time. RightAddress uses Acxiom’s NZ and Australian PAFlink software to provide
address verification against both the NZ Post and Australia Post Postal
Address Files, on a record per record basis. Thereby enabling a
single Australasian database to have correct address details for both
Australian and NZ addresses.
RightAddress ensures the address data held in your computer systems is
formatted correctly with correct PostCodes, DPID's, MeshBlocks, XY
Coordinates, Stat Boundaries etc.
No
need for the expensive and risky extraction of addresses from your
system, sending them to a third party and then reloading them back into
your database a week or so later. Hoping that you get the right address
with the right person and that nothing has changed in that week.
Marketing do not need to wait for updating before the extraction and
segmentation of customer data. The data is always as up to date as the
addresses you have.
RightAddress can be integrated into any modern database or system by
your internal systems support or package vendor support or development
people.
RightAddress will fulfil your statement of accuracy requirements
for New Zealand as an SOA classification code is returned for every New
Zealand address. This can be held against that address to assist with
manual systematic cleaning and updating.
Statement of
Accuracy reporting is also provided - allowing you to report on your
whole database or on any defined segment of your database.
|
|
2.
How can RightAddress
be used to process my data? |
|
RightAddress is
an online web service that can process data in two ways:
2.1. Online
integrated into your existing computer systems so that when any address is
entered or changes the new cleaned address and additional information is
returned and can be used to update your database.
RightAddress will analyse your address and return NZ or Australian details or an
error code if the address is invalid, all in real time with no logic required on
within your application.
For example a user may enter
an address into a call centre application or account maintenance form and
immediately* the standardised, corrected and enhanced address details are
returned. Depending upon your application these details can be either
written directly into your database or displayed prior to the record being saved into the system.
2.2. When
integrated into your customer facing web forms a customer can enter their
address and after clicking submit (or immediately with some web development
technologies) the enhanced address can be displayed over or next to the entered
address.
|
|
3. What data
is returned by RightAddress |
|
Different packages are
available to return different sets of data.
| Input fields to
RightAddress |
Field |
Type |
Description |
| |
Token |
text |
token returned by
call to login |
| |
Key
Code |
text |
reporting code
for this record |
| |
Active |
boolean |
indicates whether this is an
active address for statement of accuracy processing |
| |
Line1 |
text |
input line 1 of the address.
Please note
"limitations with
RightAddress" |
| |
Line 2 |
text |
input line 2 of the address.
|
| |
Line 3 |
text |
input line 3 of the address.
|
| |
Line 4 |
text |
input line 4 of the address.
|
| |
Line 5 |
text |
input line 5 of the address.
|
| |
Line 6 |
text |
input line 6 of the address.
|
| |
Line 7 |
text |
input line 7 of the address.
|
| |
Post Code |
text |
post code of the address, if
known.
|
Data Returned depending upon your
RightAddress purchased Package.
| Basic Package
(NZ and AUS) |
Field |
Type |
Description |
| |
Line1 |
text |
cleaned line 1 of the address.
Please note
"limitations with
RightAddress" |
| |
Line 2 |
text |
reformatted line 2 of the
address.
|
| |
Line 3 |
text |
reformatted line 3 of the
address.
|
| |
Line 4 |
text |
reformatted line 4 of the
address.
|
| |
Line 5 |
text |
reformatted line 5 of the
address.
|
| |
Line 6 |
text |
reformatted line 6 of the
address.
|
| |
Line 7 |
text |
reformatted line 7 of the
address.
|
| |
Country |
text |
the Country of the returned
address |
| |
Postcode |
text |
New NZ Post Postcode |
| |
DPID |
text |
While the
term “DPID” is used a unique delivery point identifier does not
yet exist for the NZ PAF. Currently a reference number,
known as the Delivery Address Identifier, is returned in place
of the DPID. |
| |
RD Number |
text |
|
| |
Error Code |
Integer |
is a code indicating the reason why a match was
not made. |
| |
Error Reason |
text |
is the description
indicating the reason why a match was not made. |
| |
Format Flag |
boolean |
if there is enough data to
correctly format the address this is set to true otherwise set
to false |
| |
|
|
|
| |
SOACode |
text |
The record
classification for the purpose of the Statement of Accuracy.
See SOA Codes |
| |
SOAReason |
text |
The reason
why a record has been classified as INVALID. See
SOA Reason Code |
| |
Street Number |
text |
The street number of the
address eg 23a |
| |
Street Name |
text |
The name of the Street eg
"Vaughans" |
| |
Street Type |
text |
Cres, Place etc |
| |
Town or City
Or
State for AUS |
text |
|
| |
StreetType Suffix |
text |
|
| |
Suburb |
text |
|
| |
Postal Delivery Type |
text |
|
| |
Postal Delivery Number |
Text |
|
| |
|
|
|
Meshblock
Package
(NZ Only) |
Field |
Type |
Description |
| |
Meshblock |
Integer |
Meshblock code |
| |
Errorcode |
text |
is a code indicating the reason why a match was
not made. |
| |
ErrorReason |
text |
is the description
indicating the reason why a match was not made. |
| |
|
|
|
| |
|
|
|
XY Package
(NZ Only) |
Field |
Type |
Description |
| |
Latitude |
double |
Latitude |
| |
Longitude |
double |
Longitude |
| |
X coordinate |
Integer |
X coordinate |
| |
Y coordinate |
Integer |
Y coordinate |
| |
Errorcode |
text |
is a code indicating the reason why a match was
not made. |
| |
ErrorReason |
text |
is the description
indicating the reason why a match was not made. |
| |
|
|
|
| Statistical
Boundary(NZ Only) |
|
|
|
| |
Region Code |
|
|
| |
Region Name |
|
|
| |
Area Unit Code |
|
|
| |
Area Unit Name |
|
|
| |
Territory Code |
|
|
| |
Territory Name |
|
|
| |
|
|
|
|
|
Limitations with RightAddress.
The Postal Address File contains only
address data. This means that additional information such as individual
and company names will not assist in verifying addresses through
RightAddress. Any name information should be kept separate from address
information to avoid confusion when the address is being parsed and
matched.
RightAddress searches in
address fields for abbreviations of address elements such as flat or
unit type, floor type, street type, and street suffix. In some cases
these are one or two character abbreviations. It is possible for
non-address data to contain these abbreviations and if not specified as
non-address data,
RightAddress will add the full element name to the output
address, producing an incorrect match (albeit, correct by the rules).
Take the following example input containing an account designation:
G SMITH
70 GRAMPIAN RD
ST HELLIERS
AUCKLAND 1005
This can produce the
following corrected address output:
GROUND FLOOR SMITH
70 GRAMPIAN ROAD
ST HELLIERS
AUCKLAND 1005
which is obviously
not what was intended.
|
|
The SOA, or
StatementOfAccuracyCode field indicates the classification of a record for the purpose of the Statement
of Accuracy.
|
Code |
Description |
|
VALID-U |
The input record matches exactly to a record on the PAF |
|
VALID-B |
The input record matches to the PAF at the street number level but
contains unrecognized secondary information |
|
INVALID |
The record cannot be matched to the PAF or is incorrectly formatted |
|
IGNORE |
Some records are not counted when generating a Statement of Accuracy,
the PAFlink software will classify these records as IGNORE where found:
·
Community Mail Box
·
Post Restante
·
Overseas/International
·
Counter Delivery
·
Private Bags with no number
·
Inactive address records
·
Addresses maintained by other postal operators e.g. DX |
The SOR, or
StatementOfAccuracyReason field indicates why a record has been classified as INVALID for a Statement of
Accuracy.
|
Code |
Description |
|
CHG |
The address information requires some change in order to match to the
PAF. If input data is being evaluated there can be no changes
required in order to match that data to the PAF. For example, if
the record matches exactly except for the postcode which is old rather
than new then the SOA code must be set to INVALID. This code only
applies to when generating an SOA |
|
ERR |
The record could not be matched to the PAF. You should use the
allocation error code field to resolve the issue |
|
EXT |
There was extra information supplied with the street name which could
not be parsed or there is street and postal information within one
address |
|
IGN |
The record can be ignored for the SOA. There is no requirement to
change this address |
|
PCD |
Either the postcode did not exist, was incorrect or in the wrong
position |
|
SEC |
There is partial secondary information e.g. a FUT with no FUN. Or
a rural delivery address with building/level information |
|
RGN |
The record contained a street number range, this is only valid when
evaluating the input record |
|
REG |
The record contained redundant locale information. It could be
that it contained region information (e.g. Christchurch, 8001,
Canterbury) or it contained too much locale information (e.g. PO Box
123, Auckland City, Auckland Central, Auckland) |
The CHG, or
CorrectionCode field provides an indication as to the changes that have been made to the input
address elements during the matching process. The following table lists the
change codes that may be output from RightAddress either individually or in
combination, separated by a single space. The reported changes may sometimes
appear to reflect a more severe change than has occurred. Correction codes prefixed
with “NZ” have been made by the parser, the record may not ultimately be
verified against the PAF.
|
Code |
Description |
|
ATN |
Alternate street name –the
record has matched using an alternate street name. |
|
ATL |
Alternate locality name -the
record has matched using an alternate locality name. |
|
ATT |
Alternate town name – the
record has matched using an alternate town name. |
|
BOR |
Bordering locality – the
record has matched using a suburb adjacency. |
|
FUT |
Flat/Unit Type – the record
has matched with a different flat/unit type. The
input flat/unit type is returned rather than the PAF flat/unit type. |
|
LOC |
Suburb/locality The ALT
output address may not reflect this correction. The exception is if the
input contained two localities, and a match was obtained with the first
locality, no CHG is reported. In the reverse order, a change is
reported. |
|
PBL |
A Post Box Lobby name has
been corrected or added. |
|
PCD |
Postcode |
|
PDP |
Postal delivery number
prefix (addition of) |
|
PDS |
Postal delivery number
suffix (addition of) |
|
PDT |
Postal delivery type, only
deletion. If the input address had a street address too; a postal
delivery type is never changed |
|
STT |
State (Australian addresses
only) |
|
TH1 |
Street number or start of a
street number range |
|
THN |
Street name
(addition/change/deletion of one character or the transposition of two
characters) |
|
THT |
Street type, not including
standardisation of spelling |
|
TN2 |
Street number ending a range |
|
TOW |
Town |
|
TTS |
Street type suffix
(addition/deletion) |
|
RDN |
A rural delivery number has
been added, changed, or removed to match the PAF. |
|
NZCLN |
New Zealand Pre-parse
cleaning (NZ addresses only) |
|
NZDIS |
New Zealand District
corrected (NZ addresses only) |
|
NZTWN |
New Zealand Town corrected
(NZ addresses only) |
|
NZPCD |
New Zealand Postcode
corrected (NZ addresses only) |
|
NZMPC |
New Zealand Major Postcode
change
(NZ addresses only) |
|
NZLOC |
New Zealand Locale
Identified (NZ addresses only) |
The ERR, or ErrorCode
field indicates that either a fatal or non-fatal error has occurred. Error codes
in the range 1000 - 1999 should be treated as fatal errors and any results must
be discarded. Error codes in the range 2000 - 2999 are non fatal
allocation error codes, and indicate that a match, or exact match,
wasn’t found for the input address. Allocation error codes give a general reason
why a PAF match wasn’t found but as RightAddress tries to match through multiple
correction strategies care is needed in interpretation. Records with error codes
0, 2018 and 2020 are all returned with a DPID and an address. Records with an
error code of 2009 return a corrected/standardised address but no DPID. No DPID
allocation or address correction is performed for records returned with any
other allocation error code. Error codes in the range 3000 - 3999 indicate
an error has occurred during pre-processing of the request.
|
Code |
Description |
|
0 |
No error occurred. |
|
1000 - 1999 |
A fatal error has occured while
processing the request. Results must be discarded. |
|
2001 |
The postcode couldn't be matched in some way. |
|
2002 |
The town couldn't be matched in some way. |
|
2003 |
The suburb couldn't be matched in some way. |
|
2004 |
The street name couldn't be matched in some way. Either the street
didn’t exist or the street did but not the street number. Also, when
PAFlink searched for the street in other localities in the same postcode
the search ended without finding the street on its last attempt. |
|
2005 |
The address could possibly be matched to more than one addresses. For
example, 61 MCDONALD ST, GISBORNE. This could be matched to either:
61 MACDONALD STREET, ELGIN, GISBORNE or
61 MCDONALD ROAD, R D 1, GISBORNE
Another example of ambiguity might be where a locality and postcode
don't match. Where the locality and postcode don't match, an attempt is
made to find the street in all possible candidates. Where the street
name occurs twice, this is regarded as ambiguous. |
|
2006 |
The street/building number couldn’t be found for this street. |
|
2007 |
The postal delivery type couldn't be found for this locality / postcode. |
|
2008 |
The number couldn't be matched for this delivery type within this
locality / postcode. |
|
2009 |
The street address matched to a phantom primary point, a DPID could not
be returned. This record has matched to the PAF and a corrected,
standardised address can be returned however, unless secondary
information can be obtained for the address a DPID will not be
allocated. |
|
2011 |
The building type doesn't match the PAF. |
|
2013 |
The DPID given in the input line doesn't match a DPID on the PAF. This
code is not applicable to New Zealand data. |
|
2014 |
The lot number couldn't be found within this street & locality/postcode.
This code is not applicable to New Zealand data. |
|
2015 |
The building name doesn't match the PAF. |
|
2016 |
The DPID given in the input line was not found in the PAF. This code is
not applicable to New Zealand data. |
|
2017 |
The input was faulty in some way that meant further searching isn't
possible. |
|
2018 |
The flat, unit or floor or combination provided with the input address
couldn't be found, but a match was made at the street address level.
This is called a 'Primary Point' match. The address, and DPID, returned
relate to the street address on the PAF, and the secondary information
provided in the input record is also be returned to assist with
delivery. In cases where this allocation error is combined with unknown
data, the corrected address should be manually verified as in some cases
the unknown data may contain text that has been interpreted as an
address element. |
|
2020 |
The parser engine found some extra information it could not interpret. |
|
2021 |
Customer Information field contains invalid data. |
|
2022 |
Invalid format control code value. |
|
2023 |
The PAF data has expired. |
|
3001 |
Invalid token supplied to
RightAddress. This may occur if a session has timed out since
Login was called, or if a call to Login fails and no checking of the
returned token has been performed. |
|
3002 |
Invalid input format.
This code should never be returned. |
|
3003 |
Invalid output format.
This code should never be returned. |
|
3004 |
Insufficient access rights.
A call to RightAddress has failed due to insufficient access rights. |
|
3005 |
SetSessionOptions was unable
to set all options. Check which options have been enabled for your
account. |
|
3006 |
Maximum number of requests
for this session has been exceeded |
|
3007 |
Invalid credentials.
This may be returned when calling FormatAddressWithCredentials with an
invalid user name or password. |
|
|
4.
Sample for VB.NET in Visual Studio 2003 |
|
4.1. Open Visual Studio 2003
4.2. Click on the File menu, click
New and select Project

4.3. Select Windows Application
from the Templates, and enter the project name and location

4.4. From the Solution Explorer
right click on References and click Add Web Reference. If the Solution
Explorer is not open, open it by clicking on the View menu and selecting
Solution Explorer.

4.5. Type in the following URL for
the RightAddress web service
http://rightaddress.simplicitycrm.com/rightaddress.asmx

4.6. Click Go and wait for Visual
Studio to locate the RightAddress web service. If Visual Studio is unable
to locate the web service, check your internet connection and try again.
4.7. Change the Web reference name
to RightAddress and click Add Reference

4.8.
The RightAddress web reference is now available in your project

4.9. Create a test form and add
the required controls as below

4.10. To create the RightAddress service object use the following code:
Dim rightAddress As
RightAddress.RightAddressSvc
rightAddress = New RightAddress.RightAddressSvc
4.11. Log in to RightAddress
using the Login method, providing the client ID, user name and password.
If the login is successful a token will be returned which is used for
subsequent calls to RightAddress. The following code is used to log in to
RightAddress:
Dim token As String
token = rightAddress.Login(tbClientID.Text, tbUserName.Text,
tbPassword.Text)
4.12. The main method called when
using RightAddress is FormatAddress. The FormatAddress method performs
all the work, and will return the information specified in Section 3 of this
document based on which package has been purchased. NB: FormatAddress will
always return the same object type with an incomplete set of fields populated
for packages which have not been purchased. The following code is used to
call the FormatAddress method:
Dim address As rightAddress.Address
address = rightAddress.FormatAddress(token, "", True, tbAddressLine1.Text,
tbAddressLine2.Text, tbAddressLine3.Text, tbSuburb.Text, tbTown.Text,
tbCountry.Text, "", tbPostCode.Text)
4.13. When all processing is
complete, a call to the Logout method is required. Failure to call Logout
may result in future calls to Login being blocked for a short period of time.
RightAddress limits the number of concurrent sessions for each client ID, so
unless Logout is called RightAddress will wait until logged in sessions time
out before permitting a new session to begin. The following code is used
to log out from RightAddress:
rightAddress.Logout(token)
4.14.
Click here to download the Visual Studio 2003
RightAddress sample.
The sample solution contains complete VB.NET source code. The sample code is
a sample only and requires enhancement for production use. |
|
5.
Sample for VB.NET in Visual Studio 2005 |
|
5.1. Open Visual Studio 2005
5.2. Click on the File menu and
select New Project

5.3. Select Windows Application
from the Templates, and enter the project name

5.4. From the Solution Explorer
right click on the project and select Add Web Reference. If the Solution
Explorer is not open, open it by clicking on the View menu and selecting
Solution Explorer.

5.5. Type in the following URL
for the RightAddress web service
http://rightaddress.simplicitycrm.com/rightaddress.asmx

5.6. Click Go and wait for
Visual Studio to locate the RightAddress web service. If Visual Studio is
unable to locate the web service, check your internet connection and try again.
5.7. Change the Web reference
name to RightAddress and click Add Reference

5.8. The RightAddress web
reference is now available in your project

5.9. Create a test form and add
the required controls as below

5.10. To create the
RightAddress service object use the following code:
Dim rightAddress As
RightAddress.RightAddressSvc
rightAddress = New RightAddress.RightAddressSvc
5.11. Log in to RightAddress
using the Login method, providing the client ID, user name and password.
If the login is successful a token will be returned which is used for
subsequent calls to RightAddress. The following code is used to log in to
RightAddress:
Dim token As String
token = rightAddress.Login(tbClientID.Text, tbUserName.Text,
tbPassword.Text)
5.12. The main method called
when using RightAddress is FormatAddress. The FormatAddress method performs
all the work, and will return the information specified in Section 3 of this
document based on which package has been purchased. NB: FormatAddress will
always return the same object type with an incomplete set of fields populated
for packages which have not been purchased. The following code is used to
call the FormatAddress method:
Dim address As rightAddress.Address
address = rightAddress.FormatAddress(token, "", True, tbAddressLine1.Text,
tbAddressLine2.Text, tbAddressLine3.Text, tbSuburb.Text, tbTown.Text,
tbCountry.Text, "", tbPostCode.Text)
5.13. When all processing is
complete, a call to the Logout method is required. Failure to call Logout
may result in future calls to Login being blocked for a short period of time.
RightAddress limits the number of concurrent sessions for each client ID, so
unless Logout is called RightAddress will wait until logged in sessions time
out before permitting a new session to begin. The following code is used
to log out from RightAddress:
rightAddress.Logout(token)
5.14.
Click here to download the Visual Studio 2005
RightAddress sample.
The sample solution contains complete VB.NET source code. The sample code is
a sample only and requires enhancement for production use.
|
|
6.
Sample setup for JAVA |
|
6.1.
Required Tools
6.1.1
Download RightAddress JAVA Sample source code
6.2
Creating Web Service Artifacts
6.2.1. From the command line navigate to the
location of the installed Java platforms command line tools. This is usually
located at C:\Program Files\Java\jdk<versionnumber>\bin.
6.2.2. Run wsimport with the following arguments
wsimport -d <destdir> -s <srcdir> -p <packagename>
<webserviceurl>
-d <destdir> -:
The directory to place generated .class files.
-s <srcdir> -:
The directory to place generated .java files.
-p <packagename> -: Optional
package to place the files in.
<webserviceurl> -: The
url of the webservices service description.
Example:
webservice located at
http://services.simplicitycrm.com/addressright/addressright.asmx
wsimport
-d "C:\Documents and
Settings\Matthew Revell\My Documents\Tests\Java web service\BuildFiles"
-s "C:\Documents and
Settings\Matthew Revell\My Documents\Tests\Java web service\ SourceFiles"
-p addressrightsvc
http://services.simplicitycrm.com/addressright/addressright.asmx?WSDL
This creates a class for each operation in the
webservice plus two classes bearing the same name of the webservice. These two
classes, a Service Factory and an Interface, are used to call the
webservices methods.
In the above example these classes will be
AddressRightSvc and AddressRightSvcSoap.
6.3.
Using the Artifacts
6.3.1. If your implementing project is not in the
same package as the Web service files then it must be imported. If you
omitted the package argument then import using the folder structure created by
wsimport, this structure is usually the inverse of the webservice URL as per the
Java Language Specification.
Example: Package
addressrightsvc
Import addressrightsvc.*;
Example: Package argument
omitted
Import com.simplicitycrm.services.addressright.*;
6.3.2. To operate on the web
service requires an instance of the interface, which is instantiated using the
get method of the Service Factory class.
Example: Instantiating
the webservice
public
class Main{
public AddressRightSvc serviceFactory;
public AddressRightSvcSoap myService;
public void
CreateService(){
serviceFactory = new
AddressRightSvc();
myService = serviceFactory.getAddressRightSvcSoap();
}
}
6.3.3. The interface can then
be used to call methods on the web service as normal.
Example: Using the
webservice
public void LoginLogout(){
String
loginresult = myService.login("key",
"username",
"password");
myService.logout(loginresult);
}
6.4.
Within an IDE
Required Tools
6.4.1. Open Net Beans
6.4.2. Click on the File menu
and select New Project

6.4.3. Select Java Application
and click next
![]() | |