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
Ruby DeveloperRuby Developer 

REST API update to Leads is triggering Lead Assignment Rules

Is there any way to prevent Lead Assignment Rules from triggering when I update a Lead through the REST API? I see this happen through the C# libraries and even just using Postman.

Even if I just change a name field, it re-runs the Lead Assignment Rules and re-assigns the lead owner :(

I see this was posted as a problem with 0 replies in 2012 too:

https://developer.salesforce.com/forums?id=906F00000009ABoIAM
Mustafa Al SalihiMustafa Al Salihi

Hi, 
I am looking to do the same. Did you figure it out ? 
 

Ruby DeveloperRuby Developer
I did! The documentation I found states that you need to include optional headers to override this default behavior:
https://developer.salesforce.com/docs/atlas.en-us.200.0.api_rest.meta/api_rest/headers_autoassign.htm

Also, the Force.com-Toolkit-for-NET libraries we were using didn't support custom headers, but I found a branch someone else has made with the required code  features here https://github.com/nmonasterio/Force.com-Toolkit-for-NET

Assuming you need this feature too, please do comment / vote for it on the origin library https://github.com/developerforce/Force.com-Toolkit-for-NET/issues/186
Mustafa Al SalihiMustafa Al Salihi
Thank you so much for the help. Saved me a lot of time. And yes I voted the issue up!! 
Benjamin HerzigBenjamin Herzig
Thank you very much Ruby Developer! I've debuged our whole lead assignment stuff to the bones, but couldn't figure out why until I realized that an api update triggers the reassignment.