Flow Action - Find Duplicates By ID

Last published at: 2023-03-27 07:53:12 UTC

The Flow Action feature is available in the Premium Edition.


Due to Salesforce Governor Limits this Flow Action can only be used for processing single records. If multiple records are provided the flow will fail. 


The "Find duplicate by ID" flow action lets you search for duplicate records based on a given record ID. If duplicates are found, search results are returned that can be used in other DC flow actions.

Step 1 Apply a scenario to use in the Flow Action

Duplicate Check uses the applied scenario to decide how to compare records in a flow action. 

  1. Navigate to the DC Setup
  2. Open the Object you want to work with in a Lightning Flow. 
  3. At the scenario tab, decide which scenario you want to use and apply to scenario to "Flow" at "Apply To".
    By applying multiple scenarios to the same feature, Duplicate Check will return potential duplicates records via the OR method. Learn more about scenarios.

Step 2 Use the Find Duplicate by ID flow action

  1. Open the Lightning Flow Builder. 
  2. From the Elements section, drag a new Action to the screen from the Toolbox on the left side.
  3. In the New Action dialog, search for Find Duplicates by ID.
  4. At "Label", define a name for your action. If the API name is not set automatically, make sure an API name is defined as well.
  5.  At "Set Input Values", make sure to define a Record ID. The given record ID is the ID the duplicate seach is executed for.
    The input can be a specific Record ID, but can also come from a variable.
  6.   At "Search Cross Object", decide if you want to search for duplicates across multiple objects. If so, make sure to toggle the button to "Include" cross object. As a value, insert the Global Constant set to true.
    Please note that to search for duplicates across multiple objects, the "Cross Object" feature has to be enabled and configured.
     If you want to search for duplicates in the same object only, make sure not to include "Cross Object". 

Step 3 Connect your action to the Start trigger

Make sure the "Find Duplicates by ID" is connected to the start trigger. 

Step 4 Run the flow

Run the flow by clicking "Run".

Duplicate By ID action results

After executing the flow, the Find Duplicates by ID returns the following parameters that can be used in other flow actions. 

A boolean that returns "True" (duplicates are found) or "False" (no duplicates found).
Record ID
The record ID of the duplicate record with the highest matching score.
Matching Score
The matching score of the highest scoring duplicate.
Total Duplicates
The number of total duplicates found.
Duplicate Result
An Object containing all the Search Results of this action that you can use as a parameter for other DC flow actions such as Quick Merge, Quick Convert, or Store Results in Job.

Gather the duplicate IDs in a list

To collect the record IDs of the found duplicates in a list, add the 'DC - Get Duplicates IDs from Flow Output'‍ flow action after this flow action.