# Flows FAQ

## What counts as a trigger?
A flow fires on a **product lifecycle event** (install, uninstall, subscribe,
churn, plan change, trial start/convert/expire, review posted, rank moved), on a
**usage event** your product sends through the SDK, or on a **form submission**.
A flow scoped to one app only sees that app's events; a flow scoped to "any app"
sees them all.

## In what order do steps run?
Top to bottom, one step at a time, within a single run. A **Wait** step parks the
run rather than blocking a worker — `flows:tick` sweeps parked runs every minute
and resumes the ones that are due. An **Action group** runs its children in order
before the flow continues past it.

## What happens when a branch converges?
An **If / else** step routes the run down one side. Both sides continue into
whatever follows the branch, so a step placed after the condition runs regardless
of which way the run went. Put steps *inside* a branch if they should be
exclusive.

## What if a step fails?
The run is retried up to **3 times** with a 10s / 30s / 60s backoff — enough to
ride out a transient mail, Slack or webhook failure. After that the run is marked
`failed` and logged with its context.

One case is handled separately: if an email step cannot resolve a recipient yet
(the identify call has not landed), the send is **deferred** and retried up to 6
times, five minutes apart, before the run gives up on it.

## A worker was killed mid-run. Is the run stuck?
No. Only `completed` is terminal, so a run left in `running` by an OOM, a SIGKILL
or an Octane reload is recovered on the next tick once its lock expires (10
minutes). It resumes rather than starting over.

## What happens to parked runs if I pause a flow?
They **freeze** — parked runs of an inactive flow are skipped by the tick and stay
`waiting`. Re-activating the flow thaws them; because their due time has already
passed, the next tick picks them straight up. Pausing is therefore safe and
reversible; it never drops in-flight runs.

## Are webhook actions safe to point anywhere?
They are validated first. Every outbound webhook URL is resolved and checked
against internal address ranges, and the connection is **pinned to the resolved
IP** so it cannot be re-pointed at an internal host between the check and the
request. A URL that fails the check is refused, not silently skipped.

## How do I debug a run?
**Flows → Logs** lists every run with its status (`pending`, `running`,
`waiting`, `completed`, `failed`, `cancelled`). Open one for the per-step trace,
including what each step decided and why a condition sent the run the way it did.

## How do I test without spamming anyone?
Duplicate the flow, scope it to a single app, and fire the trigger manually from
the flow's own page. A duplicate carries its action groups intact, so the copy
behaves like the original.

## Related
- [Creating your first flow](creating.md) · [Testing & runs](testing-and-runs.md) · [Flow templates](templates.md)
