Skillpedia
واجهات API والخوادم (backend)40k · #7414

salesforce-flow-design

ما الذي تفعله

يساعدك هذا الدليل على بناء تدفقات الأتمتة في Salesforce بشكل صحيح وآمن. يعلّمك اختيار نوع التدفق المناسب، وتجنب الأخطاء الشائعة، وضمان عمل الأتمتة بشكل جيد حتى مع كميات كبيرة من البيانات.

متى تستخدمها

  • ✓عندما تبدأ تدفق أتمتة جديدًا.
  • ✓عندما تراجع تدفقًا موجودًا للتأكد من أنه مبني بشكل صحيح.
  • ✓عندما يسبب تدفق أخطاء أو لا يعمل كما هو متوقع.

رابط المهارة

https://github.com/github/awesome-copilot/blob/main/skills/salesforce-flow-design/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/github/awesome-copilot/blob/main/skills/salesforce-flow-design/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“كيف أتأكد من أن تدفق المبيعات لا يتعطل إذا تم تحديث عدد كبير من العملاء في الوقت نفسه؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يتحقق الدليل مما إذا كنت قد اخترت نوع التدفق الصحيح لاحتياجك، وما إذا كان مضبوطًا للتعامل مع عدد كبير من السجلات دفعة واحدة. ويوضح أيضًا كيفية إضافة حماية من الأخطاء.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من 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 Run combination
  • 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 update context

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

…

الأسئلة الشائعة

ما هو « التدفق » (flow) في Salesforce؟

هو أداة تؤتمت المهام المتكررة في Salesforce، مثل تحديث معلومات العملاء أو إرسال رسائل البريد، دون الحاجة إلى كتابة كود.

لماذا يُعد « DML داخل الحلقات » مشكلة؟

تنفيذ عملية (مثل الحفظ) بشكل متكرر داخل قائمة من العناصر بطيء جدًا، وقد يتعطل النظام لأنه يستهلك موارد كثيرة.

ما هي « موصلات الأخطاء » (fault connectors)؟

هي مسارات بديلة يسلكها التدفق عند حدوث خطأ، فيسجّل الخطأ أو يُبلغ المستخدم بلطف، بدلًا من أن يتوقف فقط.

التفاصيل

الوصف الأصلي من المؤلف

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

الشعبية

نجوم GitHub
40k
الترتيب
#7414
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة