Skip to Content
SahajFlowHelp Center
CRM

Pipelines and stages

What Is It?

A pipeline is the set of stages a deal moves through (for example Qualification → Proposal → Negotiation → Closed). A stage is one step in that pipeline, and may be marked closed to represent a terminal outcome.

Why Would I Use It?

The pipeline is your sales process made visible. It lets a team agree on what "qualified" means, shows where deals stall, and makes forecasting possible.

Before You Begin

  • A workspace with CRM enabled.
  • crm.pipeline.view to read; create/update/delete to manage (OWNER, ADMIN, MANAGER).
  • An understanding of whether you need one pipeline or several sales motions.

Where Can I Find It?

The pipeline and stage controls are reached from CRM → Opportunities (/dashboard/crm/opportunities). The backend routes are /api/v1/crm/pipelines/ and /api/v1/crm/pipelines/\{id\}/stages/.

How Does It Work?

The one-default rule

Every workspace always keeps exactly one default pipeline. This is enforced by the database and the service:

  • Creating a workspace provisions the default pipeline and its standard stages.
  • The last default pipeline cannot be un-defaulted.
  • The last default pipeline cannot be archived.
  • Making another pipeline the default transfers the flag atomically.

Opportunities created without an explicit pipeline land in the default pipeline's first stage. That is why opportunity creation works in a brand-new workspace.

Stages

  • Stage names and order are unique among active stages within one pipeline.
  • is_closed marks a terminal stage. Moving an opportunity backwards out of a closed stage requires explicit allowance; closed is not quietly reopened.
  • Reordering is a two-phase update inside one transaction, so order uniqueness holds at every intermediate step.

Permissions

ActionPermissionRoles in V1
View pipelines/stagescrm.pipeline.viewAll roles
Create/update/archive pipelinecrm.pipeline.create/update/deleteOWNER, ADMIN, MANAGER
Create/update/reorder stagecrm.pipeline_stage.*OWNER, ADMIN, MANAGER
Move an opportunity between stagescrm.opportunity.move_stageOWNER, ADMIN

How to Use It

Add a pipeline

  1. Open the opportunities area and choose to manage pipelines.
  2. Create a pipeline with a name and optional description.
  3. Add stages in the order the deal should move.
  4. Mark the final stage of each outcome as closed (won/lost style).
  5. Save.

Change the default pipeline

  1. Choose the pipeline that should be default.
  2. Set it as default. The previous default becomes a normal pipeline in the same transaction.

Reorder stages

  1. Open the pipeline's stage list.
  2. Move a stage up or down.
  3. Save. The backend parks stages at temporary unique positions, then writes the final order ascending.

Archive a stage or pipeline

  1. Choose archive.
  2. If the pipeline is the only default, archiving is refused. Set another default first.
  3. Archived stages leave the active list; opportunities keep their history.

What Happens Next?

  • New opportunities use the default pipeline's first stage.
  • Stage changes are recorded as crm.opportunity.stage_changed activities.
  • Reports such as pipeline and conversion read from the same stages.

Important Things to Know

  • One default pipeline is a hard invariant, not a preference.
  • Closed stages are terminal by default. Reopening requires deliberate action.
  • A stage cannot move to another pipeline. An opportunity's stage must belong to its own pipeline.
  • Deleting a pipeline in use is blocked; archive instead.
  • Pipeline numbering does not exist — pipelines are named, not numbered.

Common Problems

SymptomLikely causeWhat to do
"Cannot unset the last default"InvariantSet another pipeline as default first
"Stage name already exists"Duplicate active stage name in that pipelineRename or archive the old stage
"Order already in use"Concurrent reorderRetry; the service serialises order writes
Opportunity creation failsWorkspace has no default pipelineRun ensure_default_pipelines; check the invariant
Move stage returns 403Role lacks crm.opportunity.move_stageOWNER/ADMIN action

On this page