LogoLogo
  • Delpha Documentation
    • Welcome to Delpha Documentation
    • Delpha Setup
      • Install Delpha
        • Install Delpha package from the Salesforce App Exchange
        • Activate Delpha
        • Assign a Delpha Permission Set Group
        • Assign a Delpha licence to the users
        • Connect the org to Delpha
      • Import Conversations
      • Extra Tasks
        • Check my org settings
        • Install Delpha Connector for LinkedIn Enrichment
    • Delpha Upgrade
    • Delpha Apps
      • Delpha Setup
        • Delpha configuration
          • First Steps
          • Token Usage
          • Data Quality - Account
          • Data Quality - Contact
          • Duplicates
          • Job Tracker
          • Default Values
        • Conversations
        • Conversation Builder
          • High-level overview of the conversation builder
      • Delpha Data Quality
        • Data Quality Steward view
        • Duplicate Data Steward view
      • Delpha Score Meter
    • Use Cases Setup
      • Duplicate
        • Setup
          • Initialize the default settings
          • Activate Auto Merge
        • Duplicate detection
          • Properties section
          • Fields section
        • Run your first duplicate detection
        • Duplicate remediation
          • Merge Object Rules section
            • Master Record Selection
            • Custom rule for Master Record selection
            • Default rules for field selection
          • Merge Field Rules section
      • Data Quality
  • Delpha Campaigns
    • Create a Delpha Campaign
    • Configure a Delpha Campaign
      • Select the Campaign Type
        • Lead Generation
        • Job Tracking
        • Account Generation
      • Review and update the Settings
      • Add Campaign Members
  • HOW TO - FAQ
    • Quick Start Guide
    • Delpha Integration
      • How to add Delpha components in my standard layout
      • How can I add Delpha fields in my standard layout
      • How to manage conversation priority
      • How to manage the conversation auto opening
    • Delpha Job Tracking
      • How to display the Job History
      • How does job tracking works
    • Delpha LinkedIn Connector
      • How can I connect my LinkedIn Account to Delpha
      • I am not allowed to install Delpha Connector on my browser
      • How many records can be enriched with LinkedIn in a day per user?
      • How can I check if a LinkedIn cookie is properly set or valid
      • How is used my LinkedIn Cookie
      • How can I automate my lead generation
    • Delpha Duplicate
      • What is a Filtering Rule and how to use it
      • What is the Expression and how to use it
      • How to exclude records from the analysis
      • How to make Duplicate Records exclusion dynamic
      • How to Fix Duplicates in Salesforce with Delpha – Automatic, Bulk & Manual Options
      • How to modify the detection threshold
      • How to modify the auto process threshold
      • What algorithms are used by Delpha
      • How does the Duplicate scoring work
      • How to define a Golden Record for Duplicate
      • How do you differentiate Do Not Compare & Is Golden Record
      • How to sync Salesforce & Hubspot to deduplicate records
      • Duplicate detection - When does it happen?
      • How to set the frequency of the Auto Merge
      • How to create a Master selection custom rule
      • How to create a Master selection custom rule - Advanced
      • What are the duplicate status?
      • How to Merge 2 leads with different currencies
      • What is a Duplicate credit?
      • Do I consume a credit when merging a pair?
      • What is field grouping?
      • How can I hide a field from the Delpha Bot conversation?
      • How can I keep both values of a field after the merge
      • Some duplicate are not detected, what can I do?
      • Can I ignore some field values when detecting duplicates?
      • What data is available for Duplicate?
      • How can I create custom reports on Duplicate
    • Delpha Data quality
      • What are the 6 data quality dimensions
      • How to exclude records from the analysis
      • How to fix my data quality
      • What is a Token?
      • Do I consume a token when applying a Delpha recommendation?
      • Data Quality for Contacts
        • What are Data Quality Dimensions for Email
        • What are the Data Quality fields for Email
  • Delpha Campaigns
    • How to add records to a campaign from reports?
  • TROUBLESHOOT
    • Grant access for Delpha Support
Powered by GitBook
On this page
  • How Master Record Selection Works in Delpha
  • Sorting Options
  • Examples
  • Example 1: Based on a numeric custom field
  • Example 2: Based on checkbox field
  • Fallback Mechanism
  • Summary Table

Was this helpful?

Export as PDF
  1. HOW TO - FAQ
  2. Delpha Duplicate

How to create a Master selection custom rule

Learn how Delpha determines the Master Record during deduplication using sorting rules, fallback strategies, and supported field types.

How Master Record Selection Works in Delpha

When merging duplicate records, Delpha determines the Master Record using a defined sorting rule. The selected master record is the one from which field values are retained during the merge, unless overridden.

This article explains how to configure the Master Record selection rule, including available sorting options, supported field types, and fallback mechanisms.

Sorting Options

You can define how records in a duplicate pair are sorted using the following syntax in your Delpha Duplicate Settings:

➕ ASC or DESC

  • ASC (default): Sorts in ascending order.

  • DESC: Sorts in descending order.

➕ NULLS FIRST or NULLS LAST

  • NULLS FIRST: Prioritizes records with null values.

  • NULLS LAST (default): Prioritizes records with filled values.

Sorting and Data Types

  • Picklists: Sorted using the picklist order defined in Salesforce Setup.

  • Phone Fields: Sorted alphanumerically, ignoring formatting characters (dashes, parentheses).

  • Currency Fields: Sorted using the corporate currency value.

⚠️ Not supported fields: Multi-select picklists, Rich text areas, Long text areas, and Encrypted fields (if enabled).

Examples

Example 1: Based on a numeric custom field

NBOfB2COpportunities__c DESC

Select the record with the highest number of B2C opportunities.

Example 2: Based on checkbox field

IsActive DESC

Select the record that is active (True = 1, False = 0).


Fallback Mechanism

Always define fallback rules to handle tie-breaker scenarios.

Use a comma-separated list to define sorting order:

NBOfB2COpportunities__c DESC, IsActive DESC, CreatedDate ASC

Explanation:

  1. Select the record with the most B2C opportunities.

  2. If tied, choose the one marked active.

  3. If still tied, select the one with the oldest creation date.


Summary Table

Sort Type
Use Case

ASC

Lowest value first

DESC

Highest value first

NULLS FIRST

Prioritize records missing a value

NULLS LAST

Default — prioritize filled values

,

Use to create fallback rule chains

PreviousHow to set the frequency of the Auto MergeNextHow to create a Master selection custom rule - Advanced

Last updated 1 day ago

Was this helpful?

Reference:

Salesforce SOQL ORDER BY