HI Sandrine, Using the upsert operation, you can either insert or update an existing record in one call. To determine whether a record already exists, the upsert statement or Database method uses the record’s ID as the key to match records, a custom external ID field, or a standard field with the idLookup attribute set to true.
Using the upsert operation, you can either insert or update an existing record in one call. To determine whether a record already exists, the upsert statement or Database method uses the record’s ID as the key to match records, a custom external ID field, or a standard field with the idLookup attribute set to true.
Ref
Related: https://salesforce.stackexchange.com/questions/78356/how-can-i-upsert-using-the-company-standard-field-as-identifier
If this information helps, please mark the answer as best. Thank you