Zip/Postal Code Lookup for auto populating City/State/Country | Community
Skip to main content
Level 3
March 20, 2020
Question

Zip/Postal Code Lookup for auto populating City/State/Country

  • March 20, 2020
  • 2 replies
  • 5328 views

Looking to get ideas on what others do or use third-party to populate city, state, and country based on postal/zip code entered on web forms.

2 replies

Level 4
March 20, 2020

Hi @Gunpreet_Kaur1,

 

This is actually something I've helped implement at two separate companies now.  Because some countries use similar zip codes, you will still need to ask for country on your forms, but once you have that, you can create separate smart campaigns to populate the state.  I think there are also vendors like Openprise that do this as well, but you can easily build this yourself within Marketo.  Here is a good site to use when breaking out zip codes by state: https://www.unitedstateszipcodes.org/ca/ 

 

For city, this will be difficult if you don't ask for zip+4 because many cities share the same zip code. 

 

Example Smart Campaign: 

 

-Kyle

 

Level 3
March 20, 2020

Thank you for the suggest!

SanfordWhiteman
Level 10
March 20, 2020

Easier to do using a webhook than Smart Lists due to the sheer number of international options.

 

Google Places lookup can be called from a webhook: https://developers.google.com/places/web-service/search

 

If you're really adventurous, this blog post shows how to use a static file to enrich from Zips to States: https://nation.marketo.com/t5/Product-Blogs/Extremely-Strange-Webhooks-Vol-1-HTTP-Range-Queries/bc-p/242258. Not incredibly easy to set up the file, but once it's done, it can actually be called from the form too (which is much better for saving server resources).