salesforce-flow-design
Was er macht
Dieser Leitfaden hilft dir, Automatisierungs-Flows in Salesforce richtig und sicher zu bauen. Du lernst, wie du den passenden Flow-Typ auswählst, typische Fehler vermeidest und sicherstellst, dass die Automatisierung auch bei großen Datenmengen gut funktioniert.
Wann du ihn nutzt
- ✓Wenn du einen neuen Automatisierungs-Flow beginnst.
- ✓Wenn du einen bestehenden Flow prüfst, ob er gut aufgebaut ist.
- ✓Wenn ein Flow Fehler verursacht oder nicht wie erwartet funktioniert.
Link zum Skill
https://github.com/github/awesome-copilot/blob/main/skills/salesforce-flow-design/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Wie stelle ich sicher, dass mein Verkaufs-Flow nicht abstürzt, wenn viele Kunden gleichzeitig aktualisiert werden?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Leitfaden prüft, ob du den richtigen Flow-Typ für deinen Zweck gewählt hast und ob er viele Datensätze auf einmal verarbeiten kann. Außerdem zeigt er, wie du einen Fehlerschutz einbaust.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Salesforce Flow Design and Validation
Apply these checks to every Flow you design, build, or review.
Step 1 — Confirm Flow Is the Right Tool
Before designing a Flow, verify that a lighter-weight declarative option cannot solve the problem:
| Requirement | Best tool |
|---|---|
| Calculate a field value with no side effects | Formula field |
| Prevent a bad record save with a user message | Validation rule |
| Sum or count child records on a parent | Roll-up Summary field |
| Complex multi-object logic, callouts, or high volume | Apex (Queueable / Batch) — not Flow |
| Everything else | Flow ✓ |
If you are building a Flow that could be replaced by a formula field or validation rule, ask the user to confirm the requirement is genuinely more complex.
Step 2 — Select the Correct Flow Type
| Use case | Flow type | Key constraint |
|---|---|---|
| Update a field on the same record before it is saved | Before-save Record-Triggered | Cannot send emails, make callouts, or change related records |
| Create/update related records, emails, callouts | After-save Record-Triggered | Runs after commit — avoid recursion traps |
| Guide a user through a multi-step UI process | Screen Flow | Cannot be triggered by a record event automatically |
| Reusable background logic called from another Flow | Autolaunched (Subflow) | Input/output variables define the contract |
Logic invoked from Apex @InvocableMethod |
Autolaunched (Invocable) | Must declare input/output variables |
| Time-based batch processing | Scheduled Flow | Runs in batch context — respect governor limits |
| Respond to events (Platform Events / CDC) | Platform Event–Triggered | Runs asynchronously — eventual consistency |
Decision rule: choose before-save when you only need to change the triggering record's own fields. Move to after-save the moment you need to touch related records, send emails, or make callouts.
Step 3 — Bulk Safety Checklist
These patterns are governor limit failures at scale. Check for all of them before the Flow is activated.
DML in Loops — Automatic Fail
Loop element
└── Create Records / Update Records / Delete Records ← ❌ DML inside loop
Fix: collect records inside the loop into a collection variable, then run the DML element outside the loop.
Get Records in Loops — Automatic Fail
Loop element
└── Get Records ← ❌ SOQL inside loop
Fix: perform the Get Records query before the loop, then loop over the collection variable.
Correct Bulk Pattern
Get Records — collect all records in one query
└── Loop over the collection variable
└── Decision / Assignment (no DML, no Get Records)
└── After the loop: Create/Update/Delete Records — one DML operation
Transform vs Loop
When the goal is reshaping a collection (e.g. mapping field values from one object to another), use the Transform element instead of a Loop + Assignment pattern. Transform is bulk-safe by design and produces cleaner Flow graphs.
Step 4 — Fault Path Requirements
Every element that can fail at runtime must have a fault connector. Flows without fault paths surface raw system errors to users.
Elements That Require Fault Connectors
- Create Records
- Update Records
- Delete Records
- Get Records (when accessing a required record that might not exist)
- Send Email
- HTTP Callout / External Service action
- Apex action (invocable)
- Subflow (if the subflow can throw a fault)
Fault Handler Pattern
Fault connector → Log Error (Create Records on a logging object or fire a Platform Event)
→ Screen element with user-friendly message (Screen Flows)
→ Stop / End element (Record-Triggered Flows)
Never connect a fault path back to the same element that faulted — this creates an infinite loop.
Step 5 — Automation Density Check
Before deploying, verify there are no overlapping automations on the same object and trigger event:
- Other active Record-Triggered Flows on the same
Object+When to Runcombination - Legacy Process Builder rules still active on the same object
- Workflow Rules that fire on the same field changes
- Apex triggers that also run on the same
before insert/after updatecontext
Overlapping automations can cause unexpected ordering, recursion, and governor limit failures. Document the automation inventory for the object before activating.
Step 6 — Screen Flow UX Guidelines
…
Häufige Fragen
Was ist ein „Flow“ in Salesforce?
Ein Flow ist ein Werkzeug, das wiederkehrende Aufgaben in Salesforce automatisiert, etwa das Aktualisieren von Kundendaten oder das Versenden von E-Mails, ohne dass du programmieren musst.
Warum ist „DML in Schleifen“ ein Problem?
Wenn du innerhalb einer Liste von Datensätzen wiederholt eine Aktion ausführst, etwa Speichern, ist das sehr langsam und kann das System zum Absturz bringen, weil zu viele Ressourcen verbraucht werden.
Was sind „Fault Connectors“?
Das sind alternative Wege, die der Flow nimmt, wenn etwas schiefgeht. So kann er den Fehler protokollieren oder den Nutzer freundlich informieren, statt einfach abzubrechen.
Details
Originalbeschreibung des Autors
Salesforce Flow architecture decisions, flow type selection, bulk safety validation, and fault handling standards. Use this skill when designing or reviewing Record-Triggered, Screen, Autolaunched, Scheduled, or Platform Event flows to ensure correct type selection, no DML/Get Records in loops, proper fault connectors on all data-changing elements, and appropriate automation density checks before
repo: github/awesome-copilot
Beliebtheit
- GitHub-Sterne
- 40k
- Platz im Ranking
- #7414
- Lizenz
- MIT
- Aktualisiert
- 15.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
acquire-codebase-knowledge
40kHilft deinem Agenten, ein bestehendes Code-Projekt zu verstehen und zu dokumentieren. Nützlich, um neue Teammitglieder einzuarbeiten oder die Architektur zu überblicken.
acreadiness-assess
40kErmöglicht deinem Agenten, die KI-Tauglichkeit eines Projekts zu prüfen und einen Bericht zu erstellen. So siehst du, wie gut das Projekt auf KI-Tools vorbereitet ist.
acreadiness-generate-instructions
40kHilft deinem Agenten, auf Basis einer Prüfung Anweisungen für KI-Tools zu erstellen. So arbeitet die KI besser mit dem Code und erkannte Lücken werden geschlossen.
acreadiness-policy
40kErmöglicht deinem Agenten, Richtlinien für die Bewertung von KI-Projekten festzulegen oder anzuwenden. So werden Projekte einheitlich geprüft und Vorgaben eingehalten.
Ähnliche Skills
api-connector-builder
280kLässt deinen Agenten neue API-Anbindungen nach dem bestehenden Muster bauen. Nutze es, wenn du eine weitere Integration ergänzen willst, ohne neue Wege einzuführen.
api-design
280kHilft deinem Agenten, REST-APIs nach Best Practices zu entwerfen. Nützlich für die Kommunikation, die Fehlerausgabe und die Organisation von Daten.
backend-patterns
280kHilft deinem Agenten bei Architekturmustern für die Serverseite und bei der Datenbankoptimierung. Nützlich zum Bauen und Prüfen von Server-Code.