Skip to main content

SLAM_merge

Merges Salesforce records using the SOAP API merge operation. The victim records are deleted and their data is merged into the winner record.

Parameters:

NameTypeDefaultDescription
@sObjectNVARCHARRequiredSalesforce object type (typically 'Account', 'Contact', or 'Lead')
@winner_idNVARCHARRequiredSalesforce ID of the record to keep (master record)
@victim_id1NVARCHARRequiredSalesforce ID of the first record to merge into winner
@victim_id2NVARCHARNULLSalesforce ID of the second record to merge into winner
@portal_idNVARCHARNULLPortal ID for account merges involving portal users

Usage Examples:

Merge two Account records:

EXEC dbo.SLAM_merge
@sObject = 'Account',
@winner_id = '0011234567890ABCAA',
@victim_id1 = '0011234567890DEFAA'

Merge three Account records:

EXEC dbo.SLAM_merge
@sObject = 'Account',
@winner_id = '0011234567890ABCAA',
@victim_id1 = '0011234567890DEFAA',
@victim_id2 = '0011234567890GHIAA'

Merge Contact records:

EXEC dbo.SLAM_merge
@sObject = 'Contact',
@winner_id = '0031234567890ABCAA',
@victim_id1 = '0031234567890DEFAA'