I'm working on a project at the moment and the client requires the import/export of customer records to/from their CRM. I've imported a fair few successfully however I've found something else that I might need help with.

The client said that they regularly change the email address assigned to customer records, so we will need to import those changes, however as far as I know, the only unique identifier for customer imports is the email address (there's no 'customer_id' or 'entity_id' columns present in the customer main file CSV export). As such, if the client were to change an email address and we imported an updated customer list, new customer will be created instead of updating the email address of existing ones.

Is there anything that I could use to overcome this issue? If we could import by the Customer ID, that would solve all issues, but as far as I'm aware, core Magento doesn't allow this?

Many thanks, Joe

1 Answer 1


Not without a serious rewrite to the framework.

I faced a similar situation (although in my case several accounts had same email) and after hours of experimenting I ended up creating a second transactional email attribute for customer entity and generated the original email (with id in it) and hide original email from admin and grids. Then changed email logic and login logic to send to and login via transactional email and username. Sounds awful but this change in m2 isn't too bad because of plugins.

But in a nutshell can load by ID and change transactional email.

I think in your case though have a new custom ID on customer level separate to entity ID and load customer by this custom ID. Then change email as required. That should work. Custom ID would need to be factored in import export.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.