Flow Meta Conventions
Read these first
- The official Flows best practice doc. Note we agree on most things. https://help.salesforce.com/articleView?id=flow_prep_bestpractices.htm&type=0
- The Flows limits doc. If you don't know the platform limits, how can you build around them? https://help.salesforce.com/articleView?id=flow_considerations_limit.htm&type=0
- The Transactions limits doc. Same as above, gotta know limits to play around them. https://help.salesforce.com/articleView?id=flow_considerations_limit_transaction.htm&type=0
SFXD Best Practices
These are general best practices that do not pertain to individual flows but more to Flows in regards to their usage within an Organization.
- Record-Triggered Flows, Process Builders, and Triggers should never coexist on the same object. Also note the "What automation do I use" flowchart. Also use the fact that Salseforce itself only recommends one source of automation per Object.
- Flows are considered Code for maintenance purposes - do NOT create or edit one in Production, especially a Record-Triggered flow.
- If at all possible, Flows should be Tested (currently using Test classes - later down the line I expect Salesforce will make Test Flows available
- Flows that call APEX or LWCs are subject to more limits and potential bugs than fully declarative ones. When planning to do one, factor in the maintenance cost of these parts. Yes, this absolutely includes actions and components from the wonderful UnofficialSF. If you install unpackaged code in your organization, YOU are responsible for maintaining it.
- When possible, prefer user-triggered automations. Then, scheduled batch automations. And finally, record-triggered automations. If you're sending emails there's a high probability you can just iterate over all records matching criteria and send them instead of adding a record-triggered decision node.
- Record-triggered flows are BLEEDING EDGE and not ready for prime time. Amongst other things, you can't debug them properly without workarounds. You might want to wait for Winter22 to use them extensively.