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
Who is Salesforce?
Salesforce

Who is Salesforce? Here is their story in their own words. From our inception, we've proudly embraced the identity of Read more

Salesforce Marketing Cloud Transactional Emails
Salesforce Marketing Cloud

Salesforce Marketing Cloud Transactional Emails are immediate, automated, non-promotional messages crucial to business operations and customer satisfaction, such as order Read more

Salesforce Unites Einstein Analytics with Financial CRM
Financial Services Sector

Salesforce has unveiled a comprehensive analytics solution tailored for wealth managers, home office professionals, and retail bankers, merging its Financial Read more

AI-Driven Propensity Scores
AI-driven propensity scores

AI plays a crucial role in propensity score estimation as it can discern underlying patterns between treatments and confounding variables Read more