This method allows retrieving the result of merging a group of identified duplicates. For example, when a group has been identified but not immediately merged, the data of the records within the group may have been modified afterward. In this case, if you want to apply a merge, it is recommended to recalculate the result using this method.
This Apex class is designed solely to calculate the result of the merge, without including any reparenting operations.
Request
Namespace : dqeone
Apex Controller : DQE_Fusion_RestApi
Method : getMergeResult
Parameters :
- ProcessId (String) : Put '' because it is deprecated
- GroupNum (String) : Put '' because it is deprecated
- GroupId (String) : Index Group Id (valeur du champs « DQE_Index_Group_ID__c »). Mandatory
- SObjectName (String): Object type (PersonAccount, Account, Lead...). Mandatory
- RulesSetId (String) : Provide the ID of the rules set that will be used to calculate the merged parent data (retrievable from the JSON exported from the Rules Manager). Mandatory
Response
{
"error": "",
"record": "{
"Phone": "0695473336",
"City": "AMPONVILLE",
"FirstName": "Aurelei",
"MobilePhone": "",
"State": "",
"PostalCode": "77961",
"LastName": "FAULKNER",
"Country": "France",
"Email": "airelue.fc@laposte.net",
"Street": "Rue du Clos Gillet",
"Id": "00Q0900000E37F3EAJ",
"Source": "Lead"
}"
}
Signature: global static String getMergeResult(String, processId, String groupNum, String GroupId ,String SObjectName, String RulesSetId)
Example
Map<String, Object> merge = (Map<String, Object>)JSON.deserializeUntyped(dqeone.DQE_Fusion_RestApi.getMergeResult('', '', '00Q0900000FP9LKEA1_a000900000UCuQMAA1', 'PersonAccount','b5164591-b7d4-487c-82dc-a10580ec13f8'));