DataTools Kleber Guides
Match Key Detail
Matching Methods
Kleber has a number of matching methods that can create unique match keys for your data to help identify duplicates quickly and easily.
Kleber creates matching keys in 3 varieties – Tight, Standard and Loose. Which one you choose to use will depend upon the situation and business need for finding the matches in the first place.
- Tight keys allow for little difference between matches. Tight keys are useful for matching where no user interaction is available.
- Loose keys will identify a lot more matches, some of which may be questionable, but will assist in identifying the last few percent of matches that are difficult to find. Loose Keys should never be used without user interaction to verify matches.
- Standard keys are a good balance between Tight and Loose key and depending on the outcome required may be used without user interaction.
EXPERT TIP: When trying to work out which match key/s to use from the many available – it’s best to initially test the keys on large quantities of data with someone verifying the results.
That way you can see which key or combination of keys best suits your business requirements.
What match keys are available in Kleber?
The 5 match methods create the following match keys:
1. DataTools.Match.Address.Au.CreateKeys
- Standard Address Key
- Tight Address Key
- Loose Address Key
- Address Locality
2. DataTools.Match.BusinessName.CreateKeys
- Standard Business Name Key
- Tight Business Name Key
- Loose Business Name Key
3. DataTools.Match.PersonName.CreateKeys
- Standard Person Name Key
- Tight Person Name Key
- Loose Person Name Key
4. DataTools.Match.BusinessNameAndAddress.Au.CreateKeys
- Standard Business Name and Standard Address Key
- Tight Business Name and Standard Address Key
- Loose Business Name and Tight Address Key
- Standard Business Name Key
- Tight Business Name Key
- Loose Business Name Key
- Standard Address Key
- Tight Address Key
- Loose Address Key
5. DataTools.Match.PersonNameAndAddress.Au.CreateKeys
- Standard Person Name and Standard Address Key
- Tight Person Name and Standard Address Key
- Tight Person Name and Loose Address Key
- Standard Person Name Key
- Tight Person Name Key
- Loose Person Name Key
- Standard Address Key
- Tight Address Key
- Loose Address Key
Detailed Explanations of the Match Keys
Standard Person and Standard Address matches
The base method used for detecting duplicated people. It allows for missing or differences in the unit or level numbers, and a balanced level of phonetic miss-spellings in the last name, street name or building name. In the example below the first name matches on initials only ie: “Alexandra”, “Alex” and “A” will all match as shown, as would “Anne” and “Albert”.
Tight Person and Standard Address matches
Keeps the same address rules as the Person and Address Method, but restricts the differences allowable in the first and last names to gain a match.
This is very useful when used along side the Person and Address Method because it will save you manually perusing these more certain results, allowing you to bring up only the more subjective results for review if desired.
In the example shown above only the first two records would match on Tight Person and Address. In the example below the first two records would be matched but the third record would require the standard Person and Address Method.
Tight Person and Loose Address matches
This finds matches where the first and last name match as in the Tight Person and Address Method, however it loosens up the address matching criteria to detect duplicates where records have missing or differing street numbers, and allows for phonetic matching on street and building names. This is a great way of netting extra tricky duplicates and is also used against other methods so that you only have to review the subjective results if desired.
Bundle/Brick packing a Print Post Job
This is only available to mail houses where approval from Australia Post has been given to them or you have applied for approval on a job-by-job bases.
For ULD’s not being linehauled Australia Post has added a further requirement, that residue mail is to be packed in trays and place on top of the brick packed ULD.
This requires some manual handling to remove the residue mail while packing the ULD, place them on the trays, print off a tray label and pack them on top of the ULDS.
How To Find And Check Task In AVM
Every job in AVM is a task. When you specify from where, how, who and if you file a task with a name you are already specifying a task. Every Task also has its own name. You will need to specify what are you going to do in the Task:
- Source data location
- Input data association
- Type of task Validation
- Name of task
- Output file name and location
- Scheduling the task (run right away, once a day etc)
Sample of using SOAP Envelope when calling Kleber
When using SOAP Envelope to call Kleber with Python code, you will need to make sure that the code includes ‘SOAPAction’ like shown in the sample below.
It should also be noted that when sending the request to Kleber service it must be as ‘Post’ when using SOAP as ‘Get’ is not allowed:
import requests url="http://kleber.datatoolscloud.net.au/KleberWebServiceSoap/DtKleberService.svc?wsdl" headers = {'content-type': 'text/xml','SOAPAction': 'http://tempuri.org/IDtKleberService/ProcessXmlRequest'} payload = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"> <soapenv:Header/> <soapenv:Body> <tem:ProcessXmlRequest> <!--Optional:--> <tem:DtXmlRequest> <DtRequest Method="DataTools.Verify.Address.AuPaf.VerifyAddress" AddressLine1="27 hunter st" AddressLine2="" AddressLine3="" AddressLine4="" AddressLine5="" AddressLine6="" Locality="PARRAMATTA" State="NSW" Postcode="2150" RequestId="3330053" RequestKey="" DepartmentCode="" /> </tem:DtXmlRequest> </tem:ProcessXmlRequest> </soapenv:Body> </soapenv:Envelope>""" response = requests.post(url,data=payload,headers=headers) print (response.content)
Batch address cleansing tips
For batch cleansing of address data you should pass the initial load through to the Verify method and the exceptions through to the Repair for advanced cleansing. To determine what you should send to the Repair method you should use the Match Type and the Field Changes outputs from the Verify method.
Below are the Match Type outputs. The main ones to look at are:
- Match Type of ‘0 – Correct’ it has successfully been able to return a properly formatted, validated address.
- Match Type of ’18 – Primary Point’ also returns a properly formatted address but be aware that these addresses have only been matched to the building address, not to the Unit / Apartment / Level number (as these are not typically required)
- Match Type of ’20 – Parser Warning’ usually means that something extra may have been in the address that it doesn’t recognise but the main address has been matched. It is worth considering these also.
Option Value | Option Description |
0 | Correct |
1 | Postcode couldn’t be matched |
2 | State couldn’t be matched |
3 | Locality couldn’t be matched |
4 | Street Name couldn’t be matched |
5 | Ambiguous |
6 | Street Number couldn’t be matched |
7 | Postal Type couldn’t be matched |
8 | Postal Number couldn’t be matched |
9 | Phantom Primary Point |
10 | Unit Number couldn’t be matched |
11 | Building Type couldn’t be matched |
12 | Level Type couldn’t be matched |
13 | DPID couldn’t be matched |
14 | Lot Number couldn’t be matched |
15 | Building Name couldn’t be matched |
18 | Primary Point |
20 | Parser Warning |
The ’Field Changes’ field will identify any changes that needed to be made to validate the address.
The ones to be aware of here are GID and LID. This means that the address could only be validated to the Street or Locality for that suburb and have been provided with a Group DID. Mostly this is for remote areas where the postie doesn’t deliver to individual houses but getting this result means mail will be delivered to the spot that the locals collect their mail from.
Option Value | Option Description |
PCD | Postcode |
LOC | Locality |
STT | State |
THN | Street name |
THT | Street type eg. ST, RD |
TTS | Street type suffix eg. N, S, E, W |
TN1 | Street Number 1 |
TN2 | Street Number 2 |
PDT | Postal delivery type eg. PO Box |
PDP | Post Box Number Prefix |
PDS | Post Box Number Suffix |
BOR | Matched to alternative locality |
ATN | Matched to alternative street name |
FUT | Flat/Unit Type |
GID | Match that could only be made to the group or street level and issued a group DID |
LID | Match that could only be made to the locality level and issued a group DID |
Recommendation
Therefore my recommendation as to what to pass through to the Repair are as follows:
If the Verify method outputs the following
If MatchType = 0 or MatchType = 18 or Match Type = 20 and
If FieldChanges = ‘Not GID or LID’ Then
Do not pass to the Repair. The address is verified
Else If FieldChanges contains “GID” or FieldChanges contains “LID” Then
‘Pass to the Repair, as the address returned is only verified to a Street or Locality level
Else
‘PASS to the Repair
National Change of Address (NCOA) FAQ
How long is deceased and redirect information kept in the NCOA database?
The NCOA database contains 7 years’ worth of data.
When people move, what is the most common redirection service chosen?
The majority of people apply for a six month redirection service with a quarter electing to extend their redirection service for an additional period.
What percentage agree to have their new address shared?
The percentage that agree to have their new address shared is 35% on average. Please note that this is an opt-in service.
Address Repair Allocation Flags
As a query record is processed in Kleber Repair and PafLink Address Tune collects flags, representing the type of match. From these flags, scores are derived. These flags are outputted in the Kleber Repair AllocationFlag and PafLink FLA fields. The flags are as follows:
Flag | Description |
L-EXACT | locality exact, including postcode, state |
L-NAMEXACT | locality spelling exact |
L-SPELLING | locality spelling correction |
L-SHORT | subset |
L-PCODEDIFF | postcode different |
L-LOCDIFF | locality different, based on postcode |
L-STATEDIFF | state is different, only allowed if postcode matches |
L-PCODEMISS | postcode missing |
L-LOCMISS | locality missing, based on postcode |
L-STATEMISS | state is missing |
L-NOTEXACT | there is an exact match, and this isn’t |
L-NEAR | neighbouring locality contains street |
L-LOC2 | locality 2, slightly less points |
L-BOXSHORT | PO Box and Short |
S-EXACT | group exact match, including postcode, state |
S-NAMEXACT | street spelling exact |
S-FIRSTCHAR | street first char compare |
S-SOUNDS | street first char compare |
S-SPELLING | street match spelling |
S-SHORT | street match subset |
S-TYPEDIFF | street type different |
S-SUFFDIFF | street type suffix changed |
S-TYPEMISS | input street type missing |
S-SUFFMISS | input street type suffix missing |
S-NOTEXACT | there is an exact match, and this isn’t |
D-PDTOK | postal delivery type is present |
D-PDTNOTFOUND | postal delivery type not present |
P-NUMOK | number in range |
P-NUMBAD | number out of range |
Address Repair Confidence
The Kleber Repair ConfidenceScore and PafLink CON fields represents the scores, or confidence levels of the address match. It is an output field and contains four comma-separated numbers. These numbers represent score values, with lower numbers being better scores. Zero should mean a perfect match, no address change other than standardisation of codes.
The first number is the sum of the other three fields, or total confidence points. The second number is a score for locality, state and postcode, or ‘last line’ points.
The third field is a score for the street name, street type, and street suffix. Alternatively, or in addition, it will also represent a score for a postal delivery type e.g. PO BOX. You will get a score if a locality does not have the requested postal delivery type.
The last field is the score for the house number, lot number or postal delivery number. Address Tune keeps the lowest and highest house number for the street in the PAF. When the house number in the input record is outside of the PAF range, a penalty score is given. House numbers might not be in the PAF, so not matching a house number is not in itself enough to have an address rejected, but it attracts a heavy penalty.
If no match at all can be made for a locality or street, then an ‘X’ is used instead of a score. The total will also be ‘X’.
Concatenation Logic for New Zealand Address Fields
If either [UnitNumber] or [LevelNumber] are not blank then
1st Address line – [UnitType] [UnitNumber] [LevelType] [LevelNumber]
2nd Address line – [StreetNumber1] [StreetNumberSuffix1] [StreetName] [StreetType] [StreetSuffix]
If [UnitNumber] or [LevelNumber] are both blank then
1st Address line – [StreetNumber1] [StreetNumberSuffix1] [StreetName] [StreetType] [StreetSuffix]
If [PostBoxNumber] is not blank then
1st Address line – [PostBoxType] [PostBoxNumber]
If [RdNumber] is not blank then
2nd Address line – “RD” [RdNumber]
If either [Suburb] or [LobbyName] are not blank then
Second Last Address line – [Suburb] or [LobbyName]
Last Address line – [TownCityMailtown] [Postcode]
How Email Spam Traps Are Handled
Wondering how email spam traps are handled by the DataTools.Verify.Email.BriteVerify.VerifyEmail method in Kleber?
The email verification provider removes Typo Spam Traps (Domains such as Yaho.com, Hotmaail.com, Aool.com, etc which make up a large majority of spam traps) and Repurposed Email Domains that have been turned into spam traps. However, they do not aid in the removal of primary spam traps.
The email verification is conducted in real time at the point of call by checking with the email domains for whether the email is Valid, Invalid, Accept All or Unknown. It will also indicate whether an email is a Disposable/Role address.
You may also refer to this link for reference https://assist.datatools.com.au/email-verification-notes/ for the Status Codes and Descriptions.
NZKMS method dataset updated now with combined PAF/NZAD data
As part of the September 2020 update, we have made some substantial changes to the below methods to improve searchability and the user experience. These changes will not affect the way you interface with these methods and won’t require any software changes.
DataTools.Capture.Address.Predictive.Nzad.SearchAddress
DataTools.Capture.Address.Predictive.NzPaf.SearchAddress
Note: If you are still using the two below discontinued methods that we retired in November 2016, there will be a slight change:
DataTools.Capture.Address.Predictive.NzKms.SearchAddress
DataTools.Capture.Address.Predictive.NzKms.RetrieveAddress
These NZKMS methods are now using the same NZAD data as the NZ PAF and NZAD methods.
The same parameters should be excepted, and the same output fields provided.
Most of the values for the output fields are very similar, except for the following fields where the equivalent values are not available in NZAD.
- AltStreetName, AltStreetType& AltStreetSuffix – Fields are now always output as blank.
- PostalSuburb, PostalTown & PostalPostcode- Fields are now always the same as Suburb, TownCityMailtown & Postcode
- MB06 – Now NZAD Mechblockwhich looks the same
- TA – Now NZAD TA Name
- Region – Now TA Name instead
- Latitude & Longtitude- Now WGS84 Latitude & Longtitude
- AreaUnit& WardDescription – Now Regional Council Name instead
- UrbanRural- Address Type
How to interpret address verification response
ADDRESSES – DataTools.Repair.Address.AuPaf.RepairAddress
The Repair method returns many output fields. The two that should be looked at in particular are the Match Type and the Field Changes.
Below are the Match Type outputs. The main ones to look at are:
- Match Type of ‘0 – Correct’ it has successfully been able to return a properly formatted, validated address.
- Match Type of ’18 -Primary Point’ also returns a properly formatted address but be aware that these addresses have only been matched to the building address, not to the unit/apartment number.
- Match Type of ‘9 – Phantom Primary Point’ doesn’t return an address. The address exists but it requires a unit number to match. To increase your data’s accuracy, you could implement a message to the customer for this Match Type result of ‘9’ requesting the user to add a unit number to the address.
- Match Type of ’20 – Parser Warning’ usually means that something extra may have been in the address that it doesn’t recognise but the main address has been matched. It is worth considering these also.
Option Value | Option Description |
0 | Correct |
1 | Postcode couldn’t be matched |
2 | State couldn’t be matched |
3 | Locality couldn’t be matched |
4 | Street Name couldn’t be matched |
5 | Ambiguous |
6 | Street Number couldn’t be matched |
7 | Postal Type couldn’t be matched |
8 | Postal Number couldn’t be matched |
9 | Phantom Primary Point |
10 | Unit Number couldn’t be matched |
11 | Building Type couldn’t be matched |
12 | Level Type couldn’t be matched |
13 | DPID couldn’t be matched |
14 | Lot Number couldn’t be matched |
15 | Building Name couldn’t be matched |
18 | Primary Point |
20 | Parser Warning |
The ’Field Changes’ field will identify any changes that were required to make the address correct, in case you want to add a user prompt to confirm these changes.
Ones to be aware of here are GID and LID. This means that the address could only be validated to the Street or Locality for that suburb and have been provided with a Group DID. Mostly this is for remote areas where the postie doesn’t deliver to individual houses but getting this result means mail will be delivered to the spot that the locals collect their mail from.
Option Value | Option Description |
PCD | Postcode |
LOC | Locality |
STT | State |
THN | Street name |
THT | Street type eg. ST, RD |
TTS | Street type suffix eg. N, S, E, W |
TN1 | Street Number 1 |
TN2 | Street Number 2 |
PDT | Postal delivery type eg. PO Box |
PDP | Post Box Number Prefix |
PDS | Post Box Number Suffix |
BOR | Matched to alternative locality |
ATN | Matched to alternative street name |
FUT | Flat/Unit Type |
GID | Match that could only be made to the group or street level and issued a group DID |
LID | Match that could only be made to the locality level and issued a group DID |
If MatchType = 0 or MatchType = 18 Then
If FieldChanges = ‘ ’ Then
‘CORRECT
Else If FieldChanges contains “GID” or FieldChanges contains “LID” Then
‘CORRECT but only verified to a Street or Locality level
else
‘CORRECT with amendments
Else If MatchType = 9 or MatchType = 20
‘CORRECT but further checking may be required
Else
‘NOT VALID
Click here for more technical information – Note: please use your Request Key to test this method.
How to interpret phone verification response
PHONE – DataTools.Verify.PhoneNumber.Equifax.VerifyPhoneNumberIsConnected
The Phone validation method verifies the connection status of landline or mobile telephone number across Australia and New Zealand in real time by checking with the providers.
Kleber Response | Website handling | Description |
CONNECTED | Valid
|
Connected: The telephone number is connected. |
DISCONNECTED | Invalid
|
Disconnected: The telephone number is not connected. |
INDETERMINATE | Unknown
|
Indeterminate: The telephone number returned an indeterminate status. The system could not reliably determine if the number is connected or disconnected. |
AUTH | Critical errors
|
Invalid authentication information. Please check your Phone Number Account Key. |
SUSPENDED | Your account has been suspended. Please contact support. | |
MALFORMED | The required fields are not present or malformed. | |
FAILED | Internal system error. Retry again in 60 seconds. | |
UNKNOWN | Unknown error | |
NOPHONENUMBER | Invalid
|
No phone number provided |
NOTE: Some phone numbers can be blocked or restricted such as military or government officials etc. These will return an indeterminate status in these cases.
These are all the output fields from the Phone Method
Field | Description |
StatusCode | Returns a code that indicates if the phone number is valid (as above) |
StatusDescription | A meaningful description of the error |
Response | Response from webservice [Option Values] |
RidNumber | The RID number that is applicable |
If StatusCode = 0 Then
‘CORRECT
Else If StatusCode = 2
‘Unknown but further checking may be required
Else If StatusCode = 1
‘NOT VALID
How to interpret email verification response
EMAIL – DataTools.Verify.Email.BriteVerify.VerifyEmail
Email verification is completed in real time by connecting to the domain. The method returns the below status codes and descriptions:
Option Value | Option Description |
0 | Valid: The email represents a real account / inbox available at the given domain. |
1 | Accept All: These are domains that respond to every verification request in the affirmative, and therefore cannot be fully verified. |
2 | Invalid: Not a real email. Additional details are provided in DtStatusDescription. E.g Email domain invalid or Email account invalid. |
3 | Unknown: For some reason we cannot verify valid or invalid. Most of the time a domain did not respond quickly enough. |
NOTE: The unknown response means the email address looks good, but the associated domain is not responding. This could be a temporary status for domains having intermittent issues or a permanent issue for dead domains. They wait 10 seconds for the domain to give a response. If it times out – they cannot conclusively determine the result, so mark it as unknown. The provider says that it doesn’t consider unknown as a false response though and find that sometimes unknowns change to Valid / Invalid / Accept all after verification at a later date.
Below is a table with all the output fields from the Email Method.
Output Fields:
Field | Description |
StatusCode | Returns a code that indicates if the email is valid (see above) |
StatusDescription | A meaningful description of the error |
EmailAccount | The inbox or account parsed from the email eg ‘office’ from office@datatools.com.au |
EmailDomain | The domain parsed from the email eg ‘datatools.com.au’ from office@datatools.com.au |
Connected | Whether or not a valid email is connected to active online networks |
Disposable | Is the email a temporary or ‘disposable’ email address |
RoleAddress | Role address are email address that are set aside for functions, not people |
If StatusCode = 0 or StatusCode = 1 Then
‘CORRECT
Else If StatusCode = 3
‘CORRECT but further checking may be required
Else If StatusCode = 2
‘NOT VALID
Click here for more technical information – Note: please use your Request Key to test this method.
Address Allocated a Group DID
If an address is not found using the DataTools.Capture.Address.Predictive.AuPaf.SearchAddress but is coming up as correct in the DataTools.Verify.Address.AuPaf.VerifyAddress method but returns a LID or GID Code in the ‘FieldChanges’ field.
This means the address was allocated a Group DID for the following reason:
LID – Match that could only be made to the locality level and issued a group DID
GID – Match that could only be made to the group or street level and issued a group DID
Where can I find my Terms and Conditions
Kleber Terms and Conditions can be viewed by logging into your Kleber My Account area and selecting the My Profile section.
Steps to integrate International Address Validation into the Qualtrics system
For a complete sample file, scroll to the bottom of the guide
- Once you have completed setting up your survey choose which question blocks you need to add validation too.
- Click on the ‘gear’ icon on the left side of your question block:
- You will then see several options but the one we want is ‘Add JavaScript…’ as shown below:
- When the JavaScript screen pops up click on the option “Full Screen” in the bottom left corner to make it easier.
- The screen should be pre-populated with the following:
- We will be placing our code in the ‘addOnReady’ function, starting with the following section of code:
This section of code will allow us to use a different version of jQuery and jQueryUi, which allows the autocomplete/ajax code to work on the survey, as well as:
- It will set the variable for your Kleber RequestKey
- A label that will display to the client if the response was valid or invalid
- Next, we will add the code that calls the Kleber platform to validate the address field:
- Whilst not shown we can also set ‘minLength’ option of the autocomplete so that the search will only fire after a set number of characters
- This code will pass values entered into the address field, to Kleber platform, where it will process and return possible addresses
- We temporarily remove the ‘# results’ from the end of some strings as they are not needed, then pass the new string as a possible suggestion
- This next section will be how we handle the retrieve method when a customer selects an address, as well as what to do if the user doesnt select an address at all.
- When a user selects an address we set an id variable and save the id as an array
- We then check the first index of the array variable to determine which retireve method we should call next
- With the international search, addresses from either the UK or Canada have a seperate retrieve price so we need to use those specific retrieves
- When the user closes the search window without selecting an address, we set the other fields to empty and set a label to “Invalid”
- This section is for the function that will handle the Retrieve method for countries other then the UK or Canada.
- Here we will populate the data with the recordId from the search method
- In the response we will populate our fields with the returned address data
- We have left the debug to console just to verify that the function works
- This section we will be dealing with the function responsible for results when search a Canadian address
- Here we will populate the data with the recordId from the search method and will also use a different retrieve method
- In the response we will populate our fields with the returned address data
- We have left the debug to console just to verify that the function works
- This section we will be dealing with the function responsible for results when search an UK address
- Here we will populate the data with the recordId from the search method and will also use a different retrieve method
- In the response we will populate our fields with the returned address data
- We have left the debug to console just to verify that the function works
Congratulations! You have just integrated Kleber Email Validation into your Qualtrics survey. Please look at some of the other step-by-step guides if you wish to add additional validation.
Complete Sample code
Steps to Integrate Email Validation Into the Qualtrics system
For a complete sample file, scroll to the bottom of the guide.
- Once you have completed setting up your survey choose which question blocks you need to add validation too.
- Click on the ‘gear’ icon on the left side of your question block:
- You will then see several options but the one we want is ‘Add JavaScript…’ as shown below:
- When the JavaScript screen pops up click on the option “Full Screen” in the bottom left corner to make it easier.
- The screen should be pre-populated with the following:
- We will be placing our code in the ‘addOnReady’ function, starting with the following section of code:
This section of code will allow us to use a different version of jQuery and jQueryUi, which allows the autocomplete/ajax code to work on the survey, as well as:- It will set the variable for your Kleber RequestKey
- A label that will display to the client if the response was valid or invalid
- Next, we will add the code that calls the Kleber platform to validate the email field:
- Here we make it so that when the email field loses focus, it will attempt to validate the email
- If the call is successful we output the StatusCode for this sample but other fields are available
- If we had business rules to apply for when an email is valid/invalid we would call them here
Congratulations you have just integrated Kleber Email Validation into your Qualtrics survey.
Please look at some of the other step-by-step guides if you wish to add additional validation.
Complete Sample code
Steps to integrate Phone Validation into the Qualtrics system
For a complete sample file, scroll to the bottom of the guide
- Once you have completed setting up your survey choose which question blocks you need to add validation too.
- Click on the ‘gear’ icon on the left side of your question block:
- You will then see several options but the one we want is ‘Add JavaScript…’ as shown below:
- When the JavaScript screen pops up click on the option “Full Screen” in the bottom left corner to make it easier.
- The screen should be pre-populated with the following:
- We will be placing our code in the ‘addOnReady’ function, starting with the following section of code:
This section of code will allow us to use a different version of jQuery and jQueryUi, which allows the autocomplete/ajax code to work on the survey, as well as:
- Create the variables needed for the phone methods
- It will set the variable for your Kleber RequestKey
- A label that will display to the client if the response was valid or invalid
- Next, we will add the code that calls the Kleber platform to validate the first phone number field:
- Here we make it so that when the phone number field loses focus, it will attempt to validate the phone number
- If the call is sucessful we output the StatusCode for this sample but other fields are avilable
- If we had bsuiness rules to apply for when a phone number is valid/invalid we would call them here
- We then repeat the previous step another 2 times for the other 2 phone fields and make sure that all functions have their closing brackets in the correct spot
Congratulations you have just integrated Kleber Phone Validation into your Qualtrics survey.
Please look at some of the other step-by-step guides if you wish to add additional validation.
Complete Sample code
Landline validation – notes
Are you wondering why sometimes a VoIP number rings when using the – DataTools.Verify.PhoneNumber.ReachTel.VerifyPhoneNumberIsConnected method?
Where possible our 3rd Party Provider always tries to establish the connection status through the various carriers, however under their agreement that they have with their primary carrier (Telstra Wholesale), in the event that the query is congesting their network they place a short call to the handset to test the line directly. This is most common with VoIP handsets or large PBX phone systems.
To ensure compliance with the Telecommunications and Research Industry Act 2007, they ensure that landline validation is only conducted between the hours of:
Monday to Friday: 8am – 8pm
Saturday / Sunday: 10am – 5pm
Steps to integrate Australian Address Capture into the Qualtrics system
For a complete sample file, scroll to the bottom of the guide
- Once you have completed setting up your survey choose which question blocks you need to add validation too.
- Click on the ‘gear’ icon on the left side of your question block:
- You will then see several options but the one we want is ‘Add JavaScript…’ as shown below:
- When the JavaScript screen pops up click on the option “Full Screen” in the bottom left corner to make it easier.
- The screen should be pre-populated with the following:
- We will be placing our code in the ‘addOnReady’ function, starting with the following section of code:
This section of code will allow us to use a different version of jQuery and jQueryUi, which allows the autocomplete/ajax code to work on the survey, as well as:
- It will set the variable for your Kleber RequestKey
- A variable used later to indicate that a select/result was returned
- A label that will display to the client if the response was valid or invalid
- Once you know which type of validation you wish to use, the code will go where you can see ‘METHOD_CODE_GOES_HERE’ as the code shown so far is used for just about every method
- Next, we will start with the autocomplete and search/source function which should replace the “METHOD_CODE_GOES_HERE”:
At the top of the screenshot you will notice you need to use the variable you created earlier for the address line field. Once you have that sorted you shouldn’t need to change anything here
- This next section will handle what to do when the customer either selects an address from the list or closes the dropdown due to the address not existing in the data source:
- Here we make it so that when a client selects the address they wish to use, we have to send another call off to the Kleber server to retrieve the address components (also mandatory)
- We may need to make changes to some of the code such as field mapping
- We can also change the text displayed that indicates if the address is valid or not, or use an image
- There are plenty more result fields we can use with the retrieve method but for this trial we will only use the Locality, State, Postcode and the DPID fields.
- The last section of code is where we decide what to do when the search dropdown disappears without any addresses being selected. This section may not be relevant to all the methods available on the Kleber platform, but we will add it for this example:
- Here we set the fields, other then the address line, to blank.
- If the user doesn’t select a valid address, then they will still be able to fill-in the address line and the other fields manually.
- We advise against locking the form down when a validation is false/incorrect.
- As you can see we also set the result text to ‘Invalid’ with a color setting so that it can stand-out.
Congratulations you have just integrated Kleber into your Qualtrics survey.
Please look at some of the other step-by-step guides if you wish to add additional validation.
Complete Sample code
Qualtrics.SurveyEngine.addOnload(function() { /*Place your JavaScript here to run when the page loads*/ console.log("onload"); }); Qualtrics.SurveyEngine.addOnReady(function() { /* Identify the address fields by number below */ addressLineField = "QR~"+this.questionId+"~3"; localityField = "QR~"+this.questionId+"~5"; stateField = "QR~"+this.questionId+"~6"; postcodeField = "QR~"+this.questionId+"~7"; var TempKey = "YOUR_REQUEST_KEY_GOES_HERE"; /* No changes below this line */ console.log("onready - this.questionId=", this.questionId); addressLineFieldText = addressLineField+"~TEXT"; console.log("addressLineFieldText=", addressLineFieldText); localityFieldText = localityField+"~TEXT"; console.log("localityFieldText=", localityFieldText); stateFieldText = stateField+"~TEXT"; console.log("stateFieldText=", stateFieldText); postcodeFieldText =postcodeField+"~TEXT"; console.log("postcodeFieldText=", postcodeFieldText); jQuery(function($){ $.getScript('https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.js',function($){ var $x = jQuery.noConflict(); $x.getScript('https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js',function ($){ $x("head").append("<link>"); var css = $x("head").children(":last"); css.attr({ rel: "stylesheet",type: "text/css", href: "https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/base/jquery-ui.css"}); $x('[name="'+postcodeFieldText+'"]').after('<br><span id="resultspan" name="resultspan"><label id="QRQID1Add" name="QRQID1Add"></label></span>'); var Selectedval = ""; $x('[name="'+addressLineFieldText+'"]').autocomplete( { source: function( request, response ) { Selectedval = ""; $x.ajax( { url: "https://kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", type: "GET", contentType: "application/json; charset=utf-8", data: {OutputFormat:"json", ResultLimit:10, AddressLine:request.term, Method:"DataTools.Capture.Address.Predictive.AuPaf.SearchAddress", RequestKey:TempKey}, success: function( data ) { response( $x.map( data.DtResponse.Result, function( item ) { var Output = (item.AddressLine + ", " + item.Locality + ", " + item.State + ", " + item.Postcode); return {label: Output,value: Output,Output: Output, RecordId: item.RecordId,AddressLine: item.AddressLine}; })); } }); }, select: function( event, ui ) { $x.ajax( { url: "https://kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", crossDomain: true, data: {OutputFormat:"json", RecordId:ui.item.RecordId, Method:"DataTools.Capture.Address.Predictive.AuPaf.RetrieveAddress", RequestKey:TempKey}, success: function (data) { $x.map(data.DtResponse.Result, function (item) { $x('[name="'+addressLineFieldText+'"]').val(ui.item.AddressLine); $x('[name="'+localityFieldText+'"]').val(item.Locality); $x('[name="'+stateFieldText+'"]').val(item.State); $x('[name="'+postcodeFieldText+'"]').val(item.Postcode); $x('[name="QRQID1Add"]').css('color','#7CFC00'); $x('[name="QRQID1Add"]').text(function(index) { return "Valid";}); console.log(item.DPID); Selectedval = item.DPID; }); } }); }, close: function(event, ui) { if(Selectedval == "") { $x('[name="QRQID1Add"]').css('color','#FF0000'); $x('[name="QRQID1Add"]').text(function(index) { return "Invalid";}); $x('[name="'+localityFieldText+'"]').val(""); $x('[name="'+stateFieldText+'"]').val(""); $x('[name="'+postcodeFieldText+'"]').val(""); } } }); }); }); }); }); Qualtrics.SurveyEngine.addOnUnload(function() { /*Place your JavaScript here to run when the page is unloaded*/ });
PAF Updates
Australian Data | ||
PAF Version | PAF issue date | PAF in-place date |
VYYYY | 15-Nov-2017 | 31-Mar-2018 |
VYYYY.2 | 28-Feb-2018 | 30-Jun-2018 |
VYYYY.3 | 31-May-2018 | 30-Sep-2018 |
VYYYY.4 | 31-Aug-2018 | 31-Dec-2018 |
New Zealand Data | ||
PAF Version | PAF issue date | PAF in-place date |
Q1 | 31 Mar-2018 | 30-Sep-2018 |
Q2 | 30 Jun-2018 | 30-Dec-2018 |
Q3 | 30 Sep-2018 | 31-Mar-2019 |
Q4 | 15 Dec-2018 | 15-Jun-2019 |
How to implement predictive address capture and geocoding using the G-NAF
For Australian address search, to retrieve the address information and retrieve the geocode, we recommend the following:
DataTools.Capture.Address.Predictive.Gnaf.SearchAddress – Use this method to return suggestions as a user types an address.
DataTools.Capture.Address.Predictive.Gnaf.RetrieveAddress – Use this method to extract the additional address details when an address is selected from the suggestions list.
DataTools.Capture.Address.Predictive.Gnaf.RetrieveGeocode – Use this method to append the Longitude and Latitude of the address.
For Australian address search and to retrieve the address information, we recommend the following:
DataTools.Capture.Address.Predictive.Gnaf.SearchAddress – Use this method to return suggestions as a user types an address.
DataTools.Capture.Address.Predictive.Gnaf.RetrieveAddress – Use this method to extract the additional address details when an address is selected from the suggestions list.
For Australian address search and to retrieve the geocode information, we recommend the following:
DataTools.Capture.Address.Predictive.Gnaf.SearchAddress – Use this method to return suggestions as a user types an address.
DataTools.Capture.Address.Predictive.Gnaf.RetrieveGeocode – Use this method to append the Longitude and Latitude of the address.
How to implement Australian predictive address capture
The recommended methods for the implementation of Australian predictive address capture are:
DataTools.Capture.Address.Predictive.AuPaf.SearchAddress – Use this method to return suggestions as a user types an address.
We recommend that you start calling the search method after the 3rd letter of the street name e.g. 20 Lex. This will both bring up more relevant suggestions to the user and it will be more cost-effective because less search methods are being called.
DataTools.Capture.Address.Predictive.AuPaf.RetrieveAddress – Use this method to extract the additional address details when an address is selected from the dropdown.
(IMPORTANT: A retrieve method must always be used in conjunction with the search when successful.)
DataTools.Repair.Address.AuPaf.RepairAddress – Use this method when an address is not selected by the user or if major errors are made within input.
We suggest that if an address has not been found after 12+ search calls, stop calling the search method and allow the user to enter their address as they wish, then simply pass that full address string to the Repair method.
Overall for address entry, it would be expected that it consists of multiple SearchAddress calls in conjunction with a single RetrieveAddress or RepairAddress.
Similar methods are also available for other countries.
DPID Allocation Match Type
Correct match to a record in the PAF file.
Postcode couldn’t be matched
The postcode couldn’t be matched because it is either incorrect or does not currently exist in the Postal Addressing File.
State couldn’t be matched
The state couldn’t be matched because it is incorrect.
Locality couldn’t be matched
The suburb couldn’t be matched because it is either spelt incorrectly or it does not currently exist in the Postal Addressing File.
Street Name couldn’t be matched
The street name couldn’t be matched because it is either spelt incorrectly or it does not currently exist in the Postal Addressing File.
Ambiguous
This code means that the address could possibly be matched, but to several addresses. An example might be where a street type is missing, and there are two streets with that name in a locality.
For example LANE ST and LANE LANE both exist in Broken Hill.
Another example of ambiguity might be where a locality and postcode don’t match. There are many ways this might happen, the locality might be missing, or badly spelt, or the postcode might be completely wrong.
Where the locality / postcode doesn’t match, an attempt is made to find the street in all possible
candidates. Where the street occurs twice, this is regarded as ambiguous.
Street Number couldn’t be matched
The street number isn’t valid for this street or does not currently exist in the Postal Addressing File.
Postal Type couldn’t be matched
The postal delivery type couldn’t be found for this suburb / postcode eg. “PO Box”.
Postal Number couldn’t be matched
The postal number couldn’t be matched for this delivery type within this suburb / postcode eg PO Box number.
Phantom Primary Point
The address contains the correct street name and number but has missing vital information such as level, suite or unit information. The address could only be matched to the street number and therefore has not been allocated a DPID.
Unit Number couldn’t be matched
The number couldn’t be matched for this street address because it is either invalid or does not currently exist in the Postal Addressing File.
Level Type couldn’t be matched
The level type for this street address couldn’t be matched because it is invalid or does not currently exist in the Postal Addressing File.
Lot Number couldn’t be matched
The lot number couldn’t be found within this suburb / postcode.
Primary Point
This code indicates that a flat, unit or floor (or combination) couldn’t be found, but the street address could. Australia Post calls this the ‘Primary Point’. The address returned is largely from the PAF, but the floor or unit information comes from the input record. Most importantly a DPID is appended to these addresses ensuring that this mail will get to its destination.
Parser Warning
The address may have originally contained non address information. The software has made corrections to the address so it can successfully allocate a DPID to it.
International Address Verification Result codes
Result codes – what do they mean?
There are two levels of information sent back to allow users to make a better informed decision as to whether the address provided is valid enough for their purposes.
First an address reliability code & description. These tell the user that the data provided is either:
- 10 – Good/Correct/Corrected: Considered a Good (ie validated) address
- 20 – Questionable/Possible/Doubtful: Is a Questionable address – user decides whether to keep.
- 30 – Not Correct/Results not complete enough: Is considered a Bad address.
Second – it can also pass back address adaptation code & description which represent the measure of change regarding the reliability code given above and give provide further insight into the address for the user. The four options are:
- 0 – No Change
- 10 – Very minor adjustment: Such as capitalization or casing for standardization.
- 20 – Substantial change which appears to have had a minor impact on the reliability: Such as correction of spelling or address formatting, and minor address data changes.
- 30 – Substantial change which appears to have had a minor impact on the reliability: In this case it is a more substantial change such as appending of missing address data or change of address elements.
License considerations.
As this solution requires use of the Global Data Consortium’s data – users should read their Terms and Conditions found here.
Utility for using DataTools Kleber Batch with Excel
This article was created by Sujoy Majumdar from St Vincent De Paul Society NSW – he explains how he used Kleber Batch to add DPID into their Excel datasheets.
Output: We have the DPID entered for the above bunch of addresses –Shown in the screenshot below.It was possible using the tool : http://kleber.datatools.com.au/
To achieve this we have to send to Kleber a batch of addresses (Due to Excel not being able to do multi threading we are limited to sending up to 50 at a time)
- The code below first open the Source Excel sheet
- Counts how many are there. Breaks them into batches of 20(in this case)
- Reads 20 each and sends 20 to kleber to verify the address and fetch the DPID
- the results from kleber is concatenated into a single string
- Once all the addresses have been verified the application opens the destination excel sheet and writes the result to it.
using System; using System.Data; using System.Linq; using System.Text; using System.Xml; using System.IO; using System.Windows.Forms; using System.ComponentModel; using LinqToExcel; using LinqToExcel.Attributes; using TextExcel.KleberServicePostCode; using Excel=Microsoft.Office.Interop.Excel; namespace TextExcel { //public sealed class OpenFileDialog : FileDialog public partial class Form1 : Form { public Form1() { InitializeComponent(); } public static string destinationFile;// = txt_SourceFileLocation.Text.ToString();// @"C:\Kleber\AcquisitionFileUpload.xlsx"; public static string sourceFile; //public static BindingList<Address> AddressList = new BindingList<Address>(); private static Excel.Workbook MyBook = null; private static Excel.Application MyApp = null; private static Excel.Worksheet MySheet = null; private static int lastRow = 0; public string msg_Success = "Job completed succesfully"; public string msg_Failure = "Job couldnt be completed . Encountered errors"; public string msg_InProgress = "Job in progress"; public static ExcelQueryFactory excel; int counter = 1; string DtResponseXml = null; string FinalDtResponseXml = null; string DtRequestXml = null; public static void InitializeExcel() { try { //open the source file excel = new ExcelQueryFactory(sourceFile) { DatabaseEngine = LinqToExcel.Domain.DatabaseEngine.Ace, TrimSpaces = LinqToExcel.Query.TrimSpacesType.Both, UsePersistentConnection = true, ReadOnly = true }; /// open the destination file MyApp = new Excel.Application(); MyApp.Visible = false; MyBook = MyApp.Workbooks.Open(destinationFile); MySheet = (Excel.Worksheet)MyBook.Sheets[1]; // Explict cast is not required here lastRow = MySheet.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell).Row; } catch (Exception ex) { MyBook.Close(); //MySheet.Unprotect(); MyApp.Quit(); } } public void useKleber( int lLimit,int uLimit)// This is the metod used for calling the kleber web service { var address = from p in excel.Worksheet<Address>(0) select p; XmlWriterSettings XmlWriterSettings = new XmlWriterSettings(); XmlWriterSettings.Indent = true; XmlWriterSettings.OmitXmlDeclaration = true; StringBuilder XmlStringBuilder = new StringBuilder(); XmlWriter XmlWriter = XmlWriter.Create(XmlStringBuilder, XmlWriterSettings); XmlWriter.WriteStartElement("DtRequests"); for (int i = lLimit; i <= uLimit; i++) { var add = new Address(); add = address.First(h => h.RequestId == i); // Create DtRequest Query XML XmlWriter.WriteStartElement("DtRequest"); XmlWriter.WriteAttributeString("Method", "DataTools.Verify.Address.AuPaf.VerifyAddress"); XmlWriter.WriteAttributeString("AddressLine1", add.Street1); XmlWriter.WriteAttributeString("AddressLine2", add.Street2); XmlWriter.WriteAttributeString("AddressLine3", add.Street3); XmlWriter.WriteAttributeString("AddressLine4", ""); XmlWriter.WriteAttributeString("AddressLine5", ""); XmlWriter.WriteAttributeString("AddressLine6", ""); XmlWriter.WriteAttributeString("Locality", add.City); XmlWriter.WriteAttributeString("State", add.State); XmlWriter.WriteAttributeString("Postcode", add.Postcode); XmlWriter.WriteAttributeString("RequestId", add.RequestId.ToString()); XmlWriter.WriteAttributeString("RequestKey", "RK-*****-*****-*****-*****-*****-*****"); // Insert your Request Key XmlWriter.WriteAttributeString("DepartmentCode", ""); XmlWriter.WriteEndElement(); } XmlWriter.WriteEndElement(); XmlWriter.Close(); DtRequestXml = XmlStringBuilder.ToString(); XmlWriter.Dispose(); //--------------------------------------------------------------------------------------------- //Send DtRequest to Kleber Server for processing DtKleberServiceClient KleberServer = new DtKleberServiceClient("BasicHttpBinding_IDtKleberService"); DtResponseXml = KleberServer.ProcessXmlRequest(DtRequestXml); FinalDtResponseXml = FinalDtResponseXml + DtResponseXml; } private void button1_Click(object sender, EventArgs e) { //useKleber(1, 200); lbl_Result.Text = msg_InProgress; var excel = new ExcelQueryFactory(sourceFile) { DatabaseEngine = LinqToExcel.Domain.DatabaseEngine.Ace, TrimSpaces = LinqToExcel.Query.TrimSpacesType.Both, UsePersistentConnection = true, ReadOnly = true }; var address = from p in excel.Worksheet<Address>(0) select p; int combi = 0; int lowerLimit = 1; int CountOfRecords = address.Count();//get count of records in excell sheet //the records require to be divide by 50 - as Kleber can process only 50 records at a time. int remainder = CountOfRecords % 20; int quotient = CountOfRecords / 20; try { InitializeExcel(); } catch (Exception ex) { lbl_Result.Text = msg_Failure; } if (quotient > 0) //the quotitent is more than 1 -meaning the number of cycles loop { for (int j = 1; j <= quotient; j++) { useKleber(counter, (counter + 19)); counter = counter + 20; } if (remainder > 0) { useKleber(((quotient * 20) + 1), ((quotient * 20) + remainder)); } } else { useKleber(1, remainder); } FinalDtResponseXml = "<EmbeddedByVinnies>" + FinalDtResponseXml + "</EmbeddedByVinnies>"; StringBuilder XmlResponseStringBuilder = new StringBuilder(); int ResultCounter = 0; string responseFetchedReqId = null; string responseFetchedValue = null; string resultFetchedName = null; string resultFetchedValue = null; int position = 1; XmlReader XmlReader = XmlReader.Create(new StringReader(FinalDtResponseXml)); try { while (XmlReader.Read()) { lastRow += 1; if (XmlReader.IsStartElement()) { switch (XmlReader.Name) { case "DtResponse": //Console.WriteLine("DT RESPONSE"); if (XmlReader.HasAttributes) { position = 1; while (XmlReader.MoveToNextAttribute()) { switch (XmlReader.Name) { case "RequestId": responseFetchedReqId = XmlReader.Value; break; } } XmlReader.MoveToElement(); } //Console.WriteLine(DisplayDoubleDividerString); break; case "Result": //Console.WriteLine("RESULT " + ResultCounter); position = Convert.ToInt32(responseFetchedReqId); position++; if (XmlReader.HasAttributes) { //position = 1 ; while (XmlReader.MoveToNextAttribute()) { switch (XmlReader.Name) { case "AddressLine": resultFetchedName = XmlReader.Name; resultFetchedValue = XmlReader.Value; MySheet.Cells[position, 10] = resultFetchedValue; break; case "City": resultFetchedName = XmlReader.Name; resultFetchedValue = XmlReader.Value; MySheet.Cells[position, 13] = resultFetchedValue; break; case "Postcode": resultFetchedName = XmlReader.Name; resultFetchedValue = XmlReader.Value; MySheet.Cells[position, 15] = resultFetchedValue; break; case "State": resultFetchedName = XmlReader.Name; resultFetchedValue = XmlReader.Value; MySheet.Cells[position, 14] = resultFetchedValue; break; case "DPID": resultFetchedName = XmlReader.Name; resultFetchedValue = XmlReader.Value; MySheet.Cells[position, 16] = resultFetchedValue; ResultCounter++; break; } } XmlReader.MoveToElement(); } //Console.WriteLine(DisplayDividerString); break; } } MyBook.Save(); ResultCounter++; } MyBook.Save(); string XMLReaderDump = XmlReader.ToString(); XmlReader.Dispose(); MyBook.Saved = true; MyBook.Close(); //MySheet.Unprotect(); MyApp.Quit(); lbl_Result.Text = msg_Success;//"Job completed succesfully"; } catch (Exception ex) { XmlReader.Dispose(); //MyBook.Saved = true; MyBook.Close(); //MySheet.Unprotect(); MyApp.Quit(); lbl_Result.Text = msg_Failure;// "Job couldnt be completed . Encountered errors"; } } private void Form1_Load(object sender, EventArgs e) { } private void button3_Click(object sender, EventArgs e) { } private void btn_BrowseDestinationFile_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog1 = new OpenFileDialog(); int size = -1; DialogResult result = openFileDialog1.ShowDialog(); // Show the dialog. if (result == DialogResult.OK) // Test result. { string file = openFileDialog1.FileName; txt_DestinationFileLocation.Text = file; destinationFile = file; try { string text = File.ReadAllText(file); size = text.Length; } catch (IOException) { lbl_Result.Text = msg_Failure; } } } private void btn_BrowseSourceFile_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog1 = new OpenFileDialog(); int size = -1; DialogResult result = openFileDialog1.ShowDialog(); // Show the dialog. if (result == DialogResult.OK) // Test result. { string file = openFileDialog1.FileName; txt_SourceFileLocation.Text = file; sourceFile = file; try { string text = File.ReadAllText(file); size = text.Length; } catch (IOException) { lbl_Result.Text = msg_Failure; } } } private void label1_Click(object sender, EventArgs e) { } private void label1_Click_1(object sender, EventArgs e) { } private void label2_Click(object sender, EventArgs e) { } private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e) { } } internal class Address { [ExcelColumn("Street 1")] public string Street1 { get; set; } [ExcelColumn("Street 2")] public string Street2 { get; set; } [ExcelColumn("Street 3")] public string Street3 { get; set; } [ExcelColumn("City")] public string City { get; set; } [ExcelColumn("State")] public string State { get; set; } [ExcelColumn("Postcode")] public string Postcode { get; set; } [ExcelColumn("RequestId")] public int RequestId { get; set; } } }
PAF Allocation Data Changes Codes
The ‘Dt Data Changes’ field contains three letter field codes of those fields that address matching has changes from source data to result data. For example, if the street name was mis-spelt and had been changed, the code THN would appear in the ‘Dt Data Changes’ field.
Only certain parts of the result data are checked for changes. These are:
Data Changes Codes | Australian | New Zealand |
PCD Postcode | ✔ | |
LOC Locality | ✔ | |
SUB Suburb/Lobby/RD0 | ✔ | |
STT State | ✔ | |
CTY Town/City/Mailtown | ✔ | |
THN Street name | ✔ | ✔ |
THT Street type eg. ST, RD | ✔ | ✔ |
TTS Street type suffix eg. N, S, E, W | ✔ | |
TN1 Street Number 1 | ✔ | |
TN1 Street Number 2 | ✔ | |
PDT Postal delivery type eg. PO Box | ✔ | |
PDP Post Box Number Prefix | ✔ | |
PDS Post Box Number Suffix | ✔ | |
BOR Matched to alternative locality | ✔ | |
ATN Matched to alternative street name | ✔ | |
FUT Flat/Unit Type | ✔ | |
GID Match that could only be made to the group or street level and issued a group DID | ✔ | |
LID Match that could only be made to the locality level and issued a group DID | ✔ | |
New Zealand PAF Allocation Match Types
Correct
Correct match to a record in the New Zealand PAF file.
Primary Point
This code indicates that a flat, unit or floor (or combination) couldn’t be found, but the street
address could. This is called a ‘Primary Point’. The address returned is largely from the New
Zealand PAF, but the floor or unit information comes from the input record. Most importantly a
Postcode is appended to these addresses ensuring that this mail will get to its destination.
Street Number could not be matched
The street number isn’t valid for this street or does not currently exist in the New Zealand PAF.
Postal Number could not be matched
Postal number isn’t valid for this suburb or does not currently exist in the New Zealand PAF.
Ambiguous Address Point
This code means that the address could possibly be matched, but to several addresses.
An example might be where there is a 20a Smith St and a 20b Smith St in the one suburb but the
address data being matched is 20 Smith St.
Street Name could not be matched
The street name couldn’t be matched because it is either spelt incorrectly or it does not currently
exist in the New Zealand PAF.
Postal Type could not be matched
The postal delivery type couldn’t be found for this suburb / postcode eg. “PO Box”.
Ambiguous Street
This code means that the street name in an address could possibly be matched, but to several
addresses.
An example might be where a street type is missing, and there are two streets with that name in a
locality. For example LANE ST and LANE LANE both exist in Saint Heliers.
Place Names could not be matched
The place name and suburb couldn’t be matched because it is either spelt incorrectly or it does not
currently exist in the New Zealand PAF.
Ambiguous Suburb
This code means that the suburb name in an address could possibly be matched, but to several
addresses.
Ambiguous City
This code means that the city name in an address could possibly be matched, but to several
addresses.
Phantom Primary Point
This is the name given to a primary point to which no delivery can be made, such as the street address of a commercial building where there is no reception area or if the address doesn’t receive Standard Mail delivery.
Note: If you check the ‘FieldChange’ value it may return ‘NPA’. This would indicate that it is a known address but New Zealand Post do not deliver mail to it. Other carriers may still deliver parcels to these addresses.
The address will still be formatted and standardised to align with the surrounding addresses.
If you are looking to validate an address and not use it for the purpose of mailing, you could consider this address valid.
Note: Some addresses don’t receive Standard Mail, but they may receive other types, such as courier mail, PO Box, Private Bag or counter delivery, where they collect mail from a local post shop. Ask someone at that address how to send them mail or contact a courier company to see if they can send here.
DPID Allocation Match Types
Correct
Correct match to a record in the PAF file.
Postcode couldn’t be matched
The postcode couldn’t be matched because it is either incorrect or does not currently exist in the Postal Addressing File.
State couldn’t be matched
The state couldn’t be matched because it is incorrect.
Locality couldn’t be matched
The suburb couldn’t be matched because it is either spelt incorrectly or it does not currently exist in the Postal Addressing File.
Street Name couldn’t be matched
The street name couldn’t be matched because it is either spelt incorrectly or it does not currently exist in the Postal Addressing File.
Ambiguous
This code means that the address could possibly be matched, but to several addresses.
An example might be where a street type is missing, and there are two streets with that name in a locality. For example LANE ST and LANE LANE both exist in Broken Hill.
Another example of ambiguity might be where a locality and postcode don’t match. There are many ways this might happen, the locality might be missing, or badly spelt, or the postcode might be completely wrong.
Where the locality /postcode doesn’t match, an attempt is made to find the street in all possible candidates. Where the street occurs twice, this is regarded as ambiguous.
Street Number couldn’t be matched
The street number isn’t valid for this street or does not currently exist in the Postal Addressing File.
Postal Type couldn’t be matched
The postal delivery type couldn’t be found for this suburb / postcode eg. “PO Box”. Postal Number couldn’t be matched
The postal number couldn’t be matched for this delivery type within this suburb / postcode eg PO Box number.
Phantom Primary Point
The address contains the correct street name and number but has missing vital information such as level, suite or unit information. The address could only be matched to the street number and therefore has not been allocated a DPID.
Unit Number couldn’t be matched
The number couldn’t be matched for this street address because it is either invalid or does not currently exist in the Postal Addressing File
Level Type couldn’t be matched
The level type for this street address couldn’t be matched because it is invalid or does not currently exist in the Postal Addressing File.
Lot Number couldn’t be matched
The allotment number couldn’t be found within this suburb / postcode.
Primary Point
This code indicates that a flat, unit or floor (or combination) couldn’t be found, but the street address could. Australia Post calls this the ‘Primary Point’. The address returned is largely from the PAF, but the floor or unit information comes from the input record. Most importantly a DPID is appended to these addresses ensuring that this mail will get to its destination.
Parser Warning
The address may have originally contained errors. Twins has made corrections to the address so it can successfully allocate a DPID to it.
How to obtain a locality/street level geocode from an address using Kleber
The method used to get GNAF geocodes will return only a geocode that was matched to an address point.
This means that the geocode is for a single address or block of units.
Some records are marked as only being matched to the street or locality geocode, for example some rural addresses will have a geocode for their street but have yet to be matched to an address point.
When you have an address like this we recommend using the “DataTools.Enhance.Address.Geocoding.Gnaf.Au.Append” which has these street/locality geocodes.
Match Key Detail
Matching Methods
Kleber has a number of matching methods that can create unique match keys for your data to help identify duplicates quickly and easily.
Kleber creates matching keys in 3 varieties – Tight, Standard and Loose. Which one you choose to use will depend upon the situation and business need for finding the matches in the first place.
- Tight keys allow for little difference between matches. Tight keys are useful for matching where no user interaction is available.
- Loose keys will identify a lot more matches, some of which may be questionable, but will assist in identifying the last few percent of matches that are difficult to find. Loose Keys should never be used without user interaction to verify matches.
- Standard keys are a good balance between Tight and Loose key and depending on the outcome required may be used without user interaction.
EXPERT TIP
When trying to work out which match key/s to use from the many available – it’s best to initially test the keys on large quantities of data with someone verifying the results.
That way you can see which key or combination of keys best suits your business requirements.
What match keys are available in Kleber?
The 3 match methods create the following match keys:
DataTools.Match.Address.Au.CreateKeys
- Standard Address Key
- Tight Address Key
- Loose Address Key
- Address Locality
DataTools.Match.BusinessName.CreateKeys
- Standard Business Name Key
- Tight Business Name Key
- Loose Business Name Key
DataTools.Match.BusinessNameAndAddress.Au.CreateKeys
- Standard Business Name and Standard Address Key
- Tight Business Name and Standard Address Key
- Loose Business Name and Tight Address Key
- Standard Business Name Key
- Tight Business Name Key
- Loose Business Name Key
- Standard Address Key
- Tight Address Key
- Loose Address Key
Detailed explanations of the match keys
Standard Person and Standard Address matches
The base method used for detecting duplicated people. It allows for missing or differences in the unit or level numbers, and a balanced level of phonetic miss-spellings in the last name, street name or building name. In the example below the first name matches on initials only ie: “Alexandra”, “Alex” and “A” will all match as shown, as would “Anne” and “Albert”.
Tight Person and Standard Address matches
Keeps the same address rules as the Person and Address Method but restricts the differences allowable in the first and last names to gain a match.
This is very useful when used alongside the Person and Address Method because it will save you manually perusing these more certain results, allowing you to bring up only the more subjective results for review if desired.
In the example shown above only the first two records would match on Tight Person and Address. In the example below the first two records would be matched but the third record would require the standard Person and Address Method.
Tight Person and Loose Address matches
This method finds matches where the first and last name match as in the Tight Person and Address Method, however it loosens up the address matching criteria to detect duplicates where records have missing or differing street numbers and allows for phonetic matching on street and building names. This is a great way of netting extra tricky duplicates and is also used against other methods so that you only have to review the subjective results if desired.
In the example below the first two records would be matched with Tight Person and Address but the last record would only be found on the Tight Person and Loose Address Method.
Standard Business and Standard Address matches
This is the standard method used when you want to detect duplicate businesses.
This method looks at key elements of the business name and allows for blanks or differences in the unit or level number and a balanced level of misspellings in the street or building names.
Tight Business and Standard Address matches
The same address matching rules as above combined with tighter business name matching that includes extra differentiating components from the business name.
This is very useful when used alongside the Business and Address Method because it will save you manually perusing these more certain results, allowing you to bring up only the more subjective results of the other business match methods for review if desired.
It is also used to detect duplicate businesses where you only want to group unique departments or business units together. In the records shown above only the top two records “Dodsun Print” would be matched on Tight Business and Address Match as the other two are differing divisions of the same organisation.
All the records in the example below would be matched on Business and Address Match, but only the top two would match on Tight Business and Address Match.
Loose Business and Tight Address matches
This allows for a balanced level of miss-spelling and phonetics in the business names main component but requires tight address matching where the unit or level number must be the same and the street or building name is spelt the same.
Tight Address matches
The classic one per household matching method requires that the street or building name be the same and that unit numbers are not missing and must match.
This method is also used to pick out duplicates where the differences in person or business names are too vast to be matched with other matching methods.
Minimum address field length by character for AuPaf
Longest Locality (41 characters)
PO Box 8342, AUSTRALIAN NATIONAL UNIVERSITY ACT 0200
Longest Full Address Line (80 characters) excluding Building Names
Unit 2 Ground Floor 17-19 Mt Gravatt-Capalaba Rd, UPPER MOUNT GRAVATT QLD 4122
Unit 1 Ground Floor 17-19 Mt Gravatt-Capalaba Rd, UPPER MOUNT GRAVATT QLD 4122
Longest Address Line 1 – excluding locality information (49 characters)
Shop 102T Lower Ground Floor 656 Little Bourke St, MELBOURNE VIC 3000
Shop 101T Lower Ground Floor 650 Little Bourke St, MELBOURNE VIC 3000
Suite 3 Lower Ground Floor 102-104 Longueville Rd, LANE COVE NSW 2066
Suite 2 Lower Ground Floor 102-104 Longueville Rd, LANE COVE NSW 2066
UK Postcodes – which postcode result should you use & when?
There are a couple of Kleber methods that provide postcodes for the UK. When retrieving the results in these methods you will note that there are what look like two postcodes listed.
In both methods you should always use the postcode listed at the Output Field ‘Postcode’ when you need to display or write out the address on mail, letters, websites, labels, etc. This is the postcode that the general public know as their own.
E.g. ‘38 Mill Hill, Haverhill, Suffolk’ has a postcode of ‘CB9 8BU’.
The other postcode that can be found in the results is longer and is used for creating a barcode for bulk mailing purposes. This postcode contains an extra 2 or 3 characters that should NOT to be divulged to the public – ie, not written into addresses or shown on labels etc. The first two extra characters are the Delivery Point Suffix (DPS*) and the third (if included) is a checksum** character to ensure there are no errors in the barcode.
E.g ‘38 Mill Hill Haverhill Suffolk’ has a postcode for creating a barcode of ‘CB9 8BU1U’ or ‘CB9 8BU1UZ’. The ‘1U’ component is the DPS and the ‘Z’ at the end is the checksum component.
Please ensure you use the postcode found in the Output field called ‘Postcode’ when writing or displaying the actual UK address. Only use the other when creating a barcode.
Specific method information
Currently Kleber uses the following methods when you are either retrieving/verifying a UK address:
- Capture.Address.Predictive.UkPaf.RetrieveAddress method
This method will return an output field called ‘Postcode’ for addressing purposes and one called ‘Barcode’ for barcoding purposes. The barcode result includes both the DPS and checksum components.
E.g. ‘38 Mill Hill Haverhill Suffolk’ returns ‘CB9 8BU’ at Postcode and ‘(CB9 8BU1UZ)’ at Barcode.
- Verify.Address.IntGdc.VerifyAddress method
This method is an international one – but when used for UK addresses will return two postcodes. The one used for addressing is found in the ‘PostCode’ output field. The one found in the ‘AddressLine’ output field further up the list contains the postcode with the DPS on the end. This should never be used when displaying the address.
E.g. ‘38 Mill Hill Haverhill Suffolk’ returns ‘CB9 8BU’ at Postcode and ‘CB9 8BU1U’ at AddressLine4.
* DPS – the Delivery Point Suffix is a code made up of one numeric + one alpha component e.g 9A. It is used to uniquely identify each property within each unit postcode and to facilitate fully automatic sorting of bulk barcoded mail by Royal Mail.
** Checksum – The checksum character is used as a means of error detection to ensure that the rest of the barcode is correct
How to add grouped results into IntPca.SearchAddress method
Clients who use the DataTools.Capture.Address.Predictive.IntPca.SearchAddress method sometimes find that there can be a time lag when displaying results.
This usually occurs when there are multiple results for an address (such as in a large apartment or office building) and the method is trying to display them all.
So we added an option to the IntPca.SearchAddress method that can group addresses for a building together which speeds up the search and makes it easier for the user to select an address.
How to add Grouped return results
When you look at the Input Parameters for the DataTools.Capture.Address.Predictive.IntPca.SearchAddress method you will see the option of ReturnGroupResults.
Setting it to False
By default this parameter is set to False. That means if you leave the field blank or type in the word False (I.e ReturnGroupResults=False) the address search will NOT return any applicable results in groups and all addresses will be listed below.
Setting it to True
If you set the parameter to True (I.e ReturnGroupResults=True) – it will group results for an address by showing the basic street address with “x Results” listed beside it. Groups can appear at locality, street name or building level depending how the information is entered.
The grouped records are identified with the return field “NextSearch=Search”.
This means to get the child records for the group result the RecordId for the group record needs to be resubmitted using the Search method. This would be done when the group record is selected from the list.
Address results are identified with the return field NextSearch=Retrieve meaning the next process required it to use the Retrieve method. (i.e. the DataTools.Capture.Address.Predictive.IntPca.RetrieveAddress method)
Example
If we set the parameter to “ReturnGroupResults=True” and type in the partial address “27 Hunter St P”, you can see that for the 27 Hunter St Parramatta NSW address listed at the top there are 10 results available for that address.
SOAP Envelope issue “The message with Action ” cannot be processed”
If you are attempting to program the Kleber into your system/application using the SOAPEnvelope method then it is likely you will come across the following response:
<s:Envelope xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”>
<s:Body>
<s:Fault>
<faultcode xmlns:a=”http://schemas.microsoft.com/ws/2005/05/addressing/none”> a:ActionNotSupported
</faultcode>
<faultstring xml:lang=”en-US”>
The message with Action ” cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>
You may also find yourself getting a ‘500’ error when attempting to debug (use a try/catch to get the correct error response). The solution to this issue is simple to fix by making sure that you add the following to your HttpRequest:
req.Headers.Add(“SOAPAction: \”http://tempuri.org/IDtKleberService/ProcessXmlRequest\””);
Below is a sample C# project that has been tested.
Developers Guide
Link to the Kleber Developers Guide
NZ Paflink Extended Data Code Table
Below is a list of fields available in NZ Paflink Extended Data
- DPI = DPID
- D02 = Longitude – World Geodetic System coordinate system (WGS84)
- D03 = Latitude – World Geodetic System coordinate system (WGS84)
- D04 = Address Type
- D30 = SUBURB NAME
- D31 = TOWN-CITY NAME
- D50 = Longitude – Digital Elevation Model coordinate system (DEM)
- D51 = Latitude – Digital Elevation Model coordinate system (DEM)
- D80 = Longitude – New Zealand Transverse Mercator coordinate system (NZTM2000)
- D81 = Latitude – New Zealand Transverse Mercator coordinate system (NZTM2000)
- D98 = OLD POSTCODE
- D99 = POSTCODE
Email Verification Notes
Email Verification Notes
These notes will help you with the DataTools.Verify.Email.BriteVerify.VerifyEmail method.
Response Attributes
These are the attributes that are returned when the method is called:
- StatusCode: a number 0-3 indicating the status of the given email address
- StatusDescription: the description of the StatusCode for the given email address
- EmailAccount: the inbox or account parsed from the email eg. ‘office’ from office@datatools.com.au
- EmailDomain: the domain parsed from the email eg. ‘datatools.com.au’ from office@datatools.com.au
- Connected: whether or not a valid email is connected to active online networks
- Disposable: is the email a temporary or disposable email address
- RoleAddress: the email is a role address such as sales, admin, ITHelp etc.
Response Detail
Status Codes and Descriptions
There are only 4 status codes for an email validation. Below is the code and the description sent back*.
0 = VALID – The email represents a real account / inbox available at the given domain.
1 = ACCEPT ALL – These are domains that respond to every verification request in the affirmative, and therefore cannot be fully verified.
2 = INVALID – Not a real email.
3 = UNKNOWN – For some reason we cannot verify valid or invalid. Most of the time a domain did not respond quickly enough.
*See Recommendations below regarding whether it is considered safe to email certain statuses.
Connected
This will tell you whether or not a valid email is connected to active online networks.
Disposable
A temporary or “disposable” email address is one that a user has set up to live for only a short period of time for a variety of reasons. Usually you don’t want to accept these types of emails, but we leave that up to how you wish to implement your own applications. These emails are just like any other emails and the “status” will reflect that. However, the disposable flag will be present if the email is from a known temporary email provider.
For example, “james@veryhidden.com”
Role Addresses
Role addresses are email addresses that are set aside for functions, not people. They’re often forwarded to a group or department inside a company, and they can change owners frequently. Sending to a role address can quickly lead to spam complaints. Also, unused role accounts are often converted to spam traps, which will also get you into a ton of trouble. Either way, it’s a good idea to toss these aside. However, technically speaking, they can be “deliverable” addresses. So the system does not mark them as invalid. Instead we have a role_address flag to let you know to sending to the address is not advisable, but ultimately up to you.
Some examples of role addresses are postmaster, sales, admin, info, webmaster, etc. One role address in particular that is extremely risky is the postmaster address.
Recommendations
BriteVerify provide the following recommendations on whether or not an email address is safe to include in an email campaign based on the responses sent back.
Status Response | Explanation | Recommendation |
0 – Valid | The email has a valid account associated with it | SAFE TO MAIL |
1 – Accept All | Accept All domains have configurations that make all emails seem valid, which is rarely the case. There will be some bounces from this category so consider the 2 recommendations based on your circumstances | If your ESP’s bounce threshold is 5% or less: DO NOT MAIL. If your ESP has given you a dedicated IP: MAIL SLOWLY |
2 – Invalid | The email address is invalid | DO NOT MAIL |
3 – Unknown | Email address looks good but the associated domain is not responding. This could be a temporary status for domains having intermittent issues or a permanent issue for dying domains. There will be some bounces from the Unknown category so consider the 2 recommendations before mailing | If your ESP’s bounce threshold is 5% or less: DO NOT MAIL. If your ESP has given you a dedicated IP: MAIL SLOWLY |
Disposable | Disposable addresses will not perform and typically just take up space in your database | DO NOT MAIL |
Role Address | Created to message a function like sales, admin, postmaster etc. Whilst many are valid they typically underperform compared to addresses that message individuals and thus often dilute the performance of the mail out. | MAIL AT YOUR OWN RISK |
Changes to the Datatools Kleber Endpoint May 31, 2017
DataTools has conducted a review of the Kleber endpoints currently utilised and are decommissioning some.
To continue receiving uninterrupted service from the Kleber service from June 1 2017, please take the following action to update your endpoint by May 31 2017.
Action items:
When you access the Kleber service if your code currently points to the https://dtwebsite.datatoolscloud.net.au/ endpoint. (Please note that this endpoint was used by the DataTools website and wasn’t a published endpoint for customer use)
You will need to find all references to the above endpoint in your code and change it to: https://kleber.datatoolscloud.net.au/
This change can be made immediately and will cause NO interruption to your service, but will ensure that the service continues when the dtwebsite endpoint is switched off on June 1, 2017. Therefore please action this change by May 31, 2017.
Getting started in Kleber is as easy as 1,2,3.
To get started in Kleber you only need to complete 3 simple steps.
STEP 1. Register for Kleber
First you need to register your name and company details to open an account in Kleber.
To register you can either click here OR if you want to find out more about Kleber first – click on the the Learn More page. At the bottom of this page you can click on the “Click here to Register” button.
Note: When you register for Kleber you will receive $50 FREE CREDIT to trial any method you like!
Step 2. Get your Request Key and Server Paths
These are client specific and are required to make any Kleber method work.
Once you have registered you will be taken to the My Account area. To access your Request Key and Server paths you need to click on the “Setup Kleber” button. (See the How to find your Kleber Request Key and Server paths page for more detailed information.)
Step 3. Find the method/s you need and start coding!
Once you have the above information all you need to do is go to the method or methods you want to use, test it out, and then use the sample codes to help you develop the method into your own system!
Need more help?
Should you need any further assistance with setting up Kleber you can always contact our Client Services team on (02) 9687 4666 or support@datatools.com.au. Or use the Support area for guides, forums, etc.
We provided unlimited support and technical advice to all clients regardless of whether you are trialling the product or are a long term subscriber.
What else can I do in My Account?
Your My Account Area can help you with all sorts of things. The four main buttons are:
Setup Kleber – provides you with your Request Key and Server Paths to get you going in Kleber.
Add Credit – where you can sign up to a monthly subscriptions OR add a top up amount if your monthly usage is higher than normal.
Balance & Usage – where you can track & monitor your transaction usage and costs. We recommend watching these daily to begin with to ensure your subscription amount is right for you!
My Profile – where you can change your contact details if necessary.
The Notifications section is worth checking periodically as it will provide information on any scheduled server maintenance, upgrades to data etc.
You can even sign up as an affiliate and earn commission for recommending Kleber. To learn more go to Affiliate Program page.
Note: Please ensure you thoroughly test the use of any Kleber method & are happy with the results before going into production. DataTools is charged by the data suppliers for use of every method – therefore ALL calls to ANY Kleber method will incur a cost. When you register with Kleber, DataTools provides you with $50 free credit to help with development and trialling of the service. Once that credit is used you will need to purchase a monthly subscription and/or top up to continue using the service, even for development purposes. Please check the Method Pricing List for all current costs. DataTools does not warrant or guarantee the quality of the results returned and will not be held responsible for any costs incurred by using a method. Should you have any questions please contact your Sales representative or the Client Services team.
Change/Update your password
- Click on the My Account button in the Kleber website main bar at the top.
- Then click onto the My Profile icon. (If you are not logged in – in please enter your username and password.)
- Click Change Password button on the right.
- At Password Change – first enter your current password.
- Then enter and then confirm the NEW password.
- Then click Save Changes button.
How to change login email details in Kleber
IMPORTANT – these steps will only update the email used to login to the My Account area AND will be the email attached to any new subscription orders purchased moving forward.
If the contact email for your current subscription order also needs to be updated (so that the new contact receives the current monthly invoices) please contact Client Services on support@datatools.com.au with the new email so that they can update it within the Kleber invoicing system for you.
1. Log into My Account in Kleber using the current email login details. http://kleber.datatools.com.au/my_account/
2. Click on My Profile
3. Click on the Edit Details button
4. In the Email Address box – delete the old email and type in the new email. Press Save Changes button at the bottom. The email has now been updated.
Remember to email Client Services on ‘support@datatools.com.au’ if you need the current subscription order updated as well.
How to view your Subscription Details
If you want to view all your subscription details – please do the following.
STEP 1 – Go to http://kleber.datatools.com.au/my_account/ & login using your account details.
STEP 2 – Click on Balance & Usage to view or edit your subscription details
STEP 3 – Click on Subscription Details
The My Subscription Details screen will show you all your subscription plan details. This includes a section called My Subscriptions where you can switch plans and Recent Orders where you can view the details of your payments, etc.
Should you wish to change your password for your login details you can do that by clicking on the “edit your password and account details” link directly above the My Subscriptions table.
If you just need to top up the current months plan due to unexpected usage – click on the “Click here to Top Up” link at the top.
How to find your Kleber Request Key and Server Paths
In the coding examples and technical details for all the Kleber methods you will find references to a ‘Request Key’ and ‘Server path’.
Every client is provided with a specific Request Key and two server path names (one for your live environment and one for your test environment) when you register with Kleber so that you can be identified when making calls to the Kleber server.
When developing any Kleber method you will need both your Request Key and a Server path to make the call to the Kleber server.
STEP 1. On any Kleber page click on My Account in the top menu bar.
STEP 2. This will bring you the account section of Kleber. You need to login to access your My Account details. Click on the Login? option on the right to enter your login details.
Once logged in you will see a Welcome message with your login name where the Login? message was.

STEP 3. To locate the Request Key &/or Server paths please click on the Setup Kleber button.

STEP 4. In here you will find information on how to get started in Kleber along with your specific Request Key and Server paths. (The image has an example only – yours will be specific to your account)

Where to next?
Once you have the Request Key and Server paths you can start to develop any method available in Kleber. To see a full list of all the methods available in Kleber click here.
To learn more about a specific method, click on the one you are interested in and you will be taken to an overview page where you can try out the method for yourself.
If you need more technical details for that method, click on the “Technical Information>>” link at the top of the page. This page will provide you with information such as the Input Parameters required, the Output fields sent back, and coding examples for each language supported in Kleber.
Should you need any further assistance with setting up Kleber you can always check the coding examples made available at each method, or read the Kleber Developers Guide.
You can also contact our Client Services team on (02) 9687 4666 orsupport@datatools.com.au.

Note: Please ensure you thoroughly test the use of any Kleber method & are happy with the results before going into production. DataTools is charged by the data suppliers for use of every method – therefore ALL calls to ANY Kleber method will incur a cost. When you register with Kleber, DataTools provides you with $50 free credit to help with development and trialling of the service. Once that credit is used you will need to purchase a monthly subscription and/or top up to continue using the service, even for development purposes. Please check the Method Pricing List for all current costs. DataTools does not warrant or guarantee the quality of the results returned and will not be held responsible for any costs incurred by using a method. Should you have any questions please contact your Sales representative or the Client Services team.
IMPORTANT CHANGE to Kleber’s DataTools.Enhance.Address.Geocoding.AcxiomStandard.Append method
March 30, 2017 – Kleber subscribers who currently use DataTools.Enhance.Address.Geocoding.AcxiomStandard.Append method will notice changes occurring to his method from Thursday April 6th 2017.
WHAT ARE THE CHANGES?
From the 6th April the above method will be retired – HOWEVER any code that uses this method will be automatically redirected to the new DataTools.Enhance.Address.Geocoding.Gnaf.Au.Append method that uses the industry standard G-NAF information. This means that from the 6th April the geocode returned for an address will be slightly different and the output Field of ‘GeocodeResultLevels’ will return different values.
WHAT DO I HAVE TO DO?
If you DO NOT use the codes in the output field of ‘GeocodeResultLevel’ – NO change will be required to your code.
As mentioned above your current method will automatically be redirected to the new DataTools G-NAF method. The ONLY difference is that the geocode returned for an address will now be for the middle of the property not for the street outside the property.
If your code has rules based on the information provided in the output Field of ‘GeocodeResultLevel’ – you will need to makes some changes.
For your information – the new codes returned in this output field will be:
- P = Premise or Building match
- S = Street level match
- L = Locality level match
CAN I TEST THIS BEFOREHAND?
Yes. From Thursday, 30th March 2017 the DEV environment for Kleber (http://kleber-devuat.datatoolscloud.net.au) will have the updated information available for testing. Here you will be able to check the automatic redirection and if necessary test the new GeocodeResultLevel output codes.
QUESTIONS?
Should you have any questions about this, please contact Support on (02) 9687 4666 or support@datatools.com.au.
Kleber’s Balance & Usage Area explained
- Click on My Account in the main Kleber menu bar.
- Log in using your email and password for Kleber
- Click on Balance & Usage icon.
This will load a page that will provide you with an overview of your account as well as detailed usage information as outlined below:
- There are two gauges at the top which will show you the overall health of your account. (example below)
- Your Plan Information is listed along with your next payment date. (example below)
- There are Hourly, daily and weekly graphs and tables to breakdown your usage for you. (examples below)
- Site page statistics which show all the known pages Kleber is used on (example below)
- Recent Transactions – should you wish to see the most recent transactions click on the link under this heading.
Australian BSB Search and Verify Showcase Code Walkthrough
Step by step instructions for Searching and Verifying Australian Financial Institution BSB
Australian Financial Institution BSB Search and Verify Showcase
If you want to test Australian BSB showcase in real time you can use JS Fiddle. JS Fiddle is a helpful tool for developers to manage codes easily when testing codes. JS fiddle layouts web development programming language such as HTML, CSS and JavaScript in a three separate panels, making it simple for developers to work on all codes at once. In JS Fiddle, developers can collaborate and share codes
Click the JS fiddle button to start testing Australian BSB showcase
The steps below will show how we can search and verify Australian BSB.
Below is a basic HTML form that we will use for this step-by-step.
Fig-1: Australian BSB form template
Before testing the showcase, it is necessary to have a basic form for BSB search and verify. The code below is an example of a basic HTML form that would help you start testing the showcase. You can use it as a base or reference to create your own form.
Create a new AustralianBSB.html file and insert the code below.
<html> <head> </head> <body> <div> <table> <tr> <td></td> <td><b>Method Parameters</b></td> </tr> <tr> <td>BSB:</td> <td><input name="BSB" id="inBSB" value="" type="text" size="50"/></td> <tr> <tr> <td>ResultLimit:</td> <td><input name="ResultLimit" id="inResultLimit" value="" type="text" size="50"/></td> <tr> <tr> <td>RequestId:</td> <td><input name="RequestId" id="inRequestId" value="" type="text" size="50"/></td> <tr> <tr> <td>RequestKey:</td> <td><input name="RequestKey" id="inRequestKey" value="" type="text" size="50"/></td> <tr> <tr> <td>DepartmentCode:</td> <td><input name="DepartmentCode" id="inDepartmentCode" value="" type="text" size="50"/></td> <tr> <tr> <td></td> <td><button name="ProcessButton" id="ProcessButton">Process Method</button></td> </tr> <tr> <td></td> <td><b>Method Results</b></td> </tr> <tr> <td>BSB:</td> <td><input name="BSB" id="BSB" type="text" size="50"/></td> <tr> <tr> <td>FinancialInstitutionCode:</td> <td><input name="FinancialInstitutionCode" id="FinancialInstitutionCode" type="text" size="50"/></td> <tr> <tr> <td>BsbName:</td> <td><input name="BsbName" id="BsbName" type="text" size="50"/></td> <tr> <tr> <td>AddressLine:</td> <td><input name="AddressLine" id="AddressLine" type="text" size="50"/></td> <tr> <tr> <td>Locality:</td> <td><input name="Locality" id="Locality" type="text" size="50"/></td> <tr> <tr> <td>State:</td> <td><input name="State" id="State" type="text" size="50"/></td> <tr> <tr> <td>Postcode:</td> <td><input name="Postcode" id="Postcode" type="text" size="50"/></td> <tr> <tr> <td>PaymentSystem:</td> <td><input name="PaymentSystem" id="PaymentSystem" type="text" size="50"/></td> <tr> </table> </div> </body> </html>
Note
- If you are testing Australian BSB Search and Verify Showcase using JS Fiddle tool, you do not have to copy and paste the code for Australian BSB form. The codes are already pasted on panels by default.
- On the code provided above, the ‘ID’ value for BSB field is “inBSB”.
<input name=”BSB” id=”inBSB“ type=”text” size=”50” />
- If you want to use your own Australian BSB form please keep in mind that the ‘ID’ value will be different.
Step 1
- You should have an Australian BSB form ready for testing. It is either the form we provided or your own form. The steps below will show you how we can verify BSB.
- Please paste the following code into your application. The code below adds the required JQuery libraries for the Ajax call. The CSS section adds a ‘processing’ gif so that there is a visual indication that the code is waiting for a reply from the server. Paste the following code into the <head> section of your page.
<link href="http://kleber.datatoolscloud.net.au/jquery19/themes/base/jquery.ui.all.css" rel="stylesheet"> <script src="http://kleber.datatoolscloud.net.au/jquery19/jquery-1.9.1.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.core.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.widget.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.position.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.autocomplete.js" ></script> <Script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.menu.js" ></script> <style type="text/css"> .ui-autocomplete-loading { background: white url('http://kleber.datatoolscloud.net.au/dt_processing_images/dt20x20.gif') right center no-repeat; } </style>
Step 2
Below is the first section of the JQuery .click event code. Paste the following code after the </style> tag from Step 1.
<script> $( function (){ $('#ProcessButton').click(function() { var BSB = $('#inBSB').val(); var ResultLimit = $('#inResultLimit').val(); var RequestId = $('#inRequestId').val(); var RequestKey = $('#inRequestKey').val(); var DepartmentCode = $('#inDepartmentCode').val();
As you can see the script above, the click event function is used to trigger an element when “Process Method” button is pressed and released. Please note the element id used for verifying BSB is the ‘ProcessButton’. If you are using your own html form, replace ‘ProcessButton’ to match your own field name.
There are a number of settings that can be set for the Ajax call however we have found the below settings work best.
The URL parameter holds the web URL for the KLEBER web service. If it does not contain the correct URL, the Ajax call will not receive the required response.
Step 3
Below is where the Ajax call is performed to return the response.
Please see code below for an example. Copy and paste this code to your application after the sample from Step 2
$.ajax({ url: "https://kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", type: "GET", contentType: "application/json; charset=utf-8", data: { Method: "DataTools.Verify.Bsb.AuApca.VerifyBsb", BSB: "" + BSB, ResultLimit: "" + ResultLimit, RequestId: "" + RequestId, RequestKey: "" + RequestKey, DepartmentCode: "" + DepartmentCode, OutputFormat: "json" }, success: function (data) { $.map(data.DtResponse.Result, function (item) { $('#BSB').val(item.BSB); $('#FinancialInstitutionCode').val(item.FinancialInstitutionCode); $('#BsbName').val(item.BsbName); $('#AddressLine').val(item.AddressLine); $('#Locality').val(item.Locality); $('#State').val(item.State); $('#Postcode').val(item.Postcode); $('#PaymentSystem').val(item.PaymentSystem); }); } }); }); }); </script>
The example above uses the Kleber method DataTools.Verify.Bsb.AuApca.VerifyBsb to verify Australian BSB when a user types in the BSB. For more information on this method please see http://kleber.datatools.com.au/method-description/?MethodName=DataTools.Verify.Bsb.AuApca.VerifyBsb
A Request Key (RK) is assigned and provided after you successfully register your Kleber account. Every client has a unique Request Key and it should be protected when making a call to Kleber server. In order to protect your RK, you can generate a Temporary Request Key that can be used to test all Kleber methods.
The DataTools.Security.GenerateTemporaryRequestKey method will create an encrypted key that can last anywhere from 3 seconds up to 5 minutes based on your application needs. It helps prevent anyone from using your Kleber credit as it becomes unusable once it expires.
For more information about generate temporary keys, please click on this link: http://kleberwebsite.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method=DataTools.Security.GenerateTemporaryRequestKey
Note: Please keep in mind that it is important to protect your Request Key to prevent your account credentials being used without your permission.
Kleber Phone Number Parse and Format Code Walk Through
Step by step instructions for Parsing and Formatting of Phone Number
Phone Number Parse and Format Showcase
If you want to test the Phone Number Parse and Format showcase in real time you can use JS Fiddle. JS Fiddle is a helpful tool for developers to manage codes easily when testing codes. JS fiddle layouts web development programming language such as HTML, CSS and JavaScript in a three separate panels, making it simple for developers to work on all codes at once. In JS Fiddle, developers can collaborate and share codes.
Click the JS fiddle button to start testing Phone Number Parse and Format showcase
The steps below will show how we can parse and format phone number.
Below is a basic HTML form that we will use for this step-by-step
Fig-1: Phone Number Parse and Format form template
Before testing the showcase, it is necessary to have a basic form. The code below is an example of a basic HTML phone number parsing form that would help you start testing the showcase. You can use it as a base or reference to create your own form.
Create a new ParseAndFormatPhoneNumber.html file and insert the code below.
<html> <head> </head> <body> <div> <table> <tr> <td></td> <td><b>Method Parameters</b></td> </tr> <tr> <td>PhoneNumberCountryCode:</td> <td><input name="PhoneNumberCountryCode" id="inPhoneNumberCountryCode" value="" type="text" size="50"/></td> <tr> <tr> <td>PhoneNumberAreaCode:</td> <td><input name="PhoneNumberAreaCode" id="inPhoneNumberAreaCode" value="" type="text" size="50"/></td> <tr> <tr> <td>PhoneNumber:</td> <td><input name="PhoneNumber" id="inPhoneNumber" value="" type="text" size="50"/></td> <tr> <tr> <td>FormatType:</td> <td><input name="FormatType" id="inFormatType" value="" type="text" size="50"/></td> <tr> <tr> <td>StateRegion:</td> <td><input name="StateRegion" id="inStateRegion" value="" type="text" size="50"/></td> <tr> <tr> <td>DefaultAreaCode:</td> <td><input name="DefaultAreaCode" id="inDefaultAreaCode" value="" type="text" size="50"/></td> <tr> <tr> <td>RequestId:</td> <td><input name="RequestId" id="inRequestId" value="" type="text" size="50"/></td> <tr> <tr> <td>RequestKey:</td> <td><input name="RequestKey" id="inRequestKey" value="" type="text" size="50"/></td> <tr> <tr> <td>DepartmentCode:</td> <td><input name="DepartmentCode" id="inDepartmentCode" value="" type="text" size="50"/></td> <tr> <tr> <td></td> <td><button name="ProcessButton" id="ProcessButton">Process Method</button></td> </tr> <tr> <td></td> <td><b>Method Results</b></td> </tr> <tr> <td>PhoneNumberCountryCode:</td> <td><input name="PhoneNumberCountryCode" id="PhoneNumberCountryCode" type="text" size="50"/></td> <tr> <tr> <td>PhoneNumberAreaCode:</td> <td><input name="PhoneNumberAreaCode" id="PhoneNumberAreaCode" type="text" size="50"/></td> <tr> <tr> <td>PhoneNumber:</td> <td><input name="PhoneNumber" id="PhoneNumber" type="text" size="50"/></td> <tr> <tr> <td>PhoneDescriptionLine1:</td> <td><input name="PhoneDescriptionLine1" id="PhoneDescriptionLine1" type="text" size="50"/></td> <tr> <tr> <td>PhoneDescriptionLine2:</td> <td><input name="PhoneDescriptionLine2" id="PhoneDescriptionLine2" type="text" size="50"/></td> <tr> </table> </div> </body> </html>
Note
- If you are testing the Phone Number Parse and Format Showcase using JS Fiddle tool, you do not have to copy and paste the code for Phone Number Parse and Format form. The codes are already pasted on panels by default.
- On the code provided above, the ‘ID’ value for the phone number field is “PhoneNumber”.
- <input name=”phonenumber” id=”PhoneNumber“ type=”text” size=”50” />
- If you want to use your own phone number form, please keep in mind that the ‘ID’ value will be different.
Step 1
- You should have a Phone Number Parse and Format form ready for testing. It is either the form we provided or your own form. The steps below will show you how we can parse and format phone numbers.
- Please paste the following code into your application. The code below adds the required JQuery libraries for the Ajax call. The CSS section adds a ‘processing’ gif so that there is a visual indication that the code is waiting for a reply from the server. Paste the following code into the <head> section of your page.
<link href="http://kleber.datatoolscloud.net.au/jquery19/themes/base/jquery.ui.all.css" rel="stylesheet"> <script src="http://kleber.datatoolscloud.net.au/jquery19/jquery-1.9.1.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.core.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.widget.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.position.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.autocomplete.js" ></script> <Script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.menu.js" ></script> <style type="text/css"> .ui-autocomplete-loading { background: white url('http://kleber.datatoolscloud.net.au/dt_processing_images/dt20x20.gif') right center no-repeat; } </style>
Step 2
Below is the first section of the JQuery .click event code. Paste the following code after the </style> tag from Step 1.
<script> $( function (){ $('#ProcessButton').click(function() { var PhoneNumberCountryCode = $('#inPhoneNumberCountryCode').val(); var PhoneNumberAreaCode = $('#inPhoneNumberAreaCode').val(); var PhoneNumber = $('#inPhoneNumber').val(); var FormatType = $('#inFormatType').val(); var StateRegion = $('#inStateRegion').val(); var DefaultAreaCode = $('#inDefaultAreaCode').val(); var RequestId = $('#inRequestId').val(); var RequestKey = $('#inRequestKey').val(); var DepartmentCode = $('#inDepartmentCode').val();
As you can see the script above, the click event function is used to trigger an element when “Process Method” button is pressed and released. Please note the element id used for processing the method is the ‘ProcessButton’. If you are using your own form, replace ‘ProcessButton’ to match your own field name.
There are a number of settings that can be set for the Ajax call however we have found the below settings work best.
The URL parameter holds the web URL for the KLEBER web service. If it does not contain the correct URL, the Ajax call will not receive the required response.
Step 3
Below is where the Ajax call is performed to return the response.
Please see code below for an example. Copy and paste this code to your application after the sample from Step 2
$.ajax({ url: "https://kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", type: "GET", contentType: "application/json; charset=utf-8", data: { Method: "DataTools.Parse.PhoneNumber.Au.ParseAndFormat", PhoneNumberCountryCode: "" + PhoneNumberCountryCode, PhoneNumberAreaCode: "" + PhoneNumberAreaCode, PhoneNumber: "" + PhoneNumber, FormatType: "" + FormatType, StateRegion: "" + StateRegion, DefaultAreaCode: "" + DefaultAreaCode, RequestId: "" + RequestId, RequestKey: "" + RequestKey, DepartmentCode: "" + DepartmentCode, OutputFormat: "json" }, success: function (data) { $.map(data.DtResponse.Result, function (item) { $('#PhoneNumberCountryCode').val(item.PhoneNumberCountryCode); $('#PhoneNumberAreaCode').val(item.PhoneNumberAreaCode); $('#PhoneNumber').val(item.PhoneNumber); $('#PhoneDescriptionLine1').val(item.PhoneDescriptionLine1); $('#PhoneDescriptionLine2').val(item.PhoneDescriptionLine2); }); } }); }); }); </script>
The example above uses the Kleber method DataTools.Parse. PhoneNumber.Au.ParseAndFormat to parse and format phone numbers when a user types in the phone number. For more information on this method see http://kleber.datatools.com.au/method-description/?MethodName=DataTools.Parse.PhoneNumber.Au.ParseAndFormat
For more detailed information about the parameters of this method please follow this link http://kleberwebsite.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method=DataTools.Parse.PhoneNumber.Au.ParseAndFormat
A Request Key (RK) is assigned and provided after you successfully register your Kleber account. Every client has a unique Request Key and it should be protected when making a call to Kleber server. In order to protect your RK, you can generate a Temporary Request Key that can be used to test all Kleber methods.
The DataTools.Security.GenerateTemporaryRequestKey method will create an encrypted key that can last anywhere from 3 seconds up to 5 minutes based on your application needs. It helps prevent anyone from using your Kleber credit as it becomes unusable once it expires.
For more information about generate temporary keys, please click on this link: http://kleberwebsite.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method=DataTools.Security.GenerateTemporaryRequestKey
Note: Please keep in mind that it is important to protect your Request Key to prevent your account credentials being used without your permission.
Kleber Parsing of Person’s Name Code Walkthrough
Step by step instructions for Parsing of Person’s Name
Parsing of Person’s Name Showcase
This document has been written for developers who want to implement Kleber Parsing of Person’s Name Showcase on their websites. To make the showcase easier to test and implement, this document provides code samples with each step of implementation that can be copied and paste into websites.
If you want to test the person’s name parse showcase in real time you can use JS Fiddle. JS Fiddle is a helpful tool for developers to manage codes easily when testing codes. JS fiddle layouts web development programming language such as HTML, CSS and JavaScript in a three separate panels, making it simple for developers to work on all codes at once. In JS Fiddle, developers can collaborate and share codes.
Click the JS fiddle button to start testing Parsing of Name showcase
Below is a sample of person’s name form that we will use for this step-by-step.
Fig-1: Person’s Name Parse form template
Before testing the showcase, a HTML form is necessary in testing to capture the person’s name to be parsed. The code below is an example of a basic HTML form that would help you start.
Create a new PersonsNameForm.html file and insert the code below.
<html> <head></head> <body> <input name="RequestKey" id="rkey" value="" type="text" size="50" placeholder="Enter Request Key" /> <br><br> <input id="parserline" name="ParserLine" type="text" style="width:300px;" placeholder="Start typing name here"/> <button type="button" id="clear">Clear</button> <br><br> <form> <table id="allfields"> <tr> <td>Title :</td> <td style="width: 10px"></td> <td><input id="Title" name="Title" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>First Name :</td> <td style="width: 10px"></td> <td><input id="FirstName" name="FirstName" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>Middle Name :</td> <td style="width: 10px"></td> <td><input id="MiddleName" name="MiddleName" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>Last Name :</td> <td style="width: 10px"></td> <td><input id="LastName" name="LastName" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> </table> </form> </body> </html>
Note
- If you are testing the Parsing of Person’s Name Showcase using JS Fiddle tool, you do not have to copy and paste the code of HTML form. The codes are already pasted on panels by default.
- If you want to use your own HTML form, please keep in mind that the ‘ID’ value will be different.
Step-by-step how to code JQuery with Kleber
Step 1
You should have a form ready for testing. It is either the form we provided or your own person’s name form.
Please paste the following code into your application. The code below adds the required JQuery libraries for the autocomplete Ajax call. The CSS section adds a ‘processing’ gif so that there is a visual indication that the code is waiting for a reply from the server. Paste the following code into the <head> section of your page.
<link href="http://kleber.datatoolscloud.net.au/jquery19/themes/base/jquery.ui.all.css" rel="stylesheet"> <script src="http://kleber.datatoolscloud.net.au/jquery19/jquery-1.9.1.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.core.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.widget.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.position.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.autocomplete.js" ></script> <Script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.menu.js" ></script> <style type="text/css"> .ui-autocomplete-loading { background: white url('http://kleber.datatoolscloud.net.au/dt_processing_images/dt20x20.gif') right center no-repeat; } </style>
Step 2
Below is the first section of the JQuery $(function). Paste the following code after the </style> tag from Step 1.
$(function (){ $('#clear').click(function(){ $("#parserline").val(""); $("#Title").val(""); $("#FirstName").val(""); $("#MiddleName").val(""); $("#LastName").val(""); }); $('#parserline').keyup(function(){ var parseline = $("#parserline").val(); var rkey = $('#rkey').val();
There are a number of settings that can be set for the Ajax call however we have found the below settings work best.
The URL parameter holds the web URL for the KLEBER web service. If it does not contain the correct URL, the Ajax call will not receive the required response.
Step 3
Below is where the Ajax call is performed to parse the name input by user.
Please see code below for an example. Copy and paste this code to your application after the sample from Step 2.
$.ajax( { url: "http://Kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", crossDomain: true, data: { OutputFormat:"json", PersonLine1:parseline, PersonLine2:"", PersonLine3:"", PersonLine4:"", PersonLine5:"", PersonLine6:"", Method:"DataTools.Parse.PersonName.Parse", RequestKey:rkey }, success: function (data) { $.map(data.DtResponse.Result, function (item) { $("#Title").val(item.Person1Title); $("#FirstName").val(item.Person1FirstName); $("#MiddleName").val(item.Person1MiddleNames); $("#LastName").val(item.Person1LastName); }); } }); }); });
The example above uses the Kleber method DataTools.Parse.PersonName.Parse to parse a person’s name typed in by user.
For more information of this method see http://kleber.datatools.com.au/method-description/?MethodName=DataTools.Parse.PersonName.Parse
A Request Key (RK) is assigned and provided after you successfully register your Kleber account. Every client has a unique Request Key and it should be protected when making a call to Kleber server. In order to protect your RK, you can generate a Temporary Request Key that can be used to test all Kleber methods.
The DataTools.Security.GenerateTemporaryRequestKey method will create an encrypted key that can last anywhere from 3 seconds up to 5 minutes based on your application needs. It helps prevent anyone from using your Kleber credit as it becomes unusable once it expires.
For more information about generate temporary keys, please click on this link: http://kleberwebsite.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method=DataTools.Security.GenerateTemporaryRequestKey
Note: Please keep in mind that it is important to protect your Request Key to prevent your account credentials being used without your permission.
Kleber Parsing of Australian Address Code Walkthrough
Step by step instructions for Parsing of Australian Address
Parsing of Australian Address Showcase
If you want to test the address parse showcase in real time you can use JS Fiddle. JS Fiddle is a helpful tool for developers to manage codes easily when testing codes. JS fiddle layouts web development programming language such as HTML, CSS and JavaScript in a three separate panels, making it simple for developers to work on all codes at once. In JS Fiddle, developers can collaborate and share codes.
Click the JS fiddle button to start testing Address Parse showcase
Below is an address form that we will use for this step-by-step.
Fig-1: Address Parse form template
Before testing the showcase, an address form is necessary in testing to capture the address to be parsed. The code below is an example of a basic HTML address form that would help you start testing Address Parse showcase. You can use it as a base or reference to create your own address form.
Create a new AddressForm.html file and insert the code below.
<html> <head> </head> <body> <input name="RequestKey" id="rkey" value="" type="text" size="50" placeholder="Enter Request Key"/> <br><br> <input id="parserline" name="ParserLine" type="text" style="width:300px;" placeholder="Start typing here"/> <button type="button" id="clear">Clear</button> <br><br> <form> <table id="allfields"> <tr> <td>BuildingName :</td> <td style="width: 10px"></td> <td><input id="BuildingName " name="BuildingName" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>LevelType :</td> <td style="width: 10px"></td> <td><input id="LevelType" name="LevelType" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>LevelNumber :</td> <td style="width: 10px"></td> <td><input id="LevelNumber" name="LevelNumber" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>LotNumber :</td> <td style="width: 10px"></td> <td><input id="LotNumber" name="LotNumber" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>UnitType :</td> <td style="width: 10px"></td> <td><input id="UnitType" name="UnitType" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>UnitNumber :</td> <td style="width: 10px"></td> <td><input id="UnitNumber" name="UnitNumber" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>UnitNumberSuffix :</td> <td style="width: 10px"></td> <td><input id="UnitNumberSuffix" name="UnitNumberSuffix" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>StreetNumber1 :</td> <td style="width: 10px"></td> <td><input id="StreetNumber1" name="StreetNumber1" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>StreetNumberSuffix1 :</td> <td style="width: 10px"></td> <td><input id="StreetNumberSuffix1" name="StreetNumberSuffix1" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>StreetNumber2 :</td> <td style="width: 10px"></td> <td><input id="StreetNumber2" name="StreetNumber2" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>StreetNumberSuffix2 :</td> <td style="width: 10px"></td> <td><input id="StreetNumberSuffix2" name="StreetNumberSuffix2" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>StreetName :</td> <td style="width: 10px"></td> <td><input id="StreetName" name="StreetName" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>StreetType :</td> <td style="width: 10px"></td> <td><input id="StreetType" name="StreetType" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>StreetTypeSuffix :</td> <td style="width: 10px"></td> <td><input id="StreetTypeSuffix" name="StreetTypeSuffix" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>PostBoxType :</td> <td style="width: 10px"></td> <td><input id="PostBoxType" name="PostBoxType" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>PostBoxNumberPrefix :</td> <td style="width: 10px"></td> <td><input id="PostBoxNumberPrefix" name="PostBoxNumberPrefix" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>PostBoxNumber :</td> <td style="width: 10px"></td> <td><input id="PostBoxNumber" name="PostBoxNumber" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>PostBoxNumberSuffix :</td> <td style="width: 10px"></td> <td><input id="PostBoxNumberSuffix" name="PostBoxNumberSuffix" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>Locality :</td> <td style="width: 10px"></td> <td><input id="Locality" name="Locality" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>State :</td> <td style="width: 10px"></td> <td><input id="State" name="State" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>Postcode :</td> <td style="width: 10px"></td> <td><input id="Postcode" name="Postcode" size="50" type="text" class="textbox" style="width:300px;" /></td> </tr> <tr> <td>OtherData:</td> <td style="width: 10px"></td> <td><input id="OtherData " name="OtherData size=50" type="text" class="textbox" style="width:300px;" /></td> </tr> </table> </form> </body> </html>
Step-by-step how to code JQuery with Kleber
Step 1
You should have an address form ready for testing. It is either the form we provided or your own address form.
Please paste the following code into your application. The code below adds the required JQuery libraries for the autocomplete Ajax call. The CSS section adds a ‘processing’ gif so that there is a visual indication that the code is waiting for a reply from the server. Paste the following code into the <head> section of your page.
<link href="http://kleber.datatoolscloud.net.au/jquery19/themes/base/jquery.ui.all.css" rel="stylesheet"> <script src="http://kleber.datatoolscloud.net.au/jquery19/jquery-1.9.1.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.core.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.widget.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.position.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.autocomplete.js" ></script> <Script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.menu.js" ></script> <style type="text/css"> .ui-autocomplete-loading { background: white url('http://kleber.datatoolscloud.net.au/dt_processing_images/dt20x20.gif') right center no-repeat; } </style>
Step 2
Below is the first section of the JQuery $(function). Paste the following code after the </style> tag from Step 1.
$(function (){ $('#clear').click(function(){ $("#parserline").val(""); $("#BuildingName").val(""); $("#LevelType").val(""); $("#LevelNumber").val(""); $("#LotNumber").val(""); $("#UnitType").val(""); $("#UnitNumber").val(""); $("#UnitNumberSuffix").val(""); $("#StreetNumber1").val(""); $("#StreetNumberSuffix1").val(""); $("#StreetNumber2").val(""); $("#StreetNumberSuffix2").val(""); $("#StreetName").val(""); $("#StreetType").val(""); $("#StreetTypeSuffix").val(""); $("#PostBoxType").val(""); $("#PostBoxNumberPrefix").val(""); $("#PostBoxNumber").val(""); $("#PostBoxNumberSuffix").val(""); $("#Locality").val(""); $("#State").val(""); $("#Postcode").val(""); $("#OtherData").val(""); }); $('#parserline').keyup(function(){ var parseline = $("#parserline").val(); var rkey = $('#rkey').val();
There are a number of settings that can be set for the Ajax call however we have found the below settings work best.
The URL parameter holds the web URL for the KLEBER web service. If it does not contain the correct URL, the Ajax call will not receive the required response.
Step 3
Below is where the Ajax call is performed to parse the address input by user.
Please see code below for an example. Copy and paste this code to your application after the sample from Step 2.
$.ajax( { url: "http://Kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", crossDomain: true, data: { OutputFormat:"json", AddressLine1:parseline, AddressLine2:"", AddressLine3:"", AddressLine4:"", AddressLine5:"", AddressLine6:"", Method:"DataTools.Parse.Address.Au.Parse", RequestKey:rkey }, success: function (data) { $.map(data.DtResponse.Result, function (item) { $("#BuildingName").val(item.BuildingName ); $("#LevelType").val(item.LevelType ); $("#LevelNumber").val(item.LevelNumber ); $("#LotNumber").val(item.LotNumber ); $("#UnitType").val(item.UnitType ); $("#UnitNumber").val(item.UnitNumber ); $("#UnitNumberSuffix").val(item.UnitNumberSuffix ); $("#StreetNumber1").val(item.StreetNumber1 ); $("#StreetNumberSuffix1").val(item.StreetNumberSuffix1 ); $("#StreetNumber2").val(item.StreetNumber2 ); $("#StreetNumberSuffix2").val(item.StreetNumberSuffix2 ); $("#StreetName").val(item.StreetName ); $("#StreetType").val(item.StreetType ); $("#StreetTypeSuffix").val(item.StreetTypeSuffix ); $("#PostBoxType").val(item.PostBoxType ); $("#PostBoxNumberPrefix").val(item.PostBoxNumberPrefix ); $("#PostBoxNumber").val(item.PostBoxNumber ); $("#PostBoxNumberSuffix").val(item.PostBoxNumberSuffix ); $("#Locality").val(item.Locality ); $("#State").val(item.State ); $("#Postcode").val(item.Postcode ); $("#OtherData").val(item.OtherData); }); } }); }); });
The example above uses the Kleber method DataTools.Parse.Address.Au.Parse to parse address typed in by user. For more information on this method see http://kleber.datatools.com.au/method-description/?MethodName=DataTools.Parse.Address.Au.Parse
A Request Key (RK) is assigned and provided after you successfully register your Kleber account. Every client has a unique Request Key and it should be protected when making a call to Kleber server. In order to protect your RK, you can generate a Temporary Request Key that can be used to test all Kleber methods.
The DataTools.Security.GenerateTemporaryRequestKey method will create an encrypted key that can last anywhere from 3 seconds up to 5 minutes based on your application needs. It helps prevent anyone from using your Kleber credit as it becomes unusable once it expires.
For more information about generate temporary keys, please click on this link: http://kleberwebsite.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method=DataTools.Security.GenerateTemporaryRequestKey
Note: Please keep in mind that it is important to protect your Request Key to prevent your account credentials being used without your permission.
Kleber Phone Number Verification Code Walk Through
Step by step instructions for Phone Number Verification
Phone Number Verification Showcase
[HTMLGrab localfolder=”iFrames” src=”ButtonScripts.htm”]
If you want to test the Phone Verification showcase in real time you can use JS Fiddle. JS Fiddle is a helpful tool for developers to manage codes easily when testing codes. JS fiddle layouts web development programming language such as HTML, CSS and JavaScript in a three separate panels, making it simple for developers to work on all codes at once. In JS Fiddle, developers can collaborate and share codes.
Click the JS fiddle button to start testing Phone Number Verify showcase
The steps below will show how we can validate phone number.
Below is a basic Phone Number Verify form that we will use for this step-by-step.
Fig-1: Phone Number Verification form template
Before testing the showcase, it is necessary to have a basic form for phone number verification. The code below is an example of a basic HTML verify phone number form that would help you start testing the Phone Number Verification Showcase. You can use it as a base or reference to create your own form.
Create a new VerifyPhoneNumber.html file and insert the code below.
<html> </head> <body> <div > <table> <tr> <td> Request Key: </td> <td> <input name="RequestKey" id="rkey" value="" type="text" size="50"/> <button name="Verifybtn" id="verifybtn">Verify</button> </td> </tr> <tr> <td> Phone Number: </td> <td> <input name="phonenumber" id="phonenumber" type="text" size="50"/></td> </tr> <tr> <td> Response: </td> <td> <input name="Resp" id="resp" type="text" size="50"/></td> </tr> <tr> <td> Response Text</td> <td> <textarea id="textresponse"></textarea></td> </tr> </table> </div> </body> </html>
Note
- If you are testing the Phone Number Verification Showcase using JS Fiddle tool, you do not have to copy and paste the code for Phone Number Verification form. The codes are already pasted on panels by default.
- On the code provided above, the ‘ID’ value for the phone number field is “phonenumber”.
- <input name=”phonenumber” id=”phonenumber“ type=”text” size=”50” />
- If you want to use your own phone number form please keep in mind that the ‘ID’ value will be different.
Step 1
- You should have a Phone Number Verification form ready for testing. It is either the form we provided or your own form. The steps below will show you how we can verify phone numbers.
- Please paste the following code into your application. The code below adds the required JQuery libraries for the Ajax call. The CSS section adds a ‘processing’ gif so that there is a visual indication that the code is waiting for a reply from the server. Paste the following code into the <head> section of your page.
<link href="http://kleber.datatoolscloud.net.au/jquery19/themes/base/jquery.ui.all.css" rel="stylesheet"> <script src="http://kleber.datatoolscloud.net.au/jquery19/jquery-1.9.1.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.core.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.widget.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.position.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.autocomplete.js" ></script> <Script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.menu.js" ></script> <style type="text/css"> .ui-autocomplete-loading { background: white URL('http://kleber.datatoolscloud.net.au/dt_processing_images/dt20x20.gif') right center no-repeat; } </style>
Step 2
Below is the first section of the JQuery .click event code. Paste the following code after the </style> tag from Step 1.
<script> $( function (){ $('#verifybtn').click(function() { var requestkey = $('#rkey').val(); var phonenumber = $('#phonenumber').val(); alert(requestkey + " " + phonenumber);
As you can see the script above, the click event function is used to trigger an element when “Verify” button is pressed and released. Please note the element id used for phone verification is the ‘verifybtn’. If you are using your own phone verification form, replace ‘verifybtn’ to match your own field name.
There are a number of settings that can be set for the Ajax call however we have found the below settings work best.
The URL parameter holds the web URL for the KLEBER web service. If it does not contain the correct URL, the Ajax call will not receive the required response.
Step 3
Below is where the Ajax call is performed to return the response.
Please see code below for an example. Copy and paste this code to your application after the sample from Step 2
$.ajax({ url: "https://Kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", type: "GET", contentType: "application/json; charset=utf-8", data: { OutputFormat:"json", Method:"DataTools.Verify.PhoneNumber.ReachTel.VerifyPhoneNumberIsConnected", PhoneNumber: $('#phonenumber').val() , RequestKey:requestkey }, success: function (data){ $.map(data.DtResponse.Result, function (item) { $('#resp').val(item.StatusCode); $('#textresponse').val(item.StatusDescription); }); } }); }); });
The example above uses the Kleber method DataTools.Verify.PhoneNumber.ReachTel.VerifyPhoneNumberIsConnected to validate phone numbers when a user types in the phone number. For more information on this method see
When a user clicks “Verify” button, Kleber will return a response attributes and codes. For a detailed information about Response Attributes and Codes, please click on this link:
A Request Key (RK) is assigned and provided after you successfully register your Kleber account. Every client has a unique Request Key and it should be protected when making a call to Kleber server. In order to protect your RK, you can generate a Temporary Request Key that can be used to test all Kleber methods.
The DataTools.Security.GenerateTemporaryRequestKey method will create an encrypted key that can last anywhere from 3 seconds up to 5 minutes based on your application needs. It helps prevent anyone from using your Kleber credit as it becomes unusable once it expires.
For more information about generate temporary keys, please click on this link: http://kleberwebsite.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method=DataTools.Security.GenerateTemporaryRequestKey
Note: Please keep in mind that it is important to protect your Request Key to prevent your account credentials being used without your permission.
Kleber Address Verify and Repair Code Walk Through
Step by step instructions for Verify and Repair Address
Verify and Repair Showcase
This document has been written for developers who want to implement Kleber Verify and Repair address on their websites. Sample codes with each step are provided on this document to make the testing and implementation easier.
If you want to test the predictive showcase in real time you can use JS Fiddle. JS Fiddle is a helpful tool for developers to manage codes easily when testing codes. JS fiddle layouts web development programming language such as HTML, CSS and JavaScript in a three separate panels, making it simple for developers to work on all codes at once. In JS Fiddle, developers can collaborate and share codes.
Click the JS fiddle button to start testing verify and repair showcase using JS Fiddle tool
[HTMLGrab localfolder=”iFrames” src=”ButtonScripts.htm”]
The steps below will show how we can add predictive address search to the address line field.
Step-by-step how to code JQuery with Kleber
Fig-1: form template for verify and repair methods
The code below is an example of a basic HTML address form that would help you start testing the Verify and Repair Showcase. You can use it as a base or reference to create your own address form.
Create a new VerifyRepairAddressForm.html file and insert the code below.
<html> <head> <style type="text/css"> #div{ color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; padding-left: 250px; background-color: rgb(255, 255, 255); } </style> </head> <body> <form> <div> <table> <tr> <td>Address Line:</td> <td style="width: 10px;"></td> <td> <input name="Address line 1" id="addline1" type="text" size="50" /> </td> </tr> <tr> <td>Suburb:</td> <td style="width: 10px;"></td> <td><input name="Suburb" id="suburb" type="text" size="30" /></td> </tr> <tr> <td>State:</td> <td style="width: 10px;"></td> <td><input name="State" id="state" type="text" size="10" /></td> </tr> <tr> <td>Postcode:</td> <td style="width: 10px;"></td> <td> <input name="Postcode" id="postcode" type="text" size="10" /></td> </tr> <tr> <td>Country:</td> <td style="width: 10px;"></td> <td><input name="Country" id="country" type="text" size="20" /></td> </tr> <tr> <td>DPID:</td> <td style="width: 10px;"></td> <td><input name="Dpid" id="dpid" type="text" size="20" /></td> </tr> </table> </div> </form> </body> </html>
Note
- If you are testing the Verify and Repair Showcase using JS Fiddle tool, you do not have to copy and paste the code of HTML address form. The codes are already pasted on panels by default.
- The sample code in JS Fiddle for Verify and Repair method is the continuation of predictive address search.
- On the code provided above, the ‘ID’ value for the address line field is “addline1”.
<input name=”Address line 1” id=”addline1“ type=”text” size=”50” />
If you want to use your own address form please keep in mind that the ‘ID’ value will be different.
Step 1
You should have an address form ready for testing. It is either the form we provided or your own address form. Please make sure the following code is pasted into your application. The code below adds the required JQuery libraries for the autocomplete Ajax call. The CSS section adds a ‘processing’ gif so that there is a visual indication that the code is waiting for a reply from the server. Paste the following code into the <head> section of your page.
<link href="http://kleber.datatoolscloud.net.au/jquery19/themes/base/jquery.ui.all.css" rel="stylesheet"> <script src="http://kleber.datatoolscloud.net.au/jquery19/jquery-1.9.1.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.core.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.widget.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.position.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.autocomplete.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.menu.js" ></script> <style type="text/css"> .ui-autocomplete-loading { background: white URL('http://kleber.datatoolscloud.net.au/dt_processing_images/dt20x20.gif') right center no-repeat; } </style>
Step 2
The code below uses focus out on postcode field. Paste the following code after the Ajax snippet code for Retrieve Address from the previous document (Previous Australian Address Capture Code Walkthrough).
$('#postcode').on('focusout', function(){ var DPID = $('#dpid').val(); var ADDLINE = $('#addline1').val(); var SUB = $('#suburb').val(); var STATE = $('#state').val(); var PCODE = $('#postcode').val(); if((DPID == "")&&(ADDLINE != "")) { if((ADDLINE != "")&&(SUB != "")&&(STATE != "")&&(PCODE != "")) { alert("This is Verify")
Please Note: On the code snippet above, the alert is only for testing purposes please remove during production.
There are a number of settings that can be set for the Ajax call however we have found the below settings work best.
The URL parameter holds the web URL for the KLEBER web service. If it does not contain the correct URL, the Ajax call will not receive the required response.
Step 3
The code below is where the Ajax call is performed to verify and/or repair the Australian address. Copy and paste this code to your application after the sample from Step 2.
$.ajax( { url: "https://Kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", type: "GET", contentType: "application/json; charset=utf-8", data: { OutputFormat:"json", Method:"DataTools.Verify.Address.AuPaf.VerifyAddress", AddressLine1: $('#addline1').val(), Locality: $('#suburb').val(), State: $('#state').val(), Postcode: $('#postcode').val(), RequestKey:"" }, success: function (data) { $.map(data.DtResponse.Result, function (item) { if(item.DPID == "") { alert("Verify failed so running repair"); RepairAddress(this); } else { $('#addline1').val(item.AddressLine); $('#suburb').val(item.Locality); $('#state').val(item.State); $('#postcode').val(item.Postcode); $('#dpid').val(item.DPID); } }); } }); } else { alert("Running Repair") RepairAddress(this); } } });
Note: On the code snippet above, the alert is only for testing purposes please remove during production.
The example above uses the Kleber method DataTools.Verify.Address.AuPaf.VerifyAddress to verify an Australian address against Postal Address File. For more information on this method see
A Request Key (RK) is assigned and provided after you successfully register your Kleber account. Every client has a unique Request Key and it should be protected when making a call to Kleber server. In order to protect your RK, you can generate a Temporary Request Key that can be used to test all Kleber methods.
The DataTools.Security.GenerateTemporaryRequestKey method will create an encrypted key that can last anywhere from 3 seconds up to 5 minutes based on your application needs. It helps prevent anyone from using your Kleber credit as it becomes unusable once it expires.
Note: Please keep in mind that it is important to protect your Request Key to prevent your account credentials being used without your permission.
Step 4
The RepairAddress function can be called in multiple location. The function gets called if the verify fails.
Copy and paste this code after the code from Step 3.
function RepairAddress() { $.ajax({ url: "https://Kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", type: "GET", contentType: "application/json; charset=utf-8", data: { OutputFormat:"json", Method:"DataTools.Repair.Address.AuPaf.RepairAddress", AddressLine1: $('#addline1').val(), Locality: $('#suburb').val(), State: $('#state').val(), Postcode: $('#postcode').val(), RequestKey:"" }, success: function( data ) { $.map(data.DtResponse.Result, function (item) { if(item.DPID != "") { $('#addline1').val(item.AddressLine); $('#suburb').val(item.Locality); $('#state').val(item.State); $('#postcode').val(item.Postcode); $('#dpid').val(item.DPID); } }); } }); };
The example above uses the Kleber method DataTools.Repair.Address.AuPaf.RepairAddress to repair an Australian address. For more information on this method see: DataTools Kleber Method Description
Kleber Predictive Australian Address Capture Code Walk Through
Step by step instructions for Australian Address Capture
Predictive Australian Address Capture Showcase
This document has been written for developers who want to implement Kleber Predictive Australian Showcase on their websites. To make the showcase easier to test and implement, this document provides code samples with each step of implementation that can be copied and pasted into websites.
Showcase URL – http://discover.datatools.com.au/showcases/predictive-australian-address-capture/
Search Method – DataTools.Capture.Address.Predictive.AuPaf.SearchAddress – As the user types an address, this method lists all possible addresses for selection.
Please Note: Special conditions apply to the use of this method. This method must always be used in conjunction with the retrieve method DataTools.Capture.Address.Predictive.AuPaf.RetrieveAddress. If the retrieve method is not called, or not utilised with an appropriate retrieve ratio to searches, an auto retrieve cost will be applied to your account to ensure you do not breach the data licencing conditions.
Retrieve Method – DataTools.Capture.Address.Predictive.AuPaf.RetrieveAddress – This method is called once a user has selected an address from the drop down list
[HTMLGrab localfolder=”iFrames” src=”ButtonScripts.htm”]
If you want to test the predictive showcase in real time you can use JS Fiddle. JS Fiddle is a helpful tool for developers to manage codes easily when testing codes. JS fiddle layouts web development programming language such as HTML, CSS and JavaScript in a three separate panels, making it simple for developers to work on all codes at once. In JS Fiddle, developers can collaborate and share codes.
Click the JS fiddle button to start testing predictive showcase using JS Fiddle tool
The steps below will show how we can add predictive address search to the address line field.
Step-by-step how to code JQuery with Kleber
Below is a very basic address form that we will use for this step-by-step.
Fig-1: Auto-complete form template
Before testing the showcase, an address form is necessary in testing to capture the address. The code below is an example of a basic HTML address form that would help you start testing the Predictive Showcase. You can use it as a base or reference to create your own address form.
Create a new AddressForm.html file and insert the code below.
<html> <head></head> <body> <div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; padding-left: 409.25px; background-color: rgb(255, 255, 255);"> <form> <table> <tr> <td>Address Line:</td> <td style="width: 10px;"></td> <td> <input name="Address line 1" id="addline1" type="text" size="50" /> Enter address here</td> </tr> <tr> <td>Suburb:</td> <td style="width: 10px;"></td> <td><input name="Suburb" id="suburb" type="text" size="30" /></td> </tr> <tr> <td>State:</td> <td style="width: 10px;"></td> <td><input name="State" id="state" type="text" size="10" /></td> </tr> <tr> <td>Postcode:</td> <td style="width: 10px;"></td> <td> <input name="Postcode" id="postcode" type="text" size="10" /></td> </tr> <tr> <td>Country:</td> <td style="width: 10px;"></td> <td><input name="Country" id="country" type="text" size="20" /></td> </tr> </table> </form> </div> </body> </html>
Note
- If you are testing the Predictive Showcase using JS Fiddle tool, you do not have to copy and paste the code of HTML address form. The codes are already pasted on panels by default.
- On the code provided above, the ‘ID’ value for the address line field is “addline1”.
<input name=”Address line 1” id=”addline1“ type=”text” size=”50” />
- If you want to use your own address form please keep in mind that the ‘ID’ value will be different.
Step 1
You should have an address form ready for testing. It is either the form we provided or your own address form. The steps below will show you how we can add predictive address searching to the address line field.
Please paste the following code into your application. The code below adds the required JQuery libraries for the autocomplete Ajax call. The CSS section adds a ‘processing’ gif so that there is a visual indication that the code is waiting for a reply from the server. Paste the following code into the <head> section of your page.
<link href="http://kleber.datatoolscloud.net.au/jquery19/themes/base/jquery.ui.all.css" rel="stylesheet"> <script src="http://kleber.datatoolscloud.net.au/jquery19/jquery-1.9.1.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.core.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.widget.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.position.js" ></script> <script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.autocomplete.js" ></script> <Script src="http://kleber.datatoolscloud.net.au/jquery19/ui/jquery.ui.menu.js" ></script> <style type="text/css"> .ui-autocomplete-loading { background: white URL('http://kleber.datatoolscloud.net.au/dt_processing_images/dt20x20.gif') right center no-repeat; } </style>
Step 2
Below is the first section of the JQuery autocomplete code. Paste the following code after the </style> tag from Step 1.
<script> $(function() { $('#addline1').autocomplete( { source: function( request, response ) {
As you can see in the script above, the field used for the predictive search is the ‘addline1’ field. If you are using your own address form, replace ‘addline1’ to match your own field name.
There are a number of settings that can be set for the Ajax call however we have found the below settings work best.
The URL parameter holds the web URL for the KLEBER web service. If it does not contain the correct URL, the Ajax call will not receive the required response.
Below is where the Ajax call is performed to return the predictive dropdown list.
Please see code below for an example. Copy and paste this code to your application after the sample from Step 2.
$.ajax( { url: "http://Kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", type: "GET", contentType: "application/json; charset=utf-8", data: {OutputFormat:"json", ResultLimit:100, AddressLine:request.term, Method:"DataTools.Capture.Address.Predictive.AuPaf.SearchAddress", RequestKey:" "}, success: function( data ) { $('#dpid').val(""); response( $.map( data.DtResponse.Result, function( item ) { var Output = (item.AddressLine + ", " + item.Locality + ", " + item.State + ", " + item.Postcode); return {label: Output,value: Output,Output: Output, RecordId: item.RecordId,AddressLine: item.AddressLine}; })); } }); },
The example above uses the Kleber method DataTools.Capture.Address.Predictive.AuPaf.SearchAddress to return address suggestions for each keystroke into the address line field. For more information on this method see http://kleber.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method=DataTools.Capture.Address.Predictive.AuPaf.SearchAddress
A Request Key (RK) is assigned and provided after you successfully register your Kleber account. Every client has a unique Request Key and it should be protected when making a call to Kleber server. In order to protect your RK, you can generate a Temporary Request Key that can be used to test all Kleber methods.
The DataTools.Security.GenerateTemporaryRequestKey method will create an encrypted key that can last anywhere from 3 seconds up to 5 minutes based on your application needs. It helps prevent anyone from using your Kleber credit as it becomes unusable once it expires.
For more information about generate temporary keys, please click on this link: http://kleber.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method=DataTools.Security.GenerateTemporaryRequestKey
Note: Please keep in mind that it is important to protect your Request Key to prevent your account credentials being used without your permission.
Step 3
At this point, the code you have copied should be enough for you to type in an address. As the user types, a drop down list of possible addresses should appear.
The Retrieve method allows you to retrieve the parsed fields from an individual address that was selected from the first ajax call. The additional address information returned includes the DPID, Unit Type, Street Number, PostBox Number, Building Name and etc.
Please note that we use a different method in the sample below which is: DataTools.Capture.Address.Predictive.AuPaf.RetrieveAddress
For more information on this method see http://kleber.datatoolscloud.net.au/kleberbrowser/KleberMethodDescription.aspx?Method= DataTools.Capture.Address.Predictive.AuPaf.RetrieveAddress
Copy and paste the code to your application.
select: function( event, ui ) { $.ajax( { url: "http://Kleber.datatoolscloud.net.au/KleberWebService/DtKleberService.svc/ProcessQueryStringRequest", dataType: "jsonp", crossDomain: true, data: { OutputFormat:"json", RecordId:ui.item.RecordId, Method:"DataTools.Capture.Address.Predictive.AuPaf.RetrieveAddress", RequestKey:" "}, success: function (data) { $.map(data.DtResponse.Result, function (item) { $('#addline1').val(ui.item.AddressLine); $('#suburb').val(item.Locality); $('#state').val(item.State); $('#postcode').val(item.Postcode); $('#dpid').val(item.DPID); displayMapAddress(ui.item.AddressLine + ", " + item.Locality + " " + item.State + " " + item.Postcode); }); } }); }, }); });
Please Note: Special conditions apply to the use of the DataTools.Capture.Address.Predictive.AuPaf.SearchAddress method. This method must always be followed by either the DataTools.Capture.Address.Predictive.AuPaf.RetreiveAddress method once an address has been selected. Failing to do so will be a breach to the data licencing conditions and penalties will apply.
Kleber JQuery Sample Code
Need to access Kleber with Java Script JQuery?
Step 1 – Go to the Kleber Browser
Step 2 – Select which method you need to develop, to view the technical documentation.
Step 3 – The page has all the technical information that you require to implement the method. The benefits of this page to you the developer, is that it provides both the Request, Response and Endpoint parameters.
To view a sample of JQuery code for the particular method you have chosen, scroll down to the middle of the page where you will find a button labelled “JQuery”.
This button will open a page displaying the formatted ‘JQuery Code Sample’ for your selected method.
Step 4 – Example of the code.
Note: Please refer to your contact to obtain a Kleber Request Key, required for testing.
Kleber API Technical Guide
Kleber Ruby Sample Code
Need to access Kleber Ruby methods?
Step 1 – Go to the Kleber Browser
Step 2 – Select which method you need to develop, to view the technical documentation.
Step 3 – The page has all the technical information that you require to implement the method. The benefits of this page to you the developer, is that it provides both the Request, Response and Endpoint parameters.
To view a sample of Ruby code for the particular method you have chosen, scroll down to the bottom of the page where you will find a button labelled “Ruby”.
This button will open a page displaying the formatted ‘Ruby Code Sample’ for your selected method.
Step 4 – Example of the code.
Note: Please refer to your contact to obtain a Kleber Request Key, required for testing.
Kleber PHP Sample Code
Need to access Kleber with PHP?
Step 1 – Go to the Kleber Browser
Step 2 – Select which method you need to develop, to view the technical documentation.
Step 3 – The page has all the technical information that you require to implement the method. The benefits of this page to you the developer, is that it provides both the Request, Response and Endpoint parameters.
To view a sample of PHP code for the particular method you have chosen, scroll down to the bottom of the page where you will find a button labelled “PHP”.
This button will open a page displaying the formatted ‘PHP Code Sample’ for your selected method.
Step 4 – Example of the code.
Note: Please refer to your contact to obtain a Kleber Request Key, required for testing.
Kleber Java Sample Code
Need to access Kleber with Java?
Step 1 – Go to the Kleber Browser.
Step 2 – Select which method you need to develop, to view the technical documentation.
Step 3 – The page has all the technical information that you require to implement the method. The benefits of this page to you the developer, is that it provides both the Request, Response and Endpoint parameters.
To view a sample of Java code for the particular method you have chosen, scroll down to the bottom of the page where you will find a button labelled “Java”.
This button will open a page displaying the formatted ‘Jave Code Sample’ for your selected method.
Step 4 – Example of the code.
Note: Please refer to your contact to obtain a Kleber Request Key, required for testing.
Kleber VB.Net Sample Code
Need to access Kleber with VB.Net?
Step 1 – Go to the Kleber Browser
Step 2 – Select which method you need to develop, to view the technical documentation.
Step 3 – The page has all the technical information that you require to implement the method. The benefits of this page to you the developer, is that it provides both the Request, Response and Endpoint parameters.
To view a sample of VB.Net code for the particular method you have chosen, scroll down to the bottom of the page where you will find a button labelled “VB.Net”.
This button will open a page displaying the formatted ‘VB.Net Code Sample’ for your selected method.
Step 4 – Example of the code.
Note: Please refer to your contact to obtain a Kleber Request Key, required for testing.
Kleber C# Sample Code
Need to access Kleber with C#?
Step 1 – Go to the Kleber Browser
Step 2 – Select which method you need to develop, to view the technical documentation.
Step 3 – The page has all the technical information that you require to implement the method. The benefits of this page to you the developer, is that it provides both the Request, Response and Endpoint parameters.
To view a sample of C# code for the particular method you have chosen, scroll down to the bottom of the page where you will find a button labelled “C# ”.
This button will open a page displaying the formatted ‘C# Code Sample’ for your selected method.
Step 4 – Example of the code.
Note: Please refer to your contact to obtain a Kleber Request Key, required for testing.
Kleber Dynamics 2015 CRM Implementation Guide
The following code implements the DataTools Kleber predictive address capture service on the Contact form in Dynamics CRM.
Step 1
Download the Sample Files “index.html”, “new_jquery_autocomplete_all.js”, “new_jquery1.9.1” and “new_autocomplete_style.css” below.
Step 2
Upload the “new_jquery_autocomplete_all.js”, “new_jquery1.9.1” and “new_autocomplete_style.css” as “web resource” into Dynamics CRM.
Step 3
Open the “index.html” file in an editor and update the following:
a. Update the paths in the “link href” on line 4 and the “script src” on lines 5 and 6 to the new web resource path where the resources were uploaded to in Dynamics CRM.
b. On line 10, update the Request Key to your Request Key obtained from your Kleber Accounts page.
c. If you have been allocated a custom web service end points for Kleber edit the URL on lines 28 and 50 otherwise leave them as they are.
d. Note: Please rename the field names in the example “index.html” to match your Dynamics CRM field names in lines no. 15, 59, 61,62,63 & 64.
Step 4
After you have made the modification to the “index.html” file upload it as a “HTML web resource” into Dynamics CRM.
Step 5
Now you need to add this as a web resource in your required form. You can simply do this by going in to form editing page and insert a web resource.
Step 6
Fill the details and remember that you must not check the restriction checkbox highlighted below:
Step 7
After this, you just need to adjust the properties to display the iframe (web resource) you just created and it will work fine in the page you embedded this web resource.