Lead Conversion: Add mail address to existing contact during duplicate check

Hello all,

I have a problem converting a lead into the contacts module. Initial situation: A contact "Peter Test" already exists in the account "Test Inc. This contact, however, does not have a mail address.

Now there is a request from a lead. The name is "Peter Test", he says he works for "Test Inc." and has also entered his e-mail address.

We now want to ensure that the convert process does NOT generate a new contact person, finds the existing contact person, but adds the information about the mail address to the existing contact person.

I have looked at the file under /var/www/html/sugarcrm/custom/modules/Leads/clients/base/layouts/convert-main and suspect that I need to make adjustments regarding the duplicate check, but all tests so far have resulted in crashing the system.

I am happy if you can provide tips on whether and how my plan can be implemented.

Many thanks in advance

Martin