Salesforce merge() SOAP API, allow to combine up to three records of the same type into one record. You explicitly tell Salesforce which record is the master/survivor and which record(s) are merged into it. Salesforce does not automatically decide that the newer or older record survives.
Let say you have Lead A, B, and C; you decide keep lead A as the master record (survivor) and merge lead B and C (victims) into lead A.
- Keeps Lead A as the master record.
- Merges Lead B/C into Lead A.
- Deletes B/C as the "victim" records.
- Reparents related records from the victims to Lead A where applicable
- Sets MasterRecordId on the deleted victim records so you can identify what they were merged into.
- Lead history of victim leads will not be carried to the survived lead, so the lead history stay as per original
- Lead history have a new line of "Lead Merged" with original value of the victim lead name and company name
- Created By and Created Date is updated with the oldest victim lead
- All the related records (Task, Campaign Member, Messaging Session, etc.) from victim leads will be reparent to the survived lead
- The prospect will be merged too and link to the survived lead
- In the prospect audit, notice a line "Started matching Marketing Data Sharing criteria"
- Created date in the survive prospect will stay as per original date, however, the conversion date and other date such as Recent Interaction will be copy from oldest victim
- Prospect audit will have data from victim leads, including the old prospect activities




