Assign customer number (naming_series) to preexisting customers

Hello all,

I’m a newbie and just got a recent ERPNext installation based on the VM up and running.
My client has been filling the customer database manually the last couple of days. They needed unique customer numbers and I found how to enable it using the selling options. New customers get numbers assigned but the existing ones still don’t have one.

Is there a smart way of assigning numbers to every customer apart from manually editing every single one?
I was thinking about exporting all customers in a .csv, add the numbers and then upload it again. Would this merge with the existing entries or would I end up with duplicates?

Thanks in advance!

Rgds,
Simon

Hello Simon,

To reset existing Customer ID, you can use Bulk Renaming Tool.

https://frappe.github.io/erpnext/user/manual/en/setting-up/data/bulk-rename

For the naming options for Customer, check Selling Settings.

https://frappe.github.io/erpnext/user/manual/en/selling/setup/selling-settings

Hi Umair,

I followed that KB entry to the Bulk Renaming Tool yesterday and that is the reason I thought about exporting and then import the whole customer database during a system freeze.

Let’s assume I’d do this and upload the new .csv with cutomer numbers instead of names, would I end up with duplicates or does the import overwrite existing customers?

Thanks,
Simon

I followed that KB entry to the Bulk Renaming Tool yesterday and that is
the reason I thought about exporting and then import the whole customer database during a system freeze.

Were you using data import tool? For bulk renaming tool, data is imported from that tool itself.

Let’s assume I’d do this and upload the new .csv with cutomer numbers
instead of names, would I end up with duplicates or does the import
overwrite existing customers?

If customer with same code already existing, then new customer won’t be imported successfully.

I was referring to the Bulk Renaming Tool upload function. I guess first I need to export my current customer database to a .csv and on that basis edit the lines, add the cutomer number and upload it to the renaming tool. In case I misunderstood the way the tool works, please let me know :slight_smile:

So does that mean I need to wipe the customer databse before I can upload new stuff? My goal is to add an additional value (customer number) to existing data in one bulk change. Is the renaming tool the right choice for this then?

I think you have to write your own patch to update db values.
check erpnext/erpnext/patches/ to get an idea