简体   繁体   English

通过Salesforce REST API创建销售线索时,分配规则将被忽略

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

I have an old application that uses Web-To-Lead. 我有一个使用Web-Lead的旧应用程序。 I'm updating it to use the REST API. 我正在对其进行更新以使用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. 当我们通过Web-To-Lead创建销售线索时,将根据我们的分配规则分配销售线索。 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. 但是,当我们通过REST API创建销售线索时,分配规则将被完全忽略,并将销售线索分配给我们用来通过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 @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 . 您可以尝试使用Apex REST服务的东西(Summer '11中的新增功能)创建新的Web服务,然后将您创建的Lead数据导入并使用此链接中的代码运行它。

That should allow you to have the assignment rules run on the inserted Lead and still use a RESTful API. 这样可以使分配规则在插入的Lead上运行,并且仍使用RESTful API。 Your own implementation on Salesforce in fact. 实际上,您自己在Salesforce上的实现。 You could try that code in a trigger on Lead which should get run by the native API as well. 您可以在Lead的触发器中尝试该代码,该触发器也应由本机API运行。

Hope that helps. 希望能有所帮助。 Apologies for not paying attention on the SOAP REST thing first time round. 抱歉,第一次没有关注SOAP REST。

Paul 保罗

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM