Define pipeline
define_pipelineCreate an additional pipeline (a named stage sequence) for opportunities or a custom object. Omit stages to seed from the workspace default pipeline, or pass stages as [{key, label, role, is_closed?, is_won?, requires?, requires_mode?}] (role one of unqualified/qualifying/active/commit/won/lost; requires lists the field keys a deal must have filled to enter the stage). default_for_types names the opportunity type keys this pipeline is the default for, so new deals of a mapped type start on it (a type maps to one pipeline). Returns the created pipeline.
When to use: When a motion needs its own stage sequence — e.g. an investor raise separate from the customer pipeline. Optionally set which deal types default onto it.
Example: Create an investor pipeline: Intro, Pitch, Diligence, Committed, Invested.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | Display name. Its slug (lowercase, underscores) becomes the stable pipeline_key, which must be unique in the workspace. | |
| stages | No | Ordered stages [{key,label,role,is_closed?,is_won?,requires?,requires_mode?}], role unqualified/qualifying/active/commit/won/lost; omit or [] copies the default pipeline's stages. | |
| applies_to | No | The object key this pipeline runs on (e.g. opportunity). Defaults to opportunity when omitted. | |
| default_for_types | No | Opportunity `type` value keys this pipeline is the default for: new deals of a mapped type start on it. A type maps to one pipeline (a double claim is rejected; an unknown key is rejected with the known keys). Registry value keys, not fixed type names. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pipeline | No |