I’m working with a list of customers in Salesforce, where duplicate detection is enabled for the phone field. When manually creating a new customer with an existing phone number, Salesforce displays a warning prompt asking if I want to proceed. The warning doesn’t block the save; it simply alerts me to the duplicate.

However, when attempting to insert a record with the same phone number using MAKE, I encounter the following error:

RuntimeError[400]: A duplicate record was found. Are you sure you want to create the record?

This indicates that the automation is being blocked due to the duplicate detection rules.

Solution Options

Here are a few strategies to address this and allow the record to be inserted:

  1. Modify Duplicate Rules:
    • Adjust the duplicate detection rules in Salesforce to allow duplicates during API insertions.
    • Go to Setup > Duplicate Rules, find the rule related to the phone field, and check the box for Allow Duplicates for Salesforce API.
  2. Bypass Duplicate Detection with a Custom Integration:
    • Instead of using the standard duplicate detection rules, create a custom logic flow to handle duplicates.
    • Use Flows or Apex to identify duplicates and decide whether to update an existing record or insert a new one.
  3. Pre-Validate the Data in MAKE:
    • Add a step in your MAKE scenario to query Salesforce for existing records with the same phone number.
    • If a match is found, update the existing record instead of trying to insert a duplicate.
  4. Override Warnings Using Upsert:
    • Replace the Insert operation in your MAKE scenario with an Upsert operation.
    • Upsert allows you to either update an existing record (if it matches a unique identifier like the phone field) or create a new record.

Best Practices

  • Understand Business Requirements: Before allowing duplicates, confirm whether this aligns with your organization’s data integrity policies.
  • Audit Changes: Ensure any adjustments to duplicate rules or integrations are thoroughly documented to maintain data governance.
  • Test in Sandbox: Test these changes in a Salesforce sandbox environment to avoid unintended impacts on production data.

If you need help setting up any of these solutions, let Tectonic know!

🔔🔔  Follow us on LinkedIn  🔔🔔

Related Posts
Salesforce OEM AppExchange
Salesforce OEM AppExchange

Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more

The Salesforce Story
The Salesforce Story

In Marc Benioff's own words How did salesforce.com grow from a start up in a rented apartment into the world's Read more

Salesforce Jigsaw
Salesforce Jigsaw

Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more

Health Cloud Brings Healthcare Transformation
Health Cloud Brings Healthcare Transformation

Following swiftly after last week's successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

author avatar
get-admin