My Mautic version is: 4
My PHP version is: 7.4
My Database type and version is: MySQL 8
What’s the correct way to import contact data for addresses in the US?
We have 70k contacts that we’ve been importing over the past 2 years. When we import, we use the following:
Contact State = “IN” or “AZ” in the CSV file (most of our contacts are in these two states)
When we look at contacts, the locations seem correct “Phoenix, AZ” “Indianapolis, IN” etc.
When we tried to use this field in a campaign, it doesn’t work. Then we’ve discovered that when you edit the contact, there is nothing in the State field, but if you go to the list, it’s there.
I’ve experienced this pretty regularly. It’s a data QC issue at its root. The import function will allow a abbreviated state in the import but the actual states in Mautic parameters are not abbreviated. I tried adding abbreviated states to the `\app\bundles\CoreBundle\Assets\json\regions.json file to make them selectable in other Mautic functions but found it created issues elsewhere. My solution was to change the abbreviated states in my CSV files before uploading them again thus updating my contacts. In your case maybe build a report that has email and existing state, replace abbreviated states and then reupload. If you have email as a unique identifier you will not duplicate your contacts.
I wondered why the import wouldn’t reject the state data. I guess I’ll need to export, clean up and import to fix existing data plus do additional cleanup before I import more.