简体   繁体   English

Salesforce:记录被时间相关的工作流锁定

[英]Salesforce: Records getting locked by time-dependent workflows

We're currently using Salesforce for our sales process, which involve trying to get people to sign up to our "accounts management system", submit details, documents, and get reviewed by an admin. 目前,我们正在使用Salesforce进行销售流程,这涉及尝试促使人们注册我们的“帐户管理系统”,提交详细信息,文档并由管理员进行审查。 This is a whole PHP system outside of SF, let's call it "Cherry". 这是SF之外的整个PHP系统,我们称其为“ Cherry”。

What we're doing right now is: Cherry keeps track of the accounts, but everything that happens is sent to SalesForce, so our salespeople have the list of leads to contact. 我们现在正在做的是:Cherry会跟踪客户,但是发生的一切都会发送到SalesForce,因此我们的销售人员可以获得要联系的潜在客户列表。 When anything changes in Cherry, things get updated in SalesForce, including converting the SF Lead to an Account when the customer gets reviewed by our admins in Cherry. 当Cherry发生任何变化时,SalesForce会进行更新,包括当客户在我们的Cherry管理员中审核后将SF Lead转换为客户。 (After this we still update SF data, but this is less critical, since this is already a customer now) (在此之后,我们仍会更新SF数据,但这并不重要,因为现在这已经是客户了)

To send information from Cherry to SF, I'm simply using the "SforceEnterpriseClient.php" API library, and calling the Create/Update/Delete methods provided by that library. 要将信息从Cherry发送到SF,我仅使用“ SforceEnterpriseClient.php” API库,并调用该库提供的Create / Update / Delete方法。 I don't know if there's any other way to be honest, but our needs are very simple. 我不知道是否还有其他诚实的方法,但是我们的需求非常简单。 Just creating Leads, updating their fields, and converting them to Account. 只需创建销售线索,更新其字段并将其转换为客户即可。

My problem is that our salespeople want to use time-dependent workflows, to automatically e-mail the leads every few days, change them from one status to another, etc. However, once a Lead gets "taken" by one of these workflows, the record is locked (until the time the action is executed, which is typically many days), and anything I try to do with it through the API (update it, or particularly "convertlead") fails with error RECORD_IN_USE_BY_WORKFLOW. 我的问题是我们的销售人员希望使用与时间相关的工作流程,每隔几天自动向潜在客户发送电子邮件,将其从一种状态更改为另一种状态,等等。但是,一旦潜在客户被这些工作流程之一“吸收”,记录被锁定(直到执行该操作的时间,通常是几天),并且我尝试通过API进行的任何操作(更新它,或者特别是“ convertlead”)都失败,并显示错误RECORD_IN_USE_BY_WORKFLOW。

Now, this seems like a pretty common scenario (both using the API to update records, and using time-dependent workflow). 现在,这似乎是一个非常常见的场景(使用API​​更新记录,以及使用时间相关的工作流)。 In fact, it almost seems to our salespeople that the whole point of using SalesForce is the workflows, so I'm quite surprised something as basic as this fails... 实际上,在我们的销售人员看来,使用SalesForce的全部要点是工作流,所以我很惊讶,因为它失败了……

So the basic question is.... - Is there any obvious way around this problem? 所以基本的问题是...-解决这个问题有明显的方法吗? (Using some other API? Doing something different with the workflows?) (使用其他API?对工作流程有不同之处吗?)
- If not, is there any way to "detach" a Lead from its workflow? -如果没有,是否有任何方法可以将销售线索与其工作流程“分离”? (or somehow unlock that record) (或以某种方式解锁该记录)
- If not, are there any workarounds that imply more programming on the SalesForce side? -如果不是,是否有任何变通办法暗示在SalesForce方面进行更多编程?

Thank you VERY much for your help Daniel 非常感谢您的帮助Daniel

You definitely can't convert a lead with pending workflow actions. 您绝对无法通过未决的工作流操作来转换销售线索。 However, you should be able to update the lead. 但是,您应该能够更新销售线索。 In particular, you'll have to update the lead in a way that disqualifies it from the workflow rule. 特别是,您必须以一种导致其不符合工作流程规则资格的方式来更新线索。 To achieve this, you might think about adding a hidden checkbox field called "Exclude from workflow" that you make part of the workflow criteria. 为此,您可以考虑添加一个隐藏的复选框字段,称为“从工作流程中排除”,并将其作为工作流程条件的一部分。 In this case, you'd make an update call to to set this field to true. 在这种情况下,您将对进行更新调用以将该字段设置为true。

Once the Lead is disqualified from the workflow rule, the workflow action will be removed from the queue. 一旦线索从工作流程规则中取消资格,工作流程操作将从队列中删除。 Then you can convert the lead. 然后,您可以转换线索。

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

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