When designing long flows or apex, it may make sense to break things up.

One approach is to keep things modular. But then the question becomes, where to break up the logic?

Let’s say when A happens, do B, C, and D. And when C happens, do E and F.

While this can all be done in a single automation, it’s generally not a good idea.

Reason #1 is, the larger the automation, the more challenging it is to maintain. Future changes will require you to test the entire automation, to ensure nothing else is impacted.

Reason # 2 is, when there are multiple people working on a large flow, it’s more prone to errors and challenges merging logic.

Reason # 3 is, C may happen independently of A. And since you want E and F to follow, this part of the chain should be in its own automation.

The result is two automations:

  1. When A happens, do B, C, and D
  2. When C happens, do E and F

The takeaway
While designing flow, consider how things can be broken up into pieces. One thing to look for is events may need to happen outside of the initial trigger.

Category:
Salesforce