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.

How to Use a Custom Formula for Complex Master Record Selection

In some cases, selecting a master record based on a simple value comparison (like highest number or checkbox = true) isn’t enough. When your business logic is more advanced, the best approach is to create a custom formula field that scores each record based on multiple conditions.

This score is then used to sort the duplicate pair and select the master record.

When to Use a Formula-Based Master Rule

Use a formula when:

  • You need to prioritize based on a combination of picklists, metrics, and dates

  • You want to handle tie-breaker logic across several layers

  • Your logic changes based on status, recency, or business value

Step-by-Step Setup

1. Create a Custom Formula Field

  • Object: Account, Contact, or Lead (where duplicates occur)

  • Field Type: Formula

  • Return Type: Number

  • Example API Name: MyDuplicateMasterRecordScore__c

2. Add Your Logic in the Formula Field

Here’s a complete example based on business rules:

This formula returns a numeric score. The record with the highest score becomes the master during the merge.

3. Use It in Delpha Duplicate Settings

In Delpha Setup → Duplicate Settings, set the Master Rule to:

What This Covers

  • Rule 1: Always select Customer as master

  • Rule 2: Among Customers, prioritize by # of Opportunities

  • Rule 3: Prefer Prospect over Target, unless the Prospect is outdated

  • Rule 4: Use Created Date as fallback

Last updated

Was this helpful?