Flow Meta Conventions
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 a same object. Use 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 if Record-Triggered
- 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 includes UnOfficialSF.
- 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.
- Use System mode sparingly. It is dangerous. If used in a Communities setting, I REALLY hope you know why you're exposing data publicly over the internet or that you're only committing information with no GETs.
- Flow List Views should be used to sort and manage access to your Flows easily - more on that in Naming Conventions
- APEX or LWCs that are specifically made to be called from Flows should be clearly named and defined in a way that makes their identification and maintenance easier.
- Do not design Flows that will have long Wait elements and will be called by thousands of records. You'll exceed your Paused Interview limits and it should be a Scheduled Batch flow anyway.