A good duplicate checker – for checking if the same address has already been entered – needs to take into account misspellings or spelling variations.
We have implemented our own APEX methods which transform each address field (name, street, city, postcode) into a phonetic code. These codes are then compared with other addresses to find possible duplicates. A fuzzy probability is assigned based on the type of match.
How are other users here approaching duplicate checks? Anyone employing the new String.getLevenshteinDistance()
?
I'll post my own code below in the interests of knowledge sharing.
Best Answer
Phonetic Encoding Algorithm
Helper Functions
Find Accounts Matching Address
Use Case