Contact Address Validation PostGrid
Verify every contact address is real and deliverable — one click sends it to PostGrid's Address Verification API, returns a standardized address with USPS DPV confirmation, and writes the geocoded coordinates back to the record. US/CA and International coverage, a sandbox mode for risk-free testing, and a provider-agnostic framework underneath.
Product Overview
Contact Validation PostGrid brings the PostGrid Address Verification API to the Odoo Contact form. It checks whether an entered address refers to a real, deliverable place, standardizes it, and geocodes it — directly from the Contact form, without leaving Odoo. US and Canadian addresses use PostGrid's standard verification API; every other country is routed automatically to the International API.
The product is built on a provider-agnostic address validation framework. The button, the review dialog, the stored verdict, and the search filters are shared framework components; PostGrid plugs in as a provider adapter. If your requirements ever change, you can switch to the Google or Smarty adapter from Settings, and your users' workflow stays exactly the same.
Clicking Verify Address sends the contact's address to PostGrid via a secure server-side request — the API key never reaches the browser. A dialog opens with PostGrid's verdict kept verbatim — Verified, Corrected, or Failed for US/CA, and the International API statuses elsewhere — translated into a clear severity color, a side-by-side comparison of the entered and standardized addresses, the USPS DPV confirmation for US addresses, and delivery details such as the residential/commercial indicator, vacancy flag, and county.
PostGrid's terms permit permanent storage of standardized addresses, so the standardized result is kept on the contact for reference. A dedicated sandbox mode with separate test keys returns mock data — your team can test and train without spending verification credits, and sandbox results are clearly marked in the dialog and chatter.
Who It's For
The Problem It Solves
Odoo's address fields are free-text. Typos, incomplete streets, and non-existent postcodes are saved without warning and propagate to every downstream process that reads the contact's address — from shipping labels to invoice footers.
Most address validation connectors hardwire one provider into fields, views, and code. Changing vendors later means migrating data and retraining users. Here the provider is a plug-in choice — the workflow, fields, and filters are shared.
Validating a rollout against a live, pay-per-lookup API burns credits on test data. PostGrid's test keys return mock responses through the exact same workflow — so QA, demos, and training cost nothing.
Without a stored verification status, there is no way to filter or report on which contacts have verified addresses and which need attention — until something breaks downstream and the damage is already done.
What's Inside
Three modules — a shared validation framework, the PostGrid provider adapter, and the Contacts application module — bringing verified, standardized, geocoded addresses to every Odoo Contact record.
Base Address Validation
The provider-agnostic framework. It defines the provider registry, the reusable verification mixin (status fields, automatic reset, verify and apply actions), and the generic Verify Address widget and review dialog shared by every provider. Provider statuses are stored verbatim, while a shared severity (success / warning / danger) drives badges, filters, and the Apply guard.
Why It Exists
Centralising the workflow in one framework means the button, dialog, stored fields, and filters are identical no matter which provider is active — and switching providers is a Settings change, not a data migration.
Address Validation: PostGrid
Registers PostGrid as a provider. All API logic lives in a server-side service model — country-based routing between the US/CA and International APIs, request building, response parsing, and friendly error handling. PostGrid's verdict is stored verbatim: Verified, Corrected, or Failed for US/CA, plus the International API statuses (partially verified, unverified, ambiguous, and more).
Live & Sandbox Keys
Separate live and test API keys with a live-mode toggle in Settings. Test keys return mock data through the exact same workflow — sandbox results are clearly marked in the dialog and chatter, so they can never be mistaken for real verifications.
DPV-Aware Severity
For US addresses, the USPS Delivery Point Validation code refines the severity — an address can be "verified" as a street yet not be an actual USPS delivery point, and the badge color reflects that difference.
Contacts Address Validation
Applies the framework to Contacts. The Contact form gains the Verify Address button and the severity-colored status badge; the Contacts list gains verification filters. Every verification is logged in the chatter — including old → new coordinates when they change — and editing any address field resets the status automatically.
How It Works
The entire flow — from button click to stored verdict — stays inside Odoo. The API key never leaves the server.
- Open a Contact and enter an address. The Verify Address button appears below the address block on the Contact form as soon as the modules are installed and PostGrid is selected as the provider in Settings.
- Click Verify Address. Any pending form edits are saved automatically before the request is sent, ensuring the stored verdict always matches the address that was actually verified.
- Odoo sends a server-side API request. US and Canadian addresses are routed to PostGrid's standard verification API; every other country goes to the International API — automatically, based on the contact's country.
- Review the verification dialog. The dialog opens with a severity banner explaining PostGrid's verbatim status in plain language, a side-by-side comparison of entered vs. standardized address, the USPS DPV confirmation for US addresses, corrections PostGrid made, and delivery details — residential/commercial, vacancy, county. Sandbox results are clearly badged.
- Choose an action. Apply Standardized Address — writes the standardized address and geocoordinates to the contact and stores the verdict. Keep Current Address — stores only the verdict without changing the address. Discard — closes the dialog without writing anything.
- The status badge reflects the stored verdict. PostGrid's own status is shown next to the button with its severity color, and the verification is logged in the chatter. If any address field is later edited, the status resets automatically — stale verdicts never linger after an address change.
Key Features
Domestic and international address verification with USPS DPV confirmation, a sandbox mode for QA, and a stored, searchable audit trail — on a framework that lets you change providers without changing the workflow.
Verification & Dialog
- Verify Address button — One-click verification from the Contact form; pending edits are saved automatically before the request.
- Verbatim PostGrid statuses — Verified, Corrected, Failed, and the International API statuses are stored exactly as PostGrid returns them, with a severity color and plain-language explanation on top.
- Side-by-side address comparison — Entered address vs. PostGrid's standardized address, with corrections listed so the user sees exactly what would change.
- Delivery details — Residential/commercial indicator, vacancy flag, and county shown in the dialog for supported addresses.
- Three dialog actions — Apply Standardized Address, Keep Current Address (verdict only), or Discard (no write).
Coverage & Testing
- US/CA + International — Automatic routing by country between PostGrid's standard and International verification APIs; one provider for the whole contact database.
- USPS DPV confirmation — The Delivery Point Validation code is shown in the dialog, stored on the contact, and refines the severity for US addresses.
- Sandbox mode — Separate live and test keys with a live-mode toggle; test keys return mock data through the same workflow, and sandbox results are clearly marked.
- Standardized address storage — PostGrid's terms permit permanent storage, so the standardized address is kept on the record for reference and label printing.
Framework & Data Quality
- Provider-agnostic framework — Switch to Google or Smarty from Settings later; fields, filters, and the user workflow stay identical.
- Geocoding included — Latitude and longitude from the verification response are written to the contact, with old coordinates logged in the chatter.
- Automatic status reset — Editing street, street2, city, zip, state, or country resets the status — stale verdicts never persist.
- Search filters by outcome — Built-in Contacts filters for verified, needs-review, failed, and not-verified addresses — no custom domain required.
- Secure credentials — API keys are stored in Odoo system parameters and used server-side only; they are never sent to the browser.
Use Cases & Benefits
Verified, Deliverable Addresses
Know before shipping, mailing, or visiting whether an address refers to a real, deliverable place — with USPS delivery-point confirmation for US contacts.
One Provider, Worldwide
US/CA and International APIs behind a single button — the routing happens automatically by country, so global contact databases are covered without per-country setup.
Risk-Free Rollout
Sandbox keys run the full workflow on mock data. Train users, demo to stakeholders, and test integrations without spending a single verification credit.
Standardized Addresses You Can Keep
PostGrid permits permanent storage of its standardized addresses — they stay on the record, ready for mailing labels, exports, and downstream systems.
No Vendor Lock-In
The verification workflow, stored fields, and filters belong to the framework, not to PostGrid. If pricing, coverage, or compliance needs change, switch the provider in Settings — users won't notice a difference.
Audit-Ready Verification Trail
A stored, searchable status on every contact plus a chatter entry for every verification — including coordinate changes — makes data quality auditable without exports or custom reports.
What's in the Bundle
Three modules — the shared framework, the PostGrid provider adapter, and the Contacts application module.
Foundation
-
base_address_validation— Provider registry, verification mixin, generic Verify Address widget and review dialog, provider selection in Settings
Provider Adapter
-
address_validation_postgrid— PostGrid US/CA and International API integration with automatic country routing, USPS DPV confirmation, delivery details, and live/sandbox key management
Application · Contacts
-
contacts_address_validation— Verify Address button on the Contact form, severity badge, search filters by verification outcome, automatic status reset, chatter audit trail