Return True

Overview

Return true immediately terminates the flow and returns a success result. This is a terminal stage, use it to end the flow with a successful outcome, regardless of what happened before.

Configuration

This stage has no configuration fields. Only stage comment/notes are available.

Exit Points

This stage has no exit points - it terminates the flow immediately.

Result: Flow status set to Success

How It Works

When executed, the stage:

  1. Terminates flow immediately - No further stages execute
  2. Returns success status - Flow marked as successful
  3. Preserves all variables - Accumulated variables remain available in response

Key behavior: Always succeeds, always terminates flow, no conditions or configuration.

Common Use Cases

1. Simple Success Return

End flow after successful processing.

  • Process data (any stages)
  • Add To Response: status success
  • Return true

Result: Flow ends with success status, response includes status field.

2. Conditional Success

Return success only if condition is met.

  • Route Flow: {{status}} Equal Active
  • Pass branch:
  • Add To Response: result → Active user found
  • Return true
  • Fail branch:
  • Return false

Result: Success if status = Active, failure otherwise.

3. Multiple Branches Converge

Different processing paths all end with success.

  • Route Flow: Check  {{type}}
  • Pass (type = "Premium"):
  • Call API: Process premium order
  • Add To Response: tier → premium
  • Return true
  • Fail:
  • Return false

Result: Success only for premium users.

Best Practices

  • ✓ Place after all response data is added (Add To Response stages must come BEFORE Return true)
  • ✓ Combine with Route Flow to conditionally return success
  • ✓ Use as explicit success indicator in complex flows
  • ✓ Add stage comment to document the success condition (e.g., "Success - all validation passed")
  • ✓ Pair with Return false for clear success/failure paths

Common Mistakes

MistakeSymptomFix 
Expecting conditionsStage always succeeds regardless of prior stagesThis stage always succeeds - use Route Flow before it for conditional logic
Connecting output to Return trueCan't connect stages after Return trueTerminal stage has no exit points - nothing connects to it
Multiple returns in sequenceOnly first Return true executesFlow terminates at first Return true - subsequent stages don't run
Response incompleteExpected fields missing from responseAdd all fields BEFORE Return true, not after (flow terminates immediately)

Troubleshooting

IssueCommon CauseFix 
Flow still continuesAnother stage connected after Return trueRemove/reconnect stages - Return true must be last
Status shows failedUsed Return false instead of Return trueUse Return true for success outcome
Response emptyNo Add To Response stages before Return trueAdd response fields before this stage
Response fields missingAdd To Response stages placed after Return trueMove Add To Response stages BEFORE Return true

Do's and Don'ts

Do:

  • ✓ Use at end of successful processing branch
  • ✓ Combine with Route Flow to conditionally return success
  • ✓ Place after all response data is added (Add To Response stages)
  • ✓ Use as explicit success indicator in complex flows

Don't:

  • ✗ Expect further stages to execute after Return true
  • ✗ Use multiple Return true stages in sequence (second won't execute)
  • ✗ Connect anything to return points (there are none)
  • ✗ Use when you need Fail exit (use Return false instead)

Edge Cases

  • No prior stages: Return true still succeeds (can use as bare flow)
  • Variables not initialized: Variables don't affect outcome (always succeeds)
  • Response building before Return true: All added fields included in response
  • Called after Fail stages: This stage still returns success (not conditional on prior failures)

Related Stages

  • Return false: Terminate with failure instead of success
  • Return Dictionary: Return all variables instead of empty response
  • Add To Response (Fixed/Dynamic): Add fields before returning success
  • Route Flow: Conditionally choose Return true vs Return false

Was this article helpful?