Refiner cleans address lists or databases containing UK postal addresses against the definitive Royal Mail Postcode Address File (PAF). It provides the highest possible levels of accurate automated cleansing and correction with an easy interactive mode.
Launch Refiner from your Start menu by selecting Start – AFD Refiner 3.
Refiner can make substantial changes to your address list, so you should never process a list until a FULL AND SECURE BACKUP is taken. You are strongly advised to work on a copy of your database rather than on live data – you may wish to compare the data after changes with the old, unchanged list.
Even if you write the cleaned data out to separate fields in your database or choose to output to a different database, you should still make sure your data is backed up to ensure you do not lose anything should you set something up incorrectly. A mistake should be easy to spot and correct, but if your data is not backed up then you will have no way of returning to your original data to correct that mistake.
You must employ proper quality control procedures to ensure you are happy with the changes made to your database before finally accepting the results and using them in a mailing.
Our Helpdesk is available Monday – Friday 8:30am – 5:30pm (except holidays).
Phone – 0333 433 0712
Email – support@afd.co.uk
Refiner can operate with Delimited (e.g., comma separated, tab delimited), Fixed Width Text files, and ODBC (32-bit) Connections to Microsoft Access and MYSQL Databases (providing a DSN for that data source has been set-up on your system).
The Wizard (the star icon on the top right) method takes you through each step and will generate your session file upon completion.
To open an existing session file, click the Select Data icon and on the Session line, then locate and select the existing file. Alternatively, you can choose the drop down on the Session line and choose from your recently used sessions.
Once the session is chosen this will load all the settings and data file you previously saved.
On the Input tab, you can select which available fields you want Refiner to match against.
All fields containing address elements can be transferred or removed from the ‘Matching Fields’ list via drag and drop or use the buttons in the centre of this screen. Auto Add will review your available fields and move all relevant address fields across for you, once transferred the button will be greyed out. Do not transfer any fields containing non-address data, as Refiner will attempt to match these to address data and include them in the address. This could result in incorrect results and surplus information included in the addresses written back to your database.
Fields are displayed in the ‘Available Fields’ list in the order they are held in your database. Normally this will mean that they are in the correct order for the address. However, if you add an additional field that you earlier missed, or the fields are not in the correct order, use the up and down arrows on the right of the ‘In-use’ list to correct this.
This option is for use when cleaning databases where there is a separate ‘organisation’ field which has been consistently used.
PAF contains around 1.5 million organisation names. Transferring the organisation field from the Available Fields list to the Matching Fields list will enable a higher match rate during cleansing, especially for organisations with a PO Box address.
Some addresses match to a PAF record but contain an ‘extra’ field above the address. In these cases, Refiner must place that information in either the property or organisation field. The process for deciding this is usually accurate. However, by right clicking on the organisation and selecting the ‘organisation’ option, the organisation field is fixed and if there is any uncertainty, then this field is automatically retained as it appears and is not transferred to the property field.
This option applies only to DX Customers. The DX enabled version of Refiner includes the option to mark Input Fields as containing a DX Number and Exchange. These are for when your database contains an existing DX Number field, which should be mapped in and marked appropriately.
Should you have no separate DX Number field but some of your Input addresses are DX addresses, there is no need to mark anything – Refiner will extract the DX details from them automatically.
The Output tab is used to specify how Refiner writes back address data to your database. Simply drag the field name from the Available Fields list on the right to match the appropriate Mapped Fields. All available fields are grouped by relevant sector. A comprehensive list of all our Available Fields can be found here.
🛈 Please note that any fields that are greyed out will require an additional licence. To acquire the licence you will need to contact your Account Manager or contact our sales team at postcode@afd.co.uk or by phone on 0333 433 0711.
If you have missed any fields, new fields can be added by right clicking on the fields section and selecting the option to add a new row. Or alternatively, highlight the existing fields and select the copy fieldname option via the right click. You can then right click to paste as New Fields.
Mapped fields can be removed the bin icon next to each field or via drag and drop back to the available fields section.
🛈 Please note that for a complete mailing address all fields from Organisation through to Postcode (county is optional) must be mapped back to your database.
NB: A mapped field can be made up of multiple fields. For example, you may want Property and Street mapped together.
Header Name |
Description |
Extra Closeness | These fields indicate how close the output address is to the PAF Matched Address. Organisation Closeness Property Closeness Street Closeness Locality Closeness |
Retained | These fields allow you to return the non-PAF information that we have retained after your address has been cleansed. retainedOrg1 retainedOrg2 retainedOrg3 retainedBuilding retainedData |
This option allows you to squeeze your address data except the postcode (property, street, locality, town) into a smaller number of fields than the standard format of five address fields. Along with line squeezing you are able to specify the field length, optionally include the county and fix the town to a specific output field.
On the output tab, you will need to assign Address from the line squeeze group in the available fields drop-down to the number of fields you want the Address squeezed to. On the settings tab, you can then choose each target field and set any additional settings.
The Output tab is used to specify how Refiner writes back address data to your database. Simply drag the field name from the Available Fields list on the right to match the appropriate Mapped Fields. All available fields are grouped by relevant sector. A comprehensive list of all our Available Fields can be found here.
If you have missed any fields, new fields can be added by right clicking on the fields section and selecting the option to add a new row. Or alternatively, highlight the existing fields and select the copy fieldname option via the right click. You can then right click to paste as New Fields.
Mapped fields can be removed the bin icon next to each field or via drag and drop back to the available fields section.
Please note that for a complete mailing address all fields from Organisation through to Postcode (county is optional) must be mapped back to your database.
NB: A mapped field can be made up of multiple fields. For example, you may want Property and Street mapped together.
The Settings tab is where you specify the options for how Refiner cleans your database. There are multiple Cleaning Modes and Processing Options you can use depending on the outcome that you need, Default being the standard option. All options are detailed in the below tables.
The Store Changes file name can be amended by right click on the file path and choosing ‘Edit Store As’.
Cleaning Mode | |
Default | Attempts all methods for a match |
Verify Postcode Only | Verifies the address from the Postcode. If it can’t be verified from the postcode (e.g., postcode may not be correct), it is not matched. |
Full Match Only | Only returns Full PAF matches. If the property is not on PAF, a street level match will not be offered. |
Attach Mode | Used to simply attach data via the postcode only and does not verify the address. |
Processing Options | |
Speed | Skips slower portions of the processing (lowers match rate but improves performance). |
Ambiguous | Allows ambiguous matches the user can choose from. |
PO Box Last | Matches Street Preference to PO Box where both are present within the source address. |
No Default DPS | For non-DPS matches (e.g., 400) Refiner will use a default DPS value of 9Z as that is acceptable for mailing purposes. Selecting this option means the field in these cases will be blank. |
Deduplication | Enable Deduplication. Ensure Target Fields are selected for Deduplication. For example (Property and Postcode). |
Interactive | Specifies the address is being returned to the user interactively to check. |
Format Non-Matched | Provide a formatted result for non-matched addresses (by default only the result code is returned unless using compatibility (non-path based) calls. |
Retain Alias | Retain Alias Localities if present in the source address. |
No Organisation Fill | Unmatched data will not be moved to the organisation from the source address. This is useful if the customer doesn’t map back the organisation field. |
Postcode Correct | Refiner will assume the source postcode is correct and therefore match records with an otherwise lower confidence on the same postcode. |
Grid Approximation
| Where a grid reference is not available for an address use an approximation for that locality or town. |
Store Changes
| Save the results to the Data File/Database when processing all. Displayed below is the name of the file to be created. |
Target Fields | |
Deduplication Field | Marks the fields to be checked for Deduplication. |
Upper Case | Forces the address field into all Upper Case – e.g., “AFD SOFTWARE LTD” |
Capitalise | Attempts to correctly capitalise the address field – e.g., “AFD SOFTWARE LTD -> AFD Software Ltd” |
Remove Commas | Removes Commas from the data field. – e.g., “Jurby Road, Lezayre – > Jurby Road Lezayre” |
Refiner includes a de-duplication facility to enable duplicate records to be identified in your database. The fields to be reviewed for duplication can be set with the Target Fields.
Refiner will write a duplication key value to this during the cleaning process. At the end of the process Refiner will mark duplicates with the same duplication group number. Records sharing the same group number can later be checked and removed as necessary. All non-duplicating records will have a duplication group number of zero.
To turn on de-duplication check the ‘enable’ box in the Processing Options.
The Process tab is used, once you have completed setting up Refiner, to preview and review your cleansed output records before you run the full cleanse process. You can at any time switch to the ‘Settings’ tab to change your settings.
If you want to preview the addresses to see how they will look once cleansed, you can choose the “Auto Preview” option and then click the arrow through each record, which will display as shown above.
Alternatively, you can choose the “Process All” button which will then run through the whole file and take you to the Results screen.
Changes will only be written back to your database if you have ticked ‘Store Changes’ from the processing options on the Settings tab. It is useful initially to review the Suggested Records created by Refiner and use this to adjust your Settings accordingly before committing to store changes.
Ambiguous Postcodes are indicated by a result code of -2 and Ambiguous address records are indicated by a result code of -4. These will appear on the results tab.
Where Refiner finds more than one possible address match, a list of possibilities will be available to view. To view the matches, right click on the Ambiguous line on the results tab and show matches.
The process tab will be presented with the Ambiguous Match box, where you click through each suggested match. If you are displayed with a relevant match, you can then accept the match which will write the address back to your database.
If you are uncertain of the address yourself, we strongly recommend you select to keep the Original Record. To retain the original record from the ‘Ambiguous Match’ dialogue, press Cancel to accept and store another record, select it then press the Accept button.
The Borrow function is intended for use where a match may not be as accurate as the user is expecting (in most cases where a -1 No Match Found result code was provided). The No Match Found results will appear on the results tab.
An address can then be borrowed by right clicking on the results i.e. No Match Found and choosing View Matches. You will be able to locate the address using the arrow buttons and choose the Borrow button.
The Borrow screen will then allow you to type the address you are looking for into the Find field and choose Borrow. You will be taken back to the process tab, where you can review and accept this address which will be output to your database.
The Results tab shows statistics for the cleaning process. When de-duplication is being used, the results can also be viewed here.
There will now be a .new file in the original database location with all the cleansed data along with result codes for you to review, clicking the “Process Complete” button will take you to the location. Also, there will be a .results file which contains the results details shown on the application.
Statistic | Description | Corresponding Result Codes |
Complete PAF Match | Records matched identically to a record on PAF (The Royal Mail Postcode Address File) | 100 |
Postcode Match | Address verified from the Postcode and matches a record in PAF with some correction. | 200 |
Address verified from a postcode which was substituted due to a Royal Mail recoding and now matches a record in PAF. | 201 | |
Postcode, Property Match assuming the Postcode is correct. | 203 | |
Postcode Match with Non-Matched Property added in. | 204 | |
Postcode Match with Changed Postcode and Non-Matched Property added in. | 205 | |
Full DPS Match | Address verified to PAF with some correction, looking wider than just the specified Postcode. | 300, |
Address verified. Multiple PAF delivery point records exist for this address and the organisation could not be matched. As a result the specific DPS/UDPRN could not be returned. | 301 | |
Limited DPS Match (Address verified to PAF but Locality or town information not present). | 302 | |
Non-DPS Match | Address verified to Street Level, i.e., the property was not on PAF, but a unique match to the street was identified on a single Postcode. | 400 |
User Cleaning | User Modified – You have modified this record yourself to correct it following Refiner’s match attempt. | 700 |
User Selected from a list of records due to a match with an ambiguous Postcode. | 702 | |
User selected Refiner’s Suggested Record (no match was made because there was insufficient data to reliably verify the address). | 703 | |
User selected from a list of records due to multiple possible matches for the address. | 704 | |
No Match Found | Refiner has been unable to match this record. | -1 |
Suggested Record Match – Refiner has found a unique possible match for this record but there is not enough address data to reliably match it. | -3 | |
Ambiguous Postcode | Records which could be matched to street level but there is more than one possible Postcode for the address and the correct one could not be determined. No other address details vary. | -2 |
Ambiguous Match | Records which could not be matched to a unique address. Several possibilities have been given and one or more or none may be correct. The original record will be kept unless you select the correct address yourself. | -4 |
Non-UK Matched | The number of records that could not be matched because they are obviously outside the UK, Isle of Man or Channel Islands (can only be determined if a recognised country is included in the address). | -5 |
No Address Data | The number of records that contain no address data to be cleaned. | -6 |
Command line options are available to allow Refiner3 to be run silently. To be able to do so, you will need to create a string by using the below options:
**Please be aware you will need to setup and save your session file using the Refiner3 Frontend prior to creating a command line string**
Command Line Options | |
Session= | Specifies the Session File to be loaded.* |
Auto=1 | Refiner will stay open once the process has complete. |
Auto=2 | Refiner will close once the process has complete. |
Minimise=on | Frontend is minimised during the run. |
Warnings=off | No warning messages are displayed. |
NotifyIcon=on | Refiner appears in the system tray only. The % status of the run is displayed via the tray item text. Overrides any minimise setting. Double click on the system tray icon to display the app. |
ProgressFile= | Specify a name for the process file. If not, set it defaults to the sessionName.0.** |
log=all | Will perform all logging (requests and errors).*** |
log=err | Will only log when an error is hit during the processing of the file.*** |
*The session file needs to be in the same location as the as the Refiner3 application.
**The progress file will increment every 10% and provide a .completed file after processing in the application folder by default (this can be specified in the command you send). The increments can be amended within the RefinerSettings.xml using the following setting – < ProcessLogIncrement>10< /ProcessLogIncrement>
***The log file will be output to the application folder if < Log>True< /Log>
is set in the RefinerSettings.xml. Additionally the output file path can also be amended within the RefinerSettings.xml using the following setting – < LogFolder> C:\AFD Software\Refiner3\< /LogFolder>
This example will run Refiner in the background using the default session, provide a progress file called sessionname, displaying no warnings and outputting all errors to the log file.
“C:\AFD Software\Refiner3\refiner3.exe” auto=2 session=default.rfn warnings=off notifyIcon=on progressfile=sessionname log=err
If you need to update your connection settings, you can do so by using the below steps:
You will then be prompted with an additional window where you can enter the required information.
You can find the global refiner settings within the RefinerSettings.xml in your application folder. Below are the additional settings you can amend:
Setting | Meaning |
< PostDataMaxEntries>50< /PostDataMaxEntries> | Allows the user to specify number of records you would like to send per post. The recommendation would be 50 which is our default. |
< ProcessLogIncrement>10< /ProcessLogIncrement> | Changes the increments that the process log is updated. The number specified is a percentage. |
< Log>False< /Log> | Enables/disables logging based on if set to True/False. |
< LogFolder> C:\AFD Software\Refiner3\< /LogFolder> | Allows the user to specify the location any logs. |
< EmptyResultsWarning>False< /EmptyResultsWarning> | Allows the user to decide if exceptions prompt with a warning or show in a log file. If setting is True the exception warning will prompt, if false the exception will write out to the log file. |