Claude Code can help turn a business requirement into Salesforce Flow metadata quickly. The part that still needs care is deciding whether that Flow will behave properly in your org.

A successful deployment means Salesforce accepted the metadata and any required deployment checks passed. It does not prove the business logic is right, the automation handles bulk updates, or the next integration run won’t create 300 duplicate tasks.

The review matters whether AI wrote the whole Flow or changed three elements in an existing one.

This checklist focuses on record-triggered Flows. Screen Flows and other Flow types need additional checks for their interfaces, launch methods and execution context.

Before you start: make the change reviewable

Use a sandbox or scratch org for development and testing. Confirm the target org before any command that changes metadata or data.

For a new Flow, ask Claude to generate Draft metadata and leave activation to your agreed release process. Draft appears as Inactive in the Salesforce UI. For an existing Flow, work on a new inactive version and identify which version is currently active.[1]

Keep the retrieved baseline and proposed change in version control. Review the diff, meaning the actual changes between versions, and open the result in Flow Builder.

Ask for four things alongside the implementation:

  • The requirement and assumptions.
  • The files and dependencies changed.
  • The tests performed and their actual results.
  • Anything that could not be verified.

“Looks good” is not a test result.

1. Is this the right automation, with a clear requirement?

Start with the outcome. Would a formula, validation rule or default value meet it more simply? Could an existing Flow be extended without making it difficult to maintain?

Then make the requirement specific.

“Create a task when an Opportunity closes” leaves several decisions unresolved:

  • Closed Won, Closed Lost, or both?
  • Records created already closed, records updated to closed, or both?
  • Who owns the task?
  • What happens if the Opportunity is reopened and closed again?
  • Does an existing completed task count as already handled?

These are business decisions. Letting AI guess them simply hides the decisions inside the implementation.

Inspect the existing automation on the affected objects, including related objects the Flow updates. Use Flow Trigger Explorer, but also check Apex triggers and any remaining legacy automation.

Where sequence matters, document it. Flow trigger order controls the order of comparable before-save or after-save Flows; it does not override Salesforce’s wider order of execution.[2]

Evidence to look for: a written requirement, agreed edge cases and a clear account of how the change fits existing automation.

2. Will it run at the right time, and avoid doing the job twice?

Check the Start element carefully: object, create/update/delete event, entry criteria and the setting that controls which updates qualify.

“Run whenever the record meets these conditions” and “run when the record changes to meet these conditions” can produce very different results.

Before-save is usually the starting point for changing fields on the triggering record. After-save supports work such as creating related records. Callouts need a supported transaction design: putting an action in an after-save Flow’s immediate path does not make an external callout safe. Salesforce documents asynchronous paths for callouts after the original save commits.[3]

Review repeat behaviour as well as recursion:

  • Recursion: one update triggers more updates that bring execution back to the same automation.
  • Duplicate work: another legitimate save or retry creates a second task, email or external request.

Test unrelated edits, reopen-and-close scenarios and repeat submissions. Editing a record twice is one useful test, but cannot prove every recursion path is safe.

If the business needs a bypass for controlled imports or maintenance, use the org’s agreed approach. A scoped Custom Permission can be appropriate, but a universal “bypass all Flows” permission should not be added automatically.

Define who can bypass, which automation is skipped and how omitted work will be reconciled.

Evidence to look for: a scenario list showing when the Flow runs, when it stays quiet and what happens on a repeat attempt.

3. Will it cope with real volumes and awkward data?

Avoid Get Records and database writes inside loops. Collect the records you need, process them in memory and perform collection-based writes outside the loop.

Salesforce bulkifies compatible operations across Flow interviews, but that does not automatically combine repeated database operations inside one interview’s loop.[4]

Also inspect subflows and Apex actions. A tidy-looking Flow can still call an inefficient implementation.

Test:

  • A single qualifying record.
  • A realistic bulk update, including a 200-record batch where relevant.
  • A larger run using the actual import or integration route.
  • A mixture of qualifying and non-qualifying records.
  • Records with many related records, missing relationships or unexpected values.

There is nothing special about 251 records. Crossing 200 can be useful, but batches and transactions are different concepts. An anonymous Apex script and a Data Loader job can exercise different transaction boundaries. Test the route you expect to use, rather than treating one record count as proof of scalability.[5]

Check totals as well as errors: if 80 of 200 records qualify, did exactly those 80 receive the intended outcome?

For each lookup, decide what should happen when there are zero, one or several matches. Do not let “get the first record” hide an ambiguous match.

Where many records update the same parent, include contention and record-locking scenarios in the test plan. More complex or high-volume designs may need an experienced developer’s review.

Evidence to look for: the test method, data shape, expected counts, actual counts and relevant errors or limits.

4. What happens when part of it fails?

“Add a fault path everywhere” is too blunt a rule.

For operations that support fault handling, choose the correct behaviour: stop the transaction, recover, or record the failure for follow-up. Document where Salesforce’s default failure behaviour is intentional.

Suppose the Flow updates an onboarding status and then fails to create the required task. Should the status update be allowed to commit?

A handled fault can allow earlier changes to remain. Salesforce’s Trailhead guidance demonstrates using a Custom Error element in a record-triggered Flow when the triggering change must be rolled back.[6]

A log entry alone does not guarantee the right business outcome.

Check three things:

  • Data integrity: which changes should commit or roll back?
  • Visibility: who will see the failure and have enough information to investigate?
  • Recovery: can the operation be retried without duplicating work?

Do not assume a custom error-log record written in the same transaction will survive a rollback. Verify the chosen logging mechanism, and avoid copying unnecessary customer information into notifications.

Governor-limit failures are another important exception: Salesforce states that exceeding a transaction limit rolls back the transaction even when a fault connector is defined.[7]

For work in later transactions or external systems, plan recovery separately. Reverting a Flow version cannot undo an email already sent or a change already accepted by another system.

Evidence to look for: a deliberately triggered failure, the resulting record state, a usable alert and a tested recovery step.

5. Are its references and permissions correct?

Check what Claude actually knows

A local Salesforce project is useful context, but it may be incomplete or out of date.

Ask Claude to identify the fields, objects, picklist values, record types, templates, permissions, subflows and actions it relies on. Verify them against current retrieved metadata or the relevant org.

“Not found locally” means unverified. It does not automatically mean the component is absent from Salesforce.

Review the API version and confirm that the target org supports the features used. Keep unrelated metadata changes out of the deployment.

Resolve environment-specific values properly

Look for hard-coded record IDs, URLs, usernames and addresses.

Moving a sandbox ID into a Custom Label does not make that ID portable. Custom Metadata can hold environment configuration, but its values still need to be correct in each target org.

Prefer stable keys where available. For example, a record-type lookup should identify both its object and developer name. Other objects need their own lookup strategy; DeveloperName is not a universal field.

Define what happens if the target configuration is missing or ambiguous.

Understand the actual run context

The advice “prefer user context” needs a qualification.

Record-triggered Flows run in system context without sharing. You cannot simply change them into user-context Flows. Screen and autolaunched Flows have different context options and launch behaviour.[8]

Review which records the automation can reach and which user-controlled values influence those operations. A user who can edit a source record should not accidentally gain an unintended route to change unrelated protected data.

Testing as a normal user remains useful. It does not make a record-triggered Flow enforce that user’s field permissions.

Review called Apex and subflows too; do not assume the top-level Flow tells the whole security story.

Evidence to look for: verified dependencies, target-org configuration and an explanation of the intended access boundaries.

6. Has it been tested against the requirement?

Write expected outcomes before running the tests. Otherwise it is too easy to accept whatever the Flow happens to do.

For the onboarding-task example, a practical test table could look like this:

ScenarioExpected result
Opportunity changes from open to wonOne onboarding task with the agreed owner and relationship
An unrelated field changes on a won OpportunityNo additional task
Opportunity becomes Closed LostNo onboarding task
Matching task already existsBehaviour follows the agreed duplicate rule
Opportunity is reopened and won againBehaviour follows the agreed repeat rule
Required configuration is missingAn explicit, observable failure or agreed fallback
Bulk update contains mixed recordsCorrect outcomes only for qualifying records
An authorised bypass is usedDefined automation is skipped and reconciliation is possible

Run tests through the real entry point as well as the debugger: a user save, import or integration request as appropriate. That helps expose interactions with other automation.

Use Salesforce’s automated Flow tests where supported. Current documentation says automatically evaluated scenarios do not support paths that run asynchronously. Test deferred work separately, including what happens if the record changes before that work executes.[9]

Use realistic user permissions and safe test destinations for notifications and integrations. Confirm that you are testing the intended Flow version.

For duplicate-sensitive integrations, an “existing record” lookup may be insufficient under concurrent requests. Ask for a stronger idempotency design when necessary: a repeated request must not repeat the business action.

Finally, have a business user check that the outcome is useful and correct.

Evidence to look for: recorded expected and actual results, the version tested and any remaining gaps.

7. Can you release, monitor and recover it?

The review continues through activation.

Include required dependencies in the release, either in a supported combined deployment or an appropriate sequence. Do not assume every dependency needs its own separate deployment.

Check the actual activation behaviour of your release method and org settings. Salesforce supports deploying Flows as active under configured conditions, so “deployment” and “activation” are not always separate events.[10]

Before release, record:

  • The reviewed commit and Flow version.
  • The activation step and responsible person or approved pipeline.
  • Any configuration or permission assignments needed.
  • The production checks and who will monitor them.
  • The recovery procedure and previous working version.
  • How affected data and external actions will be reconciled.

Reactivating a previous version can restore earlier logic. It does not repair data already changed by the new version.

If the Flow uses scheduled paths or paused interviews, check their specific lifecycle rules before switching versions or deactivating. Different kinds of pending work behave differently; do not assume one action cancels everything.[11]

Use the org’s naming standard and add descriptions that explain intent, assumptions and recovery. The next admin should be able to understand why the Flow exists and what to do when it fails.

Evidence to look for: a release record with an owner, monitoring checks and a realistic recovery plan.

Let AI and scanners help with the review

A separate AI review can be useful if you give it the requirement, metadata diff and relevant org context. Ask for element names and evidence behind each finding, plus a list of things it could not verify.

Treat it as another review aid. A fresh session can still make the same mistaken assumptions as the original.

Salesforce Code Analyzer includes a Flow Scanner engine. Check the rules available in your installed version and inspect the findings; a clean scan only means those rules did not identify a problem.[12]

Neither an AI reviewer nor a static scan can establish that the business requirement is right.

Put useful defaults in CLAUDE.md

Standing instructions can reduce repeated mistakes. Adapt these to your org:

## Salesforce Flow development rules

- Confirm the requirement, edge cases and existing automation before editing.
- Recommend a simpler declarative option when it meets the requirement.
- Use the approved sandbox or scratch org for development and tests.
- Confirm the target org before any command that changes metadata or data.
- Create new Flows as Draft; edit existing Flows as a new inactive version.
- Do not deploy to production or activate a Flow during this development task.
- Use the org's agreed release process for production changes.
- Make trigger conditions and repeat-run behaviour explicit.
- Use the existing bypass policy only where the requirement calls for it.
- Avoid queries and database writes inside loops; inspect called actions too.
- Define behaviour for missing and multiple lookup results.
- Choose failure and rollback behaviour deliberately.
- Do not hard-code environment-specific record IDs or assume labels fix them.
- Verify dependencies against current metadata or the org.
- Mark unavailable evidence as unverified rather than inventing components.
- Follow existing naming conventions and explain intent in descriptions.
- Return the diff, assumptions, dependencies, actual test results and gaps.

These instructions guide Claude’s work. They do not replace access controls, testing or release controls.

A release-ticket checklist

  • Requirement and edge cases agreed.
  • Existing automation and execution order reviewed.
  • Trigger conditions, repeat behaviour and any bypass verified.
  • Single-record, bulk, negative and edge-case tests passed.
  • Lookup results and target-org configuration handled.
  • Run context and access boundaries reviewed.
  • Failure, rollback, logging and recovery behaviour tested.
  • Asynchronous or scheduled work tested where used.
  • Metadata diff, dependencies and API compatibility reviewed.
  • Business outcome confirmed by an appropriate reviewer.
  • Activation, monitoring and recovery responsibilities recorded.

AI can reduce the effort of building a Flow. The useful result is automation you can explain, test and support after it reaches production.


Technical references

Checked 23 November 2026. Recommendations about review and release practices are an editorial framework; adapt them to your organisation. Salesforce features and supported testing options depend on the release and Flow type.

  1. Salesforce Metadata API: Flow
  2. Define the Run Order of Record-Triggered Flows
  3. Before-Save and After-Save Flows; Record-Triggered Flow Considerations
  4. Flow Bulkification in Transactions
  5. Apex Trigger Context Variables; Bulk Apex Triggers
  6. Trailhead: Roll Back Changes After an Error
  7. Per-Transaction Flow Limits
  8. Flow Run Context; Set Flow Run Context
  9. Automated Flow Testing Limits and Limitations; Testing Your Flow Before Activation
  10. Deploy Processes and Flows as Active; Plan and Prepare for Deployment
  11. Scheduled Paths; Activate or Deactivate a Flow
  12. Salesforce Code Analyzer: Flow Scanner Rules