function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Patrick ConnerPatrick Conner 

Is it possible to set API only to bypass duplicate rules?

As the title suggests, I'm trying to have imports (through the bulk API) bypass our dupe rules, while maintaining this rule for users. Is this possible? Thanks!
Daniel BallingerDaniel Ballinger

What are you using to enforce the duplication rules?

If you are using the native Salesforce functionality, then you could define the DuplicateRuleHeader (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_header_duplicateruleheader.htm) for the required API calls. Set allowSave to true to bypass the check.

Kristopher EstradaKristopher Estrada
Hi Patrick-
Did you get this resolved. If so how? I have a form updated and creating contact records and I'm getting integration errors unless I disable alerts on my rules. 
Thanks! 
-Kris 
Nick SpencerNick Spencer
Hi.
On the Duplicate Rule itself, there's a Conditions section where you can set various Current User exclusions from the rule.  Can't see an option specifically for API user, but if it has a specific Profile, then you're in luck!