Skip to main content
The --case <name> flag tells the CLI to load a saved Case when running a journey. Cases are named snapshots of value configuration — things like “Happy path”, “Missing funding source”, or “Expired token”. Passing --case autofills the run inputs and variables defined in that Case, so you don’t have to supply them manually.

When to use it

  • When you have Cases already saved in the editor and want to reuse them in the CLI or CI.
  • When you want different CI jobs to run the same journey against different value configurations without duplicating the journey.
  • When testing specific edge cases or regression scenarios by name.

Key concepts

Cases are saved in Reqflo, not in the CLI. You create and manage Cases in the journey editor. The CLI references them by name. If the case name doesn’t match, the run will fail with a clear error. Cases and environments are independent. A Case captures what values to use; an environment captures which system to target. You can combine --case with --env freely. --set overrides Case values. If you pass --set key=value alongside --case, the --set value takes precedence for that specific key. This lets you use a Case as a starting point and override individual values without modifying the Case itself.

How it works

When --case <name> is provided:
  1. The CLI fetches the named Case for the journey.
  2. Case values are loaded into the run’s value resolution context.
  3. Any --set overrides are applied on top.
  4. The journey runs with the resolved values.

Examples

Run with a saved case:
reqflo run my-journey --case "Happy path"
Run with a case and a specific environment:
reqflo run my-journey --case "Expired token" --env staging
Run with a case, then override one value:
reqflo run my-journey --case "Happy path" --set user_id=usr_test_999
Run with a case in the Cloud Runner:
reqflo run my-journey --case "Missing funding source" --cloud
Case names are case-sensitive and must match exactly as they appear in the editor. If the name contains spaces, wrap it in quotes.