Enable ZIP Code Lookup¶
Overview¶
ZIP Code Lookup fills in the city and state from a US ZIP code, and tells your users whether the combination they have entered is valid. It saves typing on US addresses and catches mismatched city, state and ZIP combinations at the point of entry.
When a user enters a valid ZIP code:
- The state is filled in.
- The city is filled in, or a picklist of valid cities appears where the ZIP code covers more than one.
- A green tick or a red error symbol shows whether the city, state and ZIP code are a valid combination.
The lookup runs as soon as a five-digit ZIP code or a nine-digit ZIP+4 is entered. A Lookup Zip link is also shown beneath the field, so users can run the lookup manually at any point.
Note: This feature is for US addresses only. Five-digit postal codes are not unique to the United States, so the country field needs to say United States, or the user needs a US default country. See QuickComplete Country.
Before You Start¶
ZIP Code Lookup reads the US ZIP code reference data held in your org, so that data has to be installed before the feature will resolve anything.
The ZIP Code object holds that data. It is not installed by default: US ZIP Codes is an optional selection in the data installation, and choosing Only install sample data loads just a subset of its records rather than the full US data set. See Install Country Data for the steps and for what the sample data set leaves out.
Note: US ZIP Code Counties is a separate optional selection. It is needed for county population on an address block, not for ZIP Code Lookup, so you do not have to install it for this feature.
You can install or refresh that data at any time from the Installation tab of AddressTools Administration.
Note: Country records are re-installed on every update, even when you only select the ZIP code objects, which overwrites some of the standardisation and validation settings held on them.
Step 1: Turn ZIP Code Lookup On¶
- Click the App Launcher to search for and select AddressTools Administration.
- Select Settings from the left menu.
- In the Feature Enablement section, click the pencil icon beside Enable ZIP Code Lookup.
- Select the checkbox, then click Save.
Keeping the Data Current¶
US ZIP codes change over time. Re-running the data installation refreshes the ZIP code records, so repeat it periodically to keep lookups accurate. Use Update Data on the Installation tab, with US ZIP Codes selected. Country and State are always included in an update, whatever else you choose, so some of the standardisation and validation settings on your Country records are overwritten each time. See Install Country Data.
Note: ZIP Code Lookup works from installed reference data rather than a live service, so it consumes no verification lookups. To confirm a full address exists rather than just its ZIP code, see Verification.
Where it Appears¶
ZIP Code Lookup is interactive, so it only appears in the AddressTools components. Add at least one of them to the objects where your users enter US addresses:
- Add the AddressTools Component to a Lightning Record Page covers editing an address on an existing record.
- Enable AddressTools Override for New Records covers entering one while creating a record.
Note: The interactive features cannot run on the standard Record Detail component that Salesforce provides in Lightning, so ZIP Code Lookup will not appear on a page that uses it alone.