How do I dedupe contacts that are Community Users (ie: are tied to users that log into an Experience Cloud page)?

Due to Salesforce's design, once the relationship between the Contact and Community User record is established, it cannot be reassigned to a different Contact. If a Contact connected to a Community User account is deleted, the User will likely experience login issues. When this occurs, the user account (and connection to the contact) needs to be recreated, ie: that person has to go to your Experience Cloud page again and set up a new password, etc.

The best practice for deduplicating Contacts that may have an associated Community User record is to make sure the Master record (ie: the record that remains after the dedupe operation) is the one connected to the Community User account. One way to identify Contacts connected to a Community User account is to create a custom Contact field and populate it to indicate that the Contact is also a Community User. You can consider using a rollup tool to accomplish this, or this article explains a way to do this.

The reason this is necessary is that you will use a filter in the "Group Selection" step of your dedupe to make sure that at least one record in the dedupe group is a Community User. And then in the "Master Rules" section you'll give points to the Contact that is the Community User. This will help the system choose the right Contact as the Master. But since the "Group Selection" only has access to Contact fields, you need a field to represent that they are a Community User, and the aforementioned article will help with this.

In general (outside of dedupe) you can filter for Community Users in a simpler manner: Since the relationship is from User (child) to Contact (parent) one way to confirm if a Contact has a related Community User record is to include a quantified filter on the child User object from the Contact object. See the screenshot for an example. This filter will limit to contacts that have a child user record that 'exists'. This filter can be used in the "Group Selection"step, while setting up your Dedupe. This step allows you to say "at least one of the records in a dedupe pair should be a community user"

image.png

If more than one potential duplicate contact is connected to a user account, some other method to identify the correct contact/user will be needed (most recent login, last updated, etc.).

For more information about Community Users as they pertain to a merge button on an Experience Cloud page, see this article.