How to create a Master selection custom rule - Advanced
Create custom formula-based scoring to define complex master record selection rules in Delpha. Learn to sort duplicates based on business logic in Salesforce.
Last updated
Was this helpful?
Was this helpful?
salesforceCopyEditCASE(
Status__c,
"Customer", 10000, /* Rule 1: Always prioritize Customer */
"Prospect", 5000, /* Rule 3: Prospect over Target */
"Target", 1000,
0
) +
IF(
AND(Status__c = "Customer", NOT(ISBLANK(Number_of_Opportunities__c))),
Number_of_Opportunities__c * 10, /* Rule 2: More Opps wins among Customers */
0
) +
IF(
AND(Status__c = "Prospect", Last_Touchpoint_Date__c < TODAY() - 180),
-4000, /* Penalize cold Prospects */
0
) +
(100000000 - CreatedDate) /* Rule 4: Prefer oldest if all else equal */MyDuplicateMasterRecordScore__c DESC, CreatedDate ASC