Define pipeline
define_pipelineCreate an additional pipeline (a named stage sequence) for opportunities or a custom object. Omit stages to seed from the workspace's 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 that stage). Optionally pass default_for_types — the opportunity type value keys this pipeline should be the default for, so new deals of a mapped type start on it (a type can map to only 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 | The workspace's opportunity `type` VALUE KEYS this pipeline is the default for. New deals of a mapped type start on this pipeline. A type can map to only one pipeline (a double-claim is rejected); an unknown type key is rejected with the known keys. Registry data — not fixed type names. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pipeline | No |