[SalesForce] One Process Builder vs Multiple per single Object

I've read somewhere about an idea of implementing all Process Builders that are executing on a single object within a single Process Builder, instead of using multiple ones (IMO this is a similar approach to what is generally done with triggers).

Is this approach possible to maintain over a longer period of time? Have you seen it used successfully? Also, is it better from a certain technical perspective, for example, is it faster?

Best Answer

If you have a great many processes you want to automate, then consolidating them into one flow via Process Builder can be a great choice from an organization perspective. Doing so will also give you more granular control over order of execution within the flow. I'm not certain of any other benefits. Specifically, I doubt it will improve performance.

A few words of caution:

  • If you have some logic that should be re-evaluated and some that should not, you will at least need to create one flow for each branch.
  • You may also need to bifurcate your flows based on if you want the process to start only when a record is created, or also when it is edited.
  • There may always be a performance gap between Process Builder and a custom built, well optimized Apex Trigger. Because of this performance hit, I think you need to consider the case where your flow logic fails.
    • If you had them split out and one flow starts throwing errors, you can simply disable the specific flow that is causing the problem.
    • If you consolidate them, you may find it difficult to extricate or fix the broken logic. This could lead to a longer downtime as you troubleshoot.
Related Topic