DupeBlocker will work with Person Accounts EXCEPT for the Auto-Convert feature.
Additional configuration steps are required for DupeBlocker to function correctly with Person Accounts. DupeBlocker Scenarios will also require additional customization to correctly identify duplicates using DupeBlocker Filters. Duplicates CANNOT be detected between Business Accounts and Person Accounts. Separate scenarios will need to be configured to JUST identify dupes within one or the other.
When using Auto-Merge for Match on Insert Action in a scenario, the Auto-Merge Settings will also need to be customized to correctly merge the records.
Additional Configuration Steps
Since Person Accounts combine fields from both Contacts and Accounts, additional installation steps are required to configure DupeBlocker to return the appropriate fields from Salesforce when detecting duplicates.
New Custom Fields
Two formula fields need to be added to properly display the name of the Person Accounts being linked to the Potential Duplicates object.
To do this go to Setup -> Create -> Objects -> DupeBlocker Potential Duplicate -> Custom Fields and Relationships. Click "New" and add the following 2 formula fields (PA_Object_Type MUST be added BEFORE PA_Duplicate_Record). Change the Field Label to match the existing Field Labels "Duplicate Record" and "Object Type" but make the Field Names "PA_Duplicate_Record" and "PA_Object_Type".
Formula Text for PA_Object_Type:
IF( AND( NOT( ISNULL( CRMfusionDBR101__Account__c ) ), CRMfusionDBR101__Account__c <> '' ), IF( CRMfusionDBR101__Account__r.IsPersonAccount, 'Person Account', 'Account' ), IF( AND( NOT( ISNULL( CRMfusionDBR101__Contact__c ) ), CRMfusionDBR101__Contact__c <> '' ), 'Contact', IF( AND( NOT( ISNULL( CRMfusionDBR101__Lead__c ) ), CRMfusionDBR101__Lead__c <> '' ), 'Lead', '' ) ) )
Formula Text for PA_Duplicate_Record:
CASE( PA_Object_Type__c, 'Account', HYPERLINK( '/' & CRMfusionDBR101__Account__c, CRMfusionDBR101__Account__r.Name, '_self' ), 'Contact', CRMfusionDBR101__Contact_Display_Field__c , 'Lead', CRMfusionDBR101__Lead_Display_Field__c, 'Person Account', HYPERLINK( '/' & CRMfusionDBR101__Account__c, TRIM( CRMfusionDBR101__Account__r.FirstName + ' ' + CRMfusionDBR101__Account__r.LastName ), '_self' ), '' )
Select the defaults for visibility and replace the existing fields in the page layout with the new fields.
Updating Related List Properties for DupeBlocker Potential Duplicates on the DupeBlocker Duplicate Warning Object
Now that the fields have been added to the DupeBlocker Potential Duplicates Object the related list properties will need to be updated on the DupeBlocker Warning Object so the new fields are visible when displaying the duplicate records identified by the Warning.
To do this go to Setup -> Create -> Objects -> DupeBlocker Warning Object -> Page Layouts. Click "Edit" and "Related Lists" and click the tool icon for the DupeBlocker Potential Duplicates Related List. Select "Duplicate_Record" and "Object_Type" from "Available Fields" on the left and click "Add" to add to "Selected Fields". Select the original "Duplicate Record" and "Object Type" fields on the right (just below "Duplicate Number"), and click "Remove" to put back under "Available Fields".
Now move the 2 new fields "Up" such that Object Type is just below Duplicate Number and Duplicate Record is after Object Type.
Update Person Accounts Page Layout
Person Accounts page layout will need to be updated to show the "DupeBlocker Potential Duplicates" related list. The related list properties should also be updated to show the Duplicate Warning and Scenario that triggered the duplicate.
More information on how to do this can be found in Initial Configuration.
Creating Person Account Scenarios
When Person Accounts are enabled in an organization, Account and Lead to Account scenarios should be created separately for Business Accounts vs. Person Accounts.
Scenarios contain a Person Account Scenario checkbox field which will indicate if the scenario should trigger for Person or Business Accounts.
- Checked
- Person to Person Account
- Lead to Person Account
- Unchecked
- Business to Business Account
- Lead to Business Account
Additionally when creating Lead to Account scenarios, a DupeBlocker Filter also needs to added where Company Name on the Lead equals null ("Person" Lead) or is not null ("Business" Lead).
Ensure ONLY fields that pertain to Person Accounts are used in the Scenario Rules when creating a Person Account scenario. When attempting the match on an Account Name using Person Accounts, the Scenario Rules will need to use the "First Name" and/or "Last Name" fields. Using the "Account Name" field will result in the following error:
DupeBlocker has encountered an error. Please contact your Salesforce administrator with the following information:
*** Current User: DB User (dbuser@xyz.com)
*** Org Info: XYZ Inc. (00D80000000ZjKYEA0)
*** Trigger.new size: 1
*** Trigger.old size: 1
*** isMerge value: false
*** Exception Type: System.SObjectException
*** Exception Cause: null
*** Exception Message: Invalid field name for Account
Triggering record Ids: 001C0000014KEpiIAG
Contact scenarios CANNOT be used to identify Person Account duplicates. However, if your Salesforce instance contains both Person Accounts and Business Accounts (that can have standard Contacts associated with them) Contact and Lead to Contact scenarios can be created and filters ARE NOT REQUIRED, as by default these will only trigger for standard Contacts.
More information on creating Scenarios (including creating Filters) can be found in HERE.
Example of a Person Account Scenario
Example of a Person Account Warning
Note: A "Business Account" would be listed with "Object Type" of Account.
Example of a Lead to Person Account Scenario
Example of a Lead to Person Account Warning
Auto-Merging Person Accounts
Person Accounts scenarios can be configured to auto-merge duplicates, however, the Auto-Merge Settings will need to be customized.
- The Default Mergeable and Non-Mergeable field actions must be changed from their defaults of Merge and Update if Blank to Ignore
- The Default Include in Task Value must be changed from checked to unchecked
- Each Person Account field that should be affected (merged, overwritten, updated if blank) in the merge will need to be manually mapped using the Add New Merge Mapping Option
- ONLY Person Account fields should be included in the Mapping
- DO NOT INCLUDE Account Name in the mapping, First Name and Last Name will be used to determine the Account Name field. Including the Account Name in the mapping will result in the following error:
DupeBlocker has encountered an error. Please contact your Salesforce administrator with the following information:
*** Current User: DB User (dbuser@xyz.com)
*** Org Info: XYZ Inc. (00D80000000ZjKYEA0)
*** Executing Method: DB_AutoMerge.asyncMerge
*** Exception Type: System.DmlException
*** Exception Cause: null
*** Exception Message: Merge failed. First exception on row 0 with id 001C0000014KEpiIAG; first error: INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: Name: [Name]
*** Merge ID: 001C0000017S6xsIAC
*** Master ID: 001C0000014KEpiIAG
*** Scenario ID: a0AC000000dC2PEMA0
*** DML Row-level Errors:
DML Status Code: INVALID_FIELD_FOR_INSERT_UPDATE Original DML Row Index: 0 DML Fields: common.apex.runtime.impl.ApexFieldToken@45c39ce3
DML Error Message: Account: bad field names on insert/update call: Name
- Include in Task can be checked for mapped fields
- As fields are added/deleted from the Account object that pertain to Person Accounts, the related auto-merge field mapping will need to be updated accordingly
More information on Auto-Merge can be found HERE.
Auto-Converting Person Accounts
Lead to Person Account Scenarios CANNOT utilize the auto-convert feature at this time.