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.
- Go to DC Setup.
- Open the Object you want to apply a Flow to.
- 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.
3. Add the Find Master flow action to the flow
- 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.
- In the New Action dialog, search for 'DC - Find Master Record By DC Search Action Output' and select it.
- At Label, define a name for your action. If the API name is not set automatically, enter an API name as well.
At Set Input Values, click in the Duplicate Result field.
- Click on the output from the previous action: Outputs from <name of the previous flow action>.
- Select the Duplicate Result parameter.
- 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.
- 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.
|masterRecordId||The record ID of the duplicate record that would be the master record according to the merge rules.