本文へ移動
cccskills
無料GitHub で公開

process-flow-as-is-to-be

Documenting As-Is and To-Be business processes for a Salesforce project as swim-lane diagrams — one lane per actor, explicit decision points, parallel and exception/sad paths, and per-step automation-tier annotations that drive downstream build decisions. Trigger keywords: As-Is To-Be salesforce process, swim lane salesforce, business process map, automation candidate identification, sad path documentation, process actor mapping, manual residue. NOT for Opportunity stage and exit-criteria design — use admin/sales-process-mapping. NOT for picking Flow vs Apex for one requirement — use admin/process-automation-selection.

インストール方法を見る

含まれるファイル(8)

  • SKILL.md23.8 KB
  • references/examples.md8.0 KB
  • references/gotchas.md6.5 KB
  • references/llm-anti-patterns.md8.5 KB
  • references/well-architected.md4.4 KB
  • scripts/check_process_flow_as_is_to_be.py9.8 KB
  • scripts/check_process_map.py821 B
  • templates/process-flow-as-is-to-be-template.md5.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Process Flow As-Is To-Be

This skill activates when a practitioner needs to produce an As-Is and To-Be business process map as the structured input to a Salesforce build. The output is a swim-lane diagram (one lane per actor, not per system or per phase), a decision-tree-anchored automation candidate list, an explicit manual residue list, and a machine-readable handoff JSON consumed by /build-flow, /build-agentforce-action, /design-object, and the automation-selection.md decision tree.

This is the generic, domain-agnostic process flow skill. Vertical-specific process mapping (sales stages, fundraising stewardship cycles, FSL scheduling) lives in sister skills.


Before Starting

Gather this context before mapping anything:

  • Confirm the start trigger and end state. A process map without unambiguous start and end conditions drifts during build. "Lead created" and "Opportunity Closed Won" are start and end. "Improving sales" is not.
  • Enumerate actors. Each actor becomes a swim lane. The four canonical actor types are: human users by role (AE, manager, deal desk, customer support), the Salesforce system itself (automation, validation, sharing), external integrations by name (NetSuite, MuleSoft, payment gateway), and the customer or external counterparty (when they fill out a form, sign a document, or receive an email).
  • Identify the decision authority for the To-Be design. The To-Be is a future-state proposal — it requires sign-off from a named owner (process owner, RevOps lead, COO). Map without that owner and the To-Be will not survive contact with the build phase.
  • Establish whether the process is in scope of an existing decision tree. If the process touches automation tooling choice, read standards/decision-trees/automation-selection.md first. If it touches async patterns or integration patterns, read those trees too. The trees are authoritative — the To-Be must cite them for every automated step.
  • Confirm there is no domain-specific sister skill that fits better. A sales-stage transition map is sales-process-mapping. A donor stewardship cycle is fundraising-process-mapping. An FSL scheduling policy is fsl-scheduling-policies. Use those instead when the domain matches.

Core Concepts

Swim Lane Per Actor — Not Per System, Not Per Phase

A swim lane represents an actor: who or what is performing each step. The most common mapping mistake is collapsing actors into systems (one lane for "Salesforce", one for "ERP") or splitting by phase (Discovery / Negotiation / Close). Both produce maps that obscure responsibility.

The canonical actor categories are:

ActorLane convention
Human userBy role, not by name. "Account Executive" not "Jane".
Salesforce platformFor automated steps the platform performs (validation, sharing, record creation, notification).
IntegrationOne lane per named external system. NetSuite is one lane; MuleSoft is another; Stripe is a third. Lumping integrations into a single "External" lane hides handshake steps.
Customer or external counterpartyWhen the process includes a step the customer performs (signs a document, fills out a portal form, replies to an email). In B2C contexts this lane is mandatory; B2B teams forget it constantly.

A well-formed As-Is map has 4–7 lanes. More than 7 indicates the process scope is too broad and should be split.

Decision Diamond Rules

Every decision diamond in the map must:

  1. State the decision as a question — "Has credit check passed?" not "Credit check".
  2. Have at least two outgoing branches — typically Yes / No, but multi-way decisions (Tier 1 / Tier 2 / Tier 3) are valid.
  3. Label each branch with the condition that triggered it — not just the outcome. "No → escalate to manager" not just "→ escalate".
  4. Have an explicit sad-path branch — what happens when the decision data is missing, ambiguous, or the system that would supply it is down. Maps that show only the happy branch fail at build time when the developer asks "what about when…".

Parallel Paths and Merge Patterns

When two or more steps run concurrently after a fork (e.g., legal review and finance review both kick off at Proposal), the map must show:

  • The fork point — usually a parallel-gateway diamond or a labelled fork node.
  • Each concurrent path on its own lane.
  • The merge point — the step that cannot proceed until all parallel paths complete (an AND-merge) or any one completes (an OR-merge). This distinction is critical because AND-merge translates to a wait condition or an aggregation flow, while OR-merge translates to a first-wins pattern.

Exception / Sad-Path Handling

Every external integration handshake, every approval, and every decision diamond must have an exception path documented. The four canonical exception classes are:

ClassMeaning
TimeoutThe upstream system did not respond within the SLA.
Validation rejectionThe data submitted did not pass downstream validation.
Authorization failureThe actor performing the step lacks permission.
Manual overrideA human consciously bypassed the automated step.

A To-Be map that documents only happy paths is incomplete. The build team will invent exception handling on the fly, and the resulting Flows or Apex services will not be auditable.

Automation-Tier Annotation Syntax

Every To-Be step must carry exactly one automation tier in square brackets at the end of the step label. The allowed values are:

  • [FLOW] — a record-triggered, screen, or autolaunched Flow per automation-selection.md Q2/Q4/Q5.
  • [APEX] — Apex trigger, service class, batch, or queueable per automation-selection.md Q3/Q6/Q10.
  • [APPROVAL] — a Salesforce Approval Process per the cheat sheet in automation-selection.md.
  • [PLATFORM_EVENT] — Platform Event publish or CDC subscriber per automation-selection.md Q11/Q12.
  • [INTEGRATION] — a callout, inbound API call, MuleSoft orchestration, or Pub/Sub subscription. Pair with integration-pattern-selection.md for the specific pattern.
  • [MANUAL] — the step is not automated. Required: a "why manual" annotation in the manual residue table.

A step labelled with two tiers is a routing failure. Re-run the decision tree until exactly one tier applies, or split the step into two.

Handoff JSON Shape

The canonical handoff payload that downstream agents (/build-flow, /build-agentforce-action, /design-object) consume:

{
  "process_id": "order-intake-2026q2",
  "scope": {
    "start_trigger": "Customer submits order form",
    "end_state": "Order activated in NetSuite and customer notified",
    "actors": ["Sales Ops", "Salesforce Platform", "NetSuite", "Customer"]
  },
  "as_is_steps": [
    {
      "step_id": "asis-001",
      "actor": "Sales Ops",
      "description": "Manually re-keys order from email into Salesforce",
      "pain_points": ["double entry", "no audit trail"]
    }
  ],
  "to_be_steps": [
    {
      "step_id": "tobe-001",
      "actor": "Salesforce Platform",
      "description": "Order auto-created from inbound API payload",
      "automation_tier": "INTEGRATION",
      "decision_tree_branch": "automation-selection.md Q11 → REST API + Apex custom endpoint",
      "recommended_agents": ["build-agentforce-action", "object-designer"]
    },
    {
      "step_id": "tobe-002",
      "actor": "Salesforce Platform",
      "description": "Validate credit limit on Account before activation",
      "automation_tier": "FLOW",
      "decision_tree_branch": "automation-selection.md Q2 → Before-save record-triggered Flow",
      "recommended_agents": ["build-flow"]
    }
  ],
  "manual_residue": [
    {
      "step_id": "manual-001",
      "description": "Sales Ops reviews flagged orders > $250k",
      "reason": "Regulatory: financial threshold requires human sign-off"
    }
  ],
  "exception_paths": [
    {
      "decision_id": "credit-check",
      "branches": [
        {"condition": "approved", "next_step": "tobe-002"},
        {"condition": "rejected", "next_step": "manual-001"},
        {"condition": "credit_service_timeout", "next_step": "tobe-fallback-001"}
      ]
    }
  ]
}

This shape is enforced by scripts/check_process_map.py.


Common Patterns

Pattern 1: As-Is Walkthrough → To-Be Re-Lane

When to use: The business has an existing process they describe verbally or in a flat SOP document. There is no diagrammed As-Is.

How it works:

  1. Run a 60-minute walkthrough with the process owner and 2–3 front-line operators. Ask them to narrate one real instance end to end.
  2. Capture every step on a sticky note (or row in a table). Annotate each with the actor, the action verb, and any system of record touched.
  3. Group sticky notes into swim lanes by actor. Resist the temptation to group by phase — that hides responsibility transitions.
  4. Mark every cross-lane transition (a handoff). Handoffs are where pain points cluster.
  5. Document pain points per step explicitly: double entry, manual lookup, waiting for approval, missing audit trail.
  6. Now produce the To-Be by re-laning: ask, for each As-Is handoff, "could the Salesforce platform lane absorb this step?" If yes, add it to the To-Be Salesforce Platform lane and tag it with the appropriate automation tier per automation-selection.md.

Why not skip the As-Is: A To-Be without an As-Is is not a process map — it is wishful thinking. The As-Is provides the ground truth of what currently happens, and the pain points justify each automation candidate. Skipping the As-Is is the single most common failure mode in process mapping projects.

Pattern 2: Automation Candidate Annotation Pass

When to use: The To-Be diagram is drafted but steps are unannotated. Build team is asking "is this Flow or Apex?".

How it works:

  1. For each To-Be step, walk through standards/decision-trees/automation-selection.md top-to-bottom. Stop at the first decision branch that resolves the technology choice.
  2. Annotate the step with the tier in square brackets and the decision-tree branch citation.
  3. If the step is a callout, also walk integration-pattern-selection.md and add a sub-tier annotation (e.g., [INTEGRATION:REST] vs [INTEGRATION:PE]).
  4. If the step is async or scheduled, walk async-selection.md and tag the async pattern.
  5. If a step has no clear tier (decision tree gives no answer), flag it as [OPEN] and add it to the open questions log. Do not guess.
  6. Cross-check that the tier distribution is realistic. A To-Be that is 100% [FLOW] is suspicious — most processes have at least one [APEX], [INTEGRATION], or [MANUAL] step.

Why not freestyle: Without a decision-tree citation, two practitioners will reach different conclusions and the build team will inherit a routing argument. The tree is the tie-breaker.

Pattern 3: Manual Residue as a First-Class Output

When to use: Stakeholders are pushing for "automate everything". The To-Be is starting to look like an unrealistic green field.

How it works:

  1. List every step that is intentionally manual in the To-Be. Each row gets: step_id, actor, description, and a "why manual" reason chosen from: judgement call, regulatory requirement, low volume (not worth automating), high change cost (process is in flux).
  2. Confirm each manual residue row with the process owner. Get an explicit "yes, this stays manual" sign-off.
  3. Treat manual residue as a feature, not a gap. The map is honest about what humans still own.
  4. Surface the manual residue list to the build agents — they need to know what NOT to attempt to automate.

Why this matters: "Automate everything" is the most expensive anti-pattern in Salesforce projects. Steps that involve human judgement, low-volume edge cases, or regulatory sign-off should remain manual. The map is more credible — and the build is faster — when manual residue is documented up front.


Decision Guidance

SituationRecommended ApproachReason
Customer fills out a form or signs a contract as part of the processAdd a Customer swim laneOtherwise the customer-facing handoff is invisible; B2C maps fail without it
Two systems exchange data in the process (e.g., SF + ERP)One swim lane per integration, named after the systemLumping into one "Integration" lane hides handshake steps and exception paths
Decision diamond has only one outgoing branchRe-frame — it is not a decisionA real decision has ≥2 branches; a single-branch "decision" is a step
Step is unclear whether Flow or ApexWalk automation-selection.md until a branch resolvesThe tree is authoritative; do not freestyle
Stakeholder wants every step automatedPush back with the manual residue conceptSome steps stay manual on purpose; the map must say so explicitly
Process spans more than 30 stepsSplit into sub-processes with named handoff pointsMaps over 30 steps lose readability and cannot be validated
External system can fail mid-processAdd an exception path with timeout / fallbackHappy-path-only maps fail at build when the dev asks "what if it times out?"
Step requires regulatory sign-offTag as [APPROVAL], not [FLOW]Approval Process gives auditability; Flow alone does not

Recommended Workflow

Step-by-step instructions for an AI agent or practitioner activating this skill:

  1. Identify actors and draw the swim lanes. Confirm the four canonical actor categories: human roles, Salesforce platform, named integrations, customer / external counterparty. Add the customer lane explicitly even if the team did not mention it. Cap at 4–7 lanes; if more, the process scope is too broad and should be split.
  2. Map the As-Is steps and annotate pain points. For every step, capture actor, action verb, system of record, and any pain point (double entry, waiting, manual lookup, missing audit). Mark every cross-lane transition as a handoff — handoffs are where automation value concentrates.
  3. Map the To-Be steps and annotate each with an automation tier. For every step, walk standards/decision-trees/automation-selection.md top-to-bottom and tag with exactly one tier from the enum: [FLOW], [APEX], [APPROVAL], [PLATFORM_EVENT], [INTEGRATION], [MANUAL]. Steps with no clear tier go to [OPEN] and the open questions log.
  4. Cite the automation-selection decision-tree branch per candidate. Each automated step must list the specific tree question that resolved its tier (e.g., "automation-selection.md Q2 → Before-save record-triggered Flow"). This citation is what makes the map auditable — and what lets the build agents validate they followed the correct guidance.
  5. Flag manual residue with reasons. Every step intentionally left manual gets a row in the manual residue table with one of: judgement call, regulatory, low volume, high change cost. Get explicit process-owner sign-off on each. Resist "automate everything" pressure.
  6. Document exception paths for every decision diamond and integration handshake. The four canonical exception classes are timeout, validation rejection, authorization failure, manual override. Maps without these are incomplete.
  7. Hand off candidates to the matching run-time agent. For each [FLOW] step, recommend /build-flow. For [APEX] steps, the appropriate apex builder. For [APPROVAL], the approval-processes skill. For new objects implied by the To-Be, /design-object. For agent-driven steps, /build-agentforce-action. Produce the handoff JSON with process_id, as_is_steps[], to_be_steps[], each step carrying actor / description / automation_tier / recommended_agents[].

Review Checklist

Run through these before marking the process map complete:

  • Every swim lane has an explicit actor (role, platform, named integration, or customer)
  • The customer / external-counterparty lane is present when the process touches a customer
  • Every As-Is step has a pain-point annotation or is explicitly marked "no pain"
  • Every To-Be step carries exactly one automation tier from the enum
  • Every automated step cites the automation-selection.md branch that resolved its tier
  • Every decision diamond has ≥2 outgoing branches with conditions labelled
  • Every integration handshake has a timeout / fallback exception path
  • Manual residue table is populated and signed off by the process owner
  • Open questions log is empty (or every item has a named owner and target date)
  • Handoff JSON validates against scripts/check_process_map.py
  • Number of lanes is between 4 and 7; otherwise scope is split

Salesforce-Specific Gotchas

Non-obvious platform behaviors that cause real production problems:

  1. The "Salesforce Platform" lane is not one thing — it covers Flow, Apex, validation rules, sharing, assignment rules, and approval processes — Mapping every automated step into a single platform lane loses the tier distinction. Use the [FLOW] / [APEX] / [APPROVAL] annotations to preserve it. The build team needs to know which sub-tool to reach for.
  2. A process map with no [APPROVAL] tier is suspicious — Most non-trivial business processes have at least one approval step (financial threshold, manager sign-off, regulatory review). Maps that show every approval as a [FLOW] typically miss the audit-trail and approver-history features the Approval Process gives for free.
  3. Integration steps must be paired with integration-pattern-selection.md — Tagging a step [INTEGRATION] is not enough. The choice between REST callout, Bulk API, Platform Event, CDC, Pub/Sub, Salesforce Connect, and MuleSoft is itself a decision that the integration tree resolves. Skipping that resolution leaves the build team to guess.
  4. Backward branches in a decision diamond are silently allowed unless documented — If a decision diamond's "No" branch loops back to an earlier step (a rework loop), the platform will not warn that this creates a potential infinite loop. The map must call out rework loops explicitly so the build team adds a circuit-breaker (e.g., a max-attempts counter on the record).
  5. Customer-facing steps that depend on email or portal action are not "automated" steps — A step like "customer signs DocuSign" is the customer's action, not Salesforce's. It belongs in the Customer lane with no automation tier. Tagging it [INTEGRATION] because DocuSign is integrated is wrong — the integration is the callout, not the signing.
  6. Process maps drift during build unless versioned — The most common failure: the As-Is map gets written, the team starts building, the To-Be evolves in conversation, and three weeks later nobody can find the version that drove the build. Commit the JSON handoff to source control alongside the build artifacts.

Output Artifacts

ArtifactDescription
As-Is process mapMermaid swim-lane diagram with actor, action, system of record, and pain-point annotation per step
To-Be process mapMermaid swim-lane diagram with each step annotated by automation tier and decision-tree citation
Automation candidate tableOne row per automated To-Be step: step_id, actor, description, tier, decision-tree branch, recommended agent
Manual residue tableOne row per intentionally-manual step: step_id, actor, description, "why manual" reason
Exception path catalogueOne row per decision diamond and integration handshake: timeout / validation / auth / override branches
Handoff JSONMachine-readable payload conforming to scripts/check_process_map.py schema; consumed by /build-flow, /build-agentforce-action, /design-object
Open questions logUnresolved tier choices or stakeholder disagreements with named owner and target resolution date

Related Skills

  • requirements-gathering-for-sf — broader user-story-driven discovery; this skill produces the process-map artifact that requirements gathering references
  • sales-process-mapping — sales-stage-specific variant; use when the process is opportunity stage progression
  • fundraising-process-mapping — nonprofit donor stewardship variant
  • fsl-scheduling-policies — FSL appointment scheduling variant
  • persona-and-journey-mapping-sf — UI-side user journey companion; pair with this skill to cover both process and journey perspectives
  • approval-processes — consumed by [APPROVAL]-tagged steps in the To-Be
  • flow/record-triggered-flow-patterns — consumed by [FLOW]-tagged steps

Related Decision Trees

  • standards/decision-trees/automation-selection.md — primary tree for tier annotation
  • standards/decision-trees/async-selection.md — for async / scheduled steps
  • standards/decision-trees/integration-pattern-selection.md — for [INTEGRATION] step sub-tier

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill when writing test-first, behavior-driven acceptance criteria in Given/When/Then format for a Salesforce user story. Covers happy path, edge cases, negative paths, permission boundaries, and data-state preconditions so the AC block can drive UAT scripts and Apex test design downstream. Trigger keywords: given when then, gherkin, behavior driven AC, test first acceptance criteria, scenario outline, BDD acceptance criteria. NOT for the user-story format itself (use admin/user-story-writing-for-salesforce). NOT for UAT script writing (use admin/uat-test-case-design). NOT for Apex test method generation (use agents/test-class-generator). NOT for high-level UAT planning (use admin/uat-and-acceptance-criteria). More triggers: acceptance criteria record, ac_id, req_id on a criterion, artefact under test, negative case for a rule-type requirement, no-match fall-through criterion, oracle for a Then clause, test type apex flow manual, criteria linter, check_ac_format.py, --manifest-dir.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Task and Event objects: polymorphic WhatId/WhoId, Activity object model, ActivityHistory vs OpenActivity, activity timeline customization, bulk task creation, Einstein Activity Capture boundaries. NOT for turning on EAC or calendar sync — use admin/einstein-activity-capture-setup. NOT for Email-to-Case — use admin/case-management-setup. Covers ActivitiesSettings metadata, enableActivities, shared Task/Event custom fields and FLS, TaskStatus value sets, Shared Activities and TaskRelation/EventRelation, recurring and child activities, and partial-success bulk DML on Task.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Design Invocable Apex actions that return deterministic, agent-friendly errors instead of surfacing raw exceptions to the LLM. NOT for authoring the action itself — @InvocableMethod schema, labels, security context — use agentforce/custom-agent-actions-apex. NOT for the Apex tests that force each error branch — use agentforce/agent-action-unit-tests.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Use when designing how an Agentforce agent extracts structured input parameters (slots) from a user's natural-language utterance to invoke an action. Triggers: 'agent extract date from user', 'agent action argument extraction', 'agentforce slot filling', 'agent invocable input mapping', 'agent fails to fill required parameter'. NOT for action authoring (use agentforce/agent-actions) or for prompt-template variable binding (use agentforce/prompt-builder-templates).

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Apex test patterns for @InvocableMethod agent actions: per-reason-code branch coverage, bulk safety, callout mocking, deterministic assertions. NOT for testing whether the agent routes to the right topic or answers well — use agentforce/agent-testing-and-evaluation. NOT for designing the error envelope the tests assert on — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Designing or reviewing Agentforce actions: Flow actions, Apex invocable actions, prompt-template actions, action naming, input and output contracts, confirmation requirements, and safe error behavior. Triggers: 'agent actions', 'build an agent that can look up an order', 'make the agent able to check order status', 'give the agent a capability', 'agent that can retrieve a record', 'flow action for agent', 'agent invocable action', 'action schema design'. NOT for writing the Apex class itself — use agentforce/custom-agent-actions-apex. NOT for the reason_code error envelope that stops an agent retry loop — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

PranavNagrecha のスキルをすべて見る

このスキルの問題を報告する