Loading

How to prevent the creation of duplicate records in a Flow: Utilization of “Confirm Matching Records”

Data pubblicazione: Aug 25, 2025
Descrizione

When using a Flow, records can be automatically created based on the conditions specified. However, if the same conditions occur repeatedly, multiple records may be unintentionally created.
To avoid this problem, you can prevent the creation of unnecessary duplicate records by selecting “Skip matching record” in the “Confirm Matching Records” setting.

Risoluzione

For example, consider a case where you wish to create only one opportunity, labelled “[Automatically Created] Opportunity”, for an account when the account’s “Rating” (API reference name: Rating) is changed to “Hot”.

If you do not use “Confirm Matching Records”, under normal flow settings, a new opportunity record “[Automatically Created] Opportunity” will be created each time the “Rating” of the account is updated to “Hot”.

Therefore, if the rating value is changed and subsequently updated back to “Hot”, the same opportunity record will be created multiple times, resulting in unintended duplicates.

This article describes how to prevent duplicate records from being created in such a flow.

 

  1. Log into Salesforce, click the gear icon in the upper right of the screen, and click “Setup”.
  2. Search for the flow in the Quick Find box, then click the New Flow button.
  3. Click Triggered, and then click Record-Triggered Flow.
  4. Specify the following values in Start.

Object: Account

Configure Trigger: A record is created or updated

Condition Requirements: All conditions are met (AND)

      • Field: Account Rating
      • Operator: Equals
      • Value: Hot

When to Run the Flow for Updated Records: Only when a record is updated to meet the condition requirements

  1. Click the + icon and add Create Record. Enter the following values into the Create Record elements.

Note: Enter an appropriate label and description. Although optional, best practice is to enter a description.

 

Label: Opportunity Creation

Description: * Enter an appropriate description.

How to Set the Record Fields: Manual

Object: Opportunity

Set Field Values for the Opportunity:

      • Account ID: {!$Record.Id}
      • Opportunity Name: [Automatically Created] Opportunity
      •  Enter any value in the required opportunity fields for Close Date and Stage.

  1. Enable Confirm Matching Records at the bottom of Opportunity Field Configuration and substitute the following values.

Condition Requirements: All conditions are met (AND)

Requirements Line 1

      • Field: Account ID
      • Operator: Equals
      • Value: {!$Record.Id}

Requirements Line 2

      • Field: Opportunity Name
      • Operator: Equals
      • Value: [Automatically Created] Opportunity

If there is one matching record: Skip matching record

If there are multiple matching records: Skip all matching records

  1. Next, press the Save button at the top right of the Flow Canvas, and enter an appropriate flow label.

  1. Finally, click the Activate button next to the Save button to activate the Flow.

 


Contributor: Motohashi Takaaki | Trailblazer Community Forum Ambassador

Transitioned to the Salesforce industry after working for a heavy industry manufacturer. Has experience as a Salesforce systems administrator, in AppExchange customer success and as a consultant.
He gives a lecture in the Pathfinder DX personnel development program for the group preparing for the Salesforce Certified Administrator Examination.
He has hosted over 80 “Salesforce Saturday” Salesforce workshops since 2018.

He continues to communicate information on Salesforce through his YouTube channel with over 3,500 subscribers and his blog.
In first group of Trailblazer Community Forum Ambassadors. Is also active on the Salesforce Community Advisory Board (CAB).

 

Posted content reflects only the opinions of the user who made the post and does not represent the views of Salesforce. Regardless of whether a user is associated with Salesforce, posts may contain or consist of products, services, information, data, content, or other materials provided by third parties (hereinafter referred to as “Third Party Materials”). Salesforce does not manage, endorse, or guarantee any Third Party Materials (including their accuracy, validity, timeliness, completeness, reliability, consistency, quality, legality, usefulness, security, or applicable intellectual property rights), and assumes no responsibility whatsoever for them. Posts provided as answers to questions submitted via message boards or forums, or posts claiming to answer questions about Salesforce or its programs, are provided for general informational purposes only and should not be relied upon as answers to specific questions (even if an answer is marked as the “best” answer or similar qualifications are granted). For answers to specific questions, be sure to contact Salesforce Support. Salesforce has no control over posted content and assumes no responsibility for the use or misuse of posted content by third parties (including its distribution).

 

If you have any questions, please take advantage of the knowledge and expertise available in our Trailblazer Community at
https://trailhead.salesforce.com/trailblazer-community/feed

Numero articolo Knowledge

005056172

 
Caricamento
Salesforce Help | Article