Customization/Pipeline

Pipeline

Change the sales stages, chances to close, lost reasons and lead sources your product starts with, and decide what people can change in Settings.

What Settings › Pipeline changes

In the app, Settings › Pipeline lets an admin rename each stage, pick its colour, set its chance to close, edit the lost reasons and rename the lead sources. Those choices are part of the workspace settings (AdminProvider, saved as accordion:admin) and are applied to the shared tables in src/lib/data/leads.ts by applyWorkspaceConfig in src/lib/workspace-config.ts, so every screen, chart, workflow and Rune answer uses them.

SettingDefaultUsed for
Stage names and coloursNew, Qualified, Proposal, Negotiation, Won, LostPills, the stage stepper, kanban columns, the funnel, ⌘K
Chance to close10%, 25%, 50%, 75%, then 100% and 0%Weighted pipeline and the forecast
Lost reasonsPrice, Timing, Chose a competitor, No budget, No response, OtherThe Mark lost dialog and reports
Source namesWebsite form, Referral, Email, Event, Outbound, Partner, ImportThe Source column, filters and the Pipeline by source card

Change the defaults

The starting values for a new workspace are DEFAULT_LEAD_STAGES and lostReasons in src/lib/data/admin.ts. Change them there to give your product its own sales process.

src/lib/data/admin.ts
export const DEFAULT_LEAD_STAGES: Record<LeadStageId, LeadStageConfig> = {
  new: { label: "Inbound", color: "gray", probability: 5, description: "…" },
  qualified: { label: "Discovery", color: "blue", probability: 20, description: "…" },
  proposal: { label: "Demo done", color: "violet", probability: 40, description: "…" },
  negotiation: { label: "Contracting", color: "amber", probability: 80, description: "…" },
  won: { label: "Won", color: "green", probability: 100, description: "…" },
  lost: { label: "Lost", color: "red", probability: 0, description: "…" },
}

Keep LEAD_STAGE in src/lib/data/leads.ts in step with these defaults: it's what screens show before the workspace settings load. Colours come from the swatches in SWATCHES, which have light and dark versions.

A single lead can override its stage's chance with probability. Won always counts as 100% and Lost as 0%.

Sources

Source ids (website, referral, email, event, outbound, partner, import) are fixed in LeadSource and LEAD_SOURCES, so reports stay comparable; Settings only renames them. To add a source, add its id to LeadSource and an entry to LEAD_SOURCES.

When a lead goes quiet

An open lead with no activity for QUIET_DAYS (7) is flagged as gone quiet: on the Leads page, the Inbox, the dashboard and the "Lead goes quiet" workflow. Change the number in src/lib/data/leads.ts.

Changing the stages themselves

The order of stages and the number of open stages are fixed on purpose: winning a lead, the funnel, the forecast, win rate and the lead workflows all rely on them. Renaming covers most needs. If your process needs another stage:

  1. Add its id to LeadStage, OPEN_STAGES and LEAD_STAGE in src/lib/data/leads.ts, and to DEFAULT_LEAD_STAGES.
  2. Search the project for OPEN_STAGES and LEAD_STAGE_ORDER to check the kanban, the funnel and the stepper, and for "negotiation" to find places that name a stage directly.
  3. Move saved leads in your database to the new stage where needed.