Yes. DataGroomr offers multiple options for leveraging related-object data in matching and merge rules to help selecting master record.


Scenario 1. Related object is a one-to-one relationship

For example, if we deduplicate accounts and want to make sure that the master record is an account that has an active owner then we can use the following master record rule


image 


Scenario 2. Related objects are one-to-many relationship

In one-to-many relationship scenarios, a Cross-Object Dataset can be configured by selecting the Parent and Child objects and applying the appropriate filters under the dataset configuration.

 

Example 1: Accounts with Active Contracts

Create a Cross-Object Dataset with:

  • Parent Object: Account
  • Child Object: Contract


Apply the following filters under the Filter tab.


Parent Filters

Accounts with Active Contracts:

Id IN (SELECT AccountId FROM Contract WHERE Status = 'Active')


Child Filters

Accounts without Active Contracts:

Id NOT IN (SELECT AccountId FROM Contract WHERE Status = 'Active')


The duplicate groups created in the Cross-object dataset will ensure that the master record is selected from the Parent side.


Final Outcomes: 

  • Accounts with Active Contracts become the master records.
  • Accounts without Active Contracts are merged into them.
  • The merge proceeds without Salesforce errors.


Note: The following example helps resolve "When merging portal enabled accounts, the master record must be portal enabled." Salesforce error.


Example 2: Selecting a Portal-Enabled Contact as Master Record

Create a Cross-Object Dataset with:

  • Parent Object: Contact
  • Child Object: User


Apply the following filters:


Parent Filters

Portal-enabled Contacts:

Id IN (SELECT ContactId from User WHERE IsActive = True AND IsPortalEnabled = True)
Child Filters
Other Contacts
Id NOT IN (SELECT ContactId from User WHERE IsActive = True AND IsPortalEnabled = True)

The duplicate groups in the Cross-object dataset will have master records with portal users and the merge should go through.


Final Outcomes:

  • Select records with active Portal Users as master records
  • Merge other records into them
  • Prevent Salesforce portal-related merge errors