开发者

Assignment rules are being ignored when creating a Lead through the Salesforce REST API

I have an old application that uses Web-To-Lead. I'm updating it to use the REST API. We have a bunch of assignment rules set up for Leads. When we create a lead through Web-To-Lead, the Lead is assigned according to our assignment rules. However, when we create a Lead through the REST API, the assignment rules are completely ignored, and the Lead is assigned to the account whose credentials we used to authenticate through OAuth. 开发者_开发知识库 This has slowed our sales team to a crawl, because now they have to assign leads by hand.

Any ideas how to fix this?


@sangfroid

You want to make sure you set the Assignment Rule Header which should then get the rule to fire off for you.

Paul

====Edit===

It doesn't seem that you can which is a pain. You could try creating a new web service using the Apex REST services stuff (new in Summer '11) which then takes in your Lead data as you have created and runs it using the code at this link.

That should allow you to have the assignment rules run on the inserted Lead and still use a RESTful API. Your own implementation on Salesforce in fact. You could try that code in a trigger on Lead which should get run by the native API as well.

Hope that helps. Apologies for not paying attention on the SOAP REST thing first time round.

Paul

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜