I noticed in the UI that when I try to insert a contact with an e-mail address that a lead already has, I get a warning (before I click save and insert the contact) saying that this is a possible duplicate. However, I am still able to save the contact ignoring the warning. This is something that I often want to happen. But I can't seem to find anything in the docs that offers a way to force the operation when I'm inserting the same contact with the REST API. What seems to be a warning in the UI is an error in the REST API. Is there a way (in the REST API) to ignore this error and insert the contact anyway? It certainly seems possible when done manually through the UI.

  • 2
    As of now it seems you cannot bypass this while using standard REST APIs. There's an idea to introduce the DuplicateRuleHeader as available in SOAP API. Take a look on this question, if that provides some direction using custom REST API implementation
    – Jayant Das
    Commented Sep 6, 2018 at 13:11
  • So basically, I have to either use the SOAP API or rewrite my code in Apex that I then make externally callable over HTTP (is this what you mean by custom REST API implementation)? Commented Sep 6, 2018 at 13:29
  • That's correct. If you have a way to actually call it using SOAP API, will recommend that, because say once in future if the feature is delivered in REST API, your code just becomes obsolete.
    – Jayant Das
    Commented Sep 6, 2018 at 13:31
  • Well, thanks for pointing me to the other question. At least I'm not clueless now :) I'm not entirely sure if my question qualifies as a duplicate though Commented Sep 6, 2018 at 13:34
  • I am not sure either :). The answer on the question provides an approach but as for your question, the issue still exists that you cannot bypass duplicate rules using REST API. Will leave it for the forum to decide :)
    – Jayant Das
    Commented Sep 6, 2018 at 13:39


You must log in to answer this question.

Browse other questions tagged .