# When Called by Another Workflow

Start a workflow when another workflow runs it as a Sub-flow.

## Start a workflow

### When Called by Another Workflow

Runs when another workflow calls this one with a Sub-flow step. Whatever that step sends as Input lands on the trigger’s data exactly as declared below.

- **Expected Input · Optional**: A sample of the input this workflow expects. It is the contract: the calling Sub-flow step pre-fills its Input from it, and testing this workflow here replays it, so what you build against is what you receive.

A later step reads the input by its own keys, such as `{{trigger.orderId}}` for an input declared as `orderId`. See [Use data from earlier steps](https://docs.gorunner.io/build/use-data-from-earlier-steps).

For a step-by-step guide, see [Run another workflow](https://docs.gorunner.io/build/run-another-workflow).

Not in your list? See [When an app isn’t here](https://docs.gorunner.io/apps/when-an-app-isnt-here#q-not-in-list).

## For developers

In the API, which calls apps pieces, When Called by Another Workflow is `pieceId: "callable"`. Its trigger is `callable` / `called_by_flow`. [Get an app](https://docs.gorunner.io/api/apps/get-app) returns every field.

Source: https://docs.gorunner.io/apps/when-called-by-another-workflow
