Lightning Process Builder has arrived, GA in Spring ’15! The newest Salesforce addition to workflow automation, Process Builder has already been a hot topic of conversation, exploration, and education in the Salesforce Admin and Developer community. There are a number of  community blog posts detailing Process Builder use cases and a thriving list of ideas for what the community wants to see in the roadmap. Shelly Erceg, Salesforce Product Manager addresses a number of the Process Builder hot topics with us here. Follow Shelly and the Workflow Automation group in the Success Community for the latest and greatest updates and answers around Salesforce Workflow Automation tools.

Will Lightning Process Builder have bulk capabilities? What are the Limits and will they change?

Working on it! We are actively working on plans to cover bulk use cases in the Process Builder. It is, however, a complex problem. The context here is that these are Platform limitations that have always governed Flow and Apex as well. By offering the flexibility to operate across objects that Process Builder brings, we are subject to limits that Workflow Rules are not. The difference is that Flow and Apex provide technically sophisticated users methods to do effective workarounds to manage their way through the limits with code or pseudo-code.

For Process Builder our goal is to abstract away this type of complexity, and solve as many types of Bulk use cases behind the scenes as we can. The solution will be multi-layered and one we will be iterating on. It won’t likely come all at once. We are going to iterate and meanwhile WF Rules, Flow or Apex are still in place. In the meantime we are going to step up our educational efforts to help users determine if PB is appropriate for their use cases.

We will continue to iterate on the power available in Process Builder and, just as critically, we will continue to iterate on the user experience and usability of PB with a goal of providing power in a simplified, transparent way.

When is it possible to encounter bulk handling issues today?

Whether or not you encounter bulk handling issues today depends on your org shape. In general, the more complicated your environment — the more triggers you have deployed, the more API interactions you do in batch and the more interesting your process actions are — the greater the possibility you have of encountering a bulk handling issue.

For example, in the recent Button Click Admin podcast on How Salesforce Built Process Builder, one example of a powerful process they shared is keeping Account and Contact address changes in sync. In a simple org with limited triggers and no batch API interactions, you will not encounter any issues.  However, if you import and update data in batch, it is possible you will encounter a bulk handling issue.  For example, if you import and then update 500 Accounts and Contacts in an org without triggers on either object, you will see the following behavior:

  • Import and then update via the Data Management > Import Accounts and Contacts, no issues.
  • Import and then update via the Partner API, batch size of 100 succeeds, batch size of 200 fails.
  • Import and then update via the Bulk API, batch size of 100 succeeds, batch size of 2000 fails.

Another example is what happens when you create a process that attempts to update a related record.  For example, maybe your process looks for an External Id on the Lead object.  When it encounters that Id, it attempts to look up another record, and update a field.  This simple Apex testmethod will succeed or fail depending on how many Leads you decide to work with.

In general, as you get started with Process Builder, you can easily test whether it’s an appropriate tool for your use case by considering your org shape. If you aren’t sure, you can easily create a test in Apex or using sample data to be sure it works for you.

How do I move Processes from one org to another?

You can use Change Sets to move Processes from your Sandbox to Production org or Packaging to move between Production orgs. Processes are a type of Flow underneath, so you’ll see them listed as Flows. Below are some things to consider…

  • The Metadata API allows you to deploy processes to another organization. However, keep in mind that:
    • If the process already exists in the target organization, it must be inactive or it won’t deploy.
    • If the process doesn’t exist in the target organization, it will deploy with an inactive status regardless of its status in the source organization.
  • If you deploy a process through the Metadata API or change sets and the process contains any of the following actions, packageable components that they reference aren’t included in the package or change set automatically. To deploy successfully, manually add those referenced components to the package or change set.
    • Apex
    • Email Alerts
    • Launch a Flow
    • Post to Chatter
    • Quick Actions
    • Submit for Approval
  • For example, if a packaged process contains a “Send Email” action, you must manually add the email template that is used by the referenced email alert.

What are the limitations on deleting a Process?

We are working on this one as well! Currently you need to wait 12 hours to delete an active process, but soon you will be able to immediately delete active processes that do not have any waiting scheduled actions

Formula Limitations, what are they and will they change?

We are going to be incrementing on formula robustness over the next few releases to increase the breadth of formula functionality in Process Builder. Your use cases are very helpful to us in testing to make sure can provide the functionality you need. Please share those with us in the Success Group

How do I know which automation tool to use?

Great Question! Salesforce now has a number of automation tools, Flow, Approvals, Workflow, Process Builder. A rudimentary guideline to follow is:

  • Use Process Builder to combine multiple if/then statements that fire immediate or scheduled actions when records are created or changed.
  • Workflow Rules will allow you to create multiple schedules for your actions in the same process and do outbound messages without code, but only on a single if/then statement with a sub-set of actions.
  • Use Approvals routing time-off requests, deal discounts or other records that need management approval
  • Use Flow for creating wizards that have screens to gather & operate on User Input or for more complex processes

–Complex branching logic (i.e. if certain conditions are true, evaluate for further conditions) –Sort through, iterate over, and operate on batches of records –Bulk cases – use Flow or Apex Here is a matrix that provides more detail around use cases and specific limitations.

Can I create Tasks with Process Builder?

Yes! You create a task or event in a Process Action by using the Create Record Action type and selecting Tasks or Event as the object type.

Hope this answers some of the pressing questions in the community, stay tuned for more news, articles, and documentation around Lightning Process Builder!

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS