TransWikia.com

How to update customer information directly in the database

Magento Asked by Darrell Brogdon on October 2, 2021

I have several customers that I need to change a field in. In my case, the account manager email address. I’m trying to determine the best way to approach this. I have enough that I don’t want to have to go through the UI to do it as that would be time prohibitive. It seems like making the changes directly in the database would be easiest but I can’t figure out which table contains that information.

What is the best way to go about doing this? If it is directly in the database, which table contains that data?

I’m using Magento Commerce v2.3.5

One Answer

Changing data in the database directly has several inherent problems: it may leave orphans especially if you're only starting with Magento, it is prone to errors and it is not reusable.

For your customer problem, it may be quite simple fortunately, you may want to look in the backend System/Import and use the type 'customer main file' like the screenshot below

enter image description here

for general purpose of batching a change, I would recommend scripting, it is quite reasonably straight forward to write commands in Magento 2:

for instance, feel free to take a look at: https://bitbucket.org/magstaging/simpledescription/src/master/Command/ReadSimpleProductDescription.php which is a basic example on writing a command

Correct answer by Herve Tribouilloy on October 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP