Flow Action - Find Master Record by Search Output

Last published at: March 24th, 2023
Delete

DC Flow Actions are available in the Premium Edition.


The "DC - Find Master Record By DC Search Action Output" flow action lets you determine what would be the master record out of a set of duplicate records that were found with a DC Search flow action. The master record is resolved based on the DC merge rules, and the master record ID is returned. 

Note that the duplicates are not actually merged with this flow action. The flow action only determines what would be the master record if these duplicate records were to be merged. Use this flow action for example to mark the master record as Master, without having to delete the loser records.

The duplicate records are first searched for by a Find Duplicates flow action earlier in the flow. The duplicates found by that flow action can then be used as input for this flow action to determine the master record of these duplicates.

1. Make sure Merge Rules are set up

Duplicate Check uses the merge rules as set for the object in question to decide upon the master record in a flow action. 

  1. Go to DC Setup.
  2. Open the Object you want to apply a Flow to. 
  3. At the Merge Rules tab, make sure at least a General Rule is set up, and optionally other merge rules as well.
    Learn more about merge rules.

2. Add a Find Duplicates flow action to the flow

The 'Find Master Record By Search Action Output' flow action uses the output of earlier search actions as input. These search actions will have found a number of duplicate records, that this flow action will then determine the master record of.

You can use the results of the 'DC - Find Duplicate by Field Values' and 'DC - Find Duplicate by Record ID' flow actions as input for the 'DC - Find Master Record By Search Action Output' flow action.

See Find Duplicate by Field Values or Find Duplicate by Record ID for information on how to add these flow actions to your flow.

3. Add the Find Master flow action to the flow

  1. In the flow builder, open the flow where you also added the flow action from step 2. Below that flow action, add a new Action element.
  2. In the New Action dialog, search for 'DC - Find Master Record By DC Search Action Output' and select it.
  3. At Label, define a name for your action. If the API name is not set automatically, enter an API name as well.
  4.  At Set Input Values, click in the Duplicate Result  field. 
    1. Click on the output from the previous action: Outputs from <name of the previous flow action>.
    2. Select the Duplicate Result parameter.
  5. The 'Threshold' option is optional. Use it if you want to use a higher threshold than was used in the scenario that found the duplicates. This can be useful if the duplicate search returned a large number of duplicates, and you want to determine the master record only over those records that have the highest matching percentage.
  6. Click Done and save the flow.


Step 3 Connect your action to the Start trigger

Make sure the first of the two flow actions, 'DC - Find Duplicate by Field Values' or 'DC - Find Duplicate by Record ID', is connected to the Start trigger. 


Step 4 Run the flow

Run the flow by clicking "Run".

'Find Master Record By DC Search Action Output' action results

After executing the flow, the 'Find Master Record By DC Search Action Output' flow action returns the following parameter that can be used in other flow actions. 

Parameter Description
masterRecordId The record ID of the duplicate record that would be the master record according to the merge rules.