Before You Put an LLM in a Flow
Let an LLM generate content if the result is reviewable. Do not let it make the business decision.
darwin / arm64 · tty0 · online
Personal notes on software, experiments, and everyday life from me.
~/blog/latest · page 1/2
Let an LLM generate content if the result is reviewable. Do not let it make the business decision.
Build a tiny Reed–Solomon code step by step, erase half its shards, and recover your own input without treating the maths as magic.
Before giving work to a coding agent, ask what you would need to tell a developer who already knew the codebase.
A retro background became a small 3D engine involving growing geometry, a preplanned camera, fake 480p vertex wobble and a great deal of pipe surgery.
Before adding a lock, decide which operation owns the right to commit a result and when that ownership expires.
HTTP success, application success and business success are separate outcomes. Clients need to check the one they actually depend on.
Producing more log lines does not make a system easier to understand. Start with the questions an operator must be able to answer.
Giving every operation its own timeout can make one request take several times longer than intended. Pass the remaining deadline instead.
GPT-5.6 is a meaningful step beyond GPT-5.5, but choosing well means using Terra by default, Sol deliberately, and Luna only for bounded work.
Most Apex trigger logic needs one entry point, thin routing, bulk-safe services, and change-aware guards. It does not automatically need a metadata-driven framework.
Database methods can let valid records succeed while invalid records fail, but partial DML is only useful when every input receives an explicit, inspectable outcome.
Flow screen validation is a three-method contract. Keep internal and external errors separate, render them at the right time, and never make navigation depend on accidental component state.
User mode closes important CRUD, field-security, and record-access gaps, but secure Apex still needs authorised operations, untrusted-input handling, safe errors, and reviewed privilege boundaries.
LWC communication gets easier when the mechanism matches the relationship: properties down, events up, LMS across page boundaries, and state managers across a complex component subtree.
Useful LWC tests exercise public properties, user interactions, rendered outcomes, events, and data states. Brittle tests merely describe today's private markup.
Queueable Apex becomes reliable when jobs are treated as at-least-once work: use idempotency keys, durable checkpoints, bounded retries, and outcomes you can inspect.
Errors become much easier to handle when LWC, Apex, and Flow agree on a small contract: stable codes for automation, safe messages for people, and correlation details for support.
An invocable method receives a list for a reason. Treat every request as independent, query and write in collections, and return one useful outcome for every input.
Flow and Apex overlap, but they are not interchangeable. I use Flow for visible orchestration and Apex when data structures, transaction control, scale, or reuse become the real problem.
LDS, GraphQL, and Apex can all put Salesforce data into an LWC. The useful question is not which one is best, but which is the smallest honest fit for the operation.
Summer '26 has a cluster of small Flow improvements that make automation safer, faster, and easier to configure: unanimous approvals, scheduled-flow batching, date operators, better data tables, styling overrides, and cleaner Apex-defined inputs.
Summer '26 adds brand colour palettes for report and dashboard charts, and lets Salesforce reports use up to two row-level formulas. Neither change is flashy, but both remove annoying reporting compromises.
Summer '26 makes Apex actions easier to configure in Flow Builder. The opportunity is bigger than nicer inputs: build actions admins can use safely without reading the source.
Summer '26 adds custom Lightning Web Components to normal Lightning dashboards, creating a focused escape hatch when standard report widgets are not enough.