Page MenuHomePhabricator

Direct Mail imports - state missing from address
Closed, ResolvedPublic

Description

It seems that the Direct Mail imports have not been importing the state information of the addresses. I did a search and see that there are quite a few. I checked the mapping and the data in the files and it seems to be matched up correctly. Can you help us figure out what might be happening? Also how can we fix the records with not state? Thank you!

Searchkit: https://civicrm.wikimedia.org/civicrm/admin/search#/edit/3939

Event Timeline

@Eileenmcnaughton I'm seeing in the data file that the country field is empty - could this cause the state to not populate? However it does show the country data 'United States' in Civi. I will follow up with Engage to make sure that data is included in the file moving forward.

Ok, I think what happened is I had set the country field up to default to 'United States' in the mapping, but it didn't save for some reason. I will remap this week.

Hi @MDemosWMF - in your last comment you mentioned attempting remapping again w/o Dec 16 to see if trying again to set default country field to US would resolve the error.

Please let us know if you re-attempted this yet, and if you are seeing the same issue persist of states not populating. Thanks!

@AKanji-WMF Just tested with updated mapping and looks good! We should be back on track moving forward. Just need assistance with cleaning up the incomplete addresses in Civi (search kit results). Thanks!

Thanks @MDemosWMF. @Eileenmcnaughton to fix these 1116 records I presume we'd need the original import file too?

If there is a way we can fix these without the files that would make things easier. These gifts aren't from one file, they go back to October. They do have all of the other address data - I wonder if there is a way to auto add the state back in using the zip code in Civi?

@MDemosWMF I created a SearchKit of US addresses with a postal code & no state https://civicrm.wikimedia.org/civicrm/admin/search#/edit/4089 and updated the country to 'United States' from that screen - which caused the geocoding to 'try again'

There were a handful it couldn't fix & these mostly fell into

  • wrong postal code entered
  • right postal code entered, but postal code is missing in our database of postal codes

We got our db of postal codes a number of years ago so it is possible that some have just changed in the meantime & we need an update on the database

I fixed all of your ones but it's probably worth sourcing more up-to-date postal codes and updating our database

For each postal code we have
-postal_code

  • city
  • state_code
  • lattitude
  • longitude
  • timezone
  • dst

I can't recall where we got the data set from - I think @CaCogdill-WMF sourced it

I was in conversation with Nora about a larger piece of work on address clean up & standardisation although not sure if that is still going to happen with the loss of Nora

Ooh, that's a long reach back into my memory! We did very few data appends back in my day; the big one was Target Smart data in 2019 (I think I have the year right), which may have included zip code.

Thanks @Eileenmcnaughton ! Yes, I know you were talking to Nora about that - tagging @IAckerman-WMF since that may be something that would fall to her new hire once they are on board.

I've opened a follow on task for the geodata & am pushing this to done

XenoRyet set Final Story Points to 4.