I discovered that with the BAT tool v5.1 or something and later, there is an option to do an import/export from a CSV file. I just had to download the plug-in and reinstall it from the recently upgraded 4.12 cluster. Not available with 4.0 as client/matter codes were not supported on this version.
Still looking for a way to automate this but at least I don't have to manually enter 3000 client/matter codes.