SLAM_merge
Overview
Merges Salesforce records using the SOAP API merge operation. The victim records are deleted and their data is merged into the winner record. The merge operation uses the Salesforce merge() API and is subject to it's limitations. For example, a merge will fail if AccountContactRelationship Salesforce object is in use and the merge would result in two or more AccountContactRelationship records from the winner Contact to the same Account. The AccountContactRelationship data would have to be cleaned up first.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
@sObject | NVARCHAR | Required | Salesforce object type (typically 'Account', 'Contact', or 'Lead') |
@winner_id | NVARCHAR | Required | Salesforce ID of the record to keep (master record) |
@victim_id1 | NVARCHAR | Required | Salesforce ID of the first record to merge into winner |
@victim_id2 | NVARCHAR | NULL | Salesforce ID of the second record to merge into winner |
@portal_id | NVARCHAR | NULL | Portal 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';