We’re asked with some frequency about ways in which data - especially contact data - can be normalized within CiviCRM. We’ve seen some attempts at this through various extensions (CiviNormalize being one of the most recent examples) but support for those efforts in the Civi community has been somewhat hit-or-miss; as a result we’ve been reluctant to recommend any of those solutions to you.
However, there is one option that’s already included in core CiviCRM functionality. USPS address standardization via the USPS API is supported, and it’s quite straightforward to add!
Step 1. Sign up for a USPS Web Tools account.
Go to https://www.usps.com/business/web-tools-apis/welcome.htm and click “Register Now” to create an account. Once you’ve verified that (you’ll receive an email confirmation with your username, password, and a link for accessing USPS’ web tools server.
Step 2. Add your credentials into CiviCRM.
In Civi, go to Administer > Localization > Address Settings and scroll to the bottom of the page. Under Address Standardization Provider, select USPS and then enter your USPS username and the link from Step 1, then save.
Step 3. Test with a contact.
Here are some before-and-after shots to show you how this functionality works. In the first set, the address is essentially correct but USPS will capitalize it and add the zip+4 code if you’ve not already entered it (which I hadn’t).
The second example demonstrates even better how this integration can be really useful. I’ve entered an address that is mostly correct, but not completely (the location has incorporated as a separate city since I moved). Once I save the address, the correction from USPS is used to store it correctly.
As you’ll see when you register for a USPS account, you’ll see warnings about using the API service only for USPS shipping and mailing services. Presumably this would be your main purpose for address standardization in any case, so you should be safe to utilize this. If these guidelines are changed, we’ll certainly let you know.
Want our help setting this up? Have some questions for us? Contact your support email for assistance any time!