Pipelines & Deals
Overview

Pipelines & Deals

Gordon CRM includes a sales pipeline engine that lets teams track deals through visual stages from initial lead to close. The module is gated behind the deals module toggle — workspaces that don't need sales tracking can leave it disabled.

Core Concepts

Pipelines

A pipeline represents a sales process or workflow. Each workspace can create multiple pipelines for different purposes (e.g. "Sales Pipeline", "Recruiting", "Project Tracking"). Pipelines are structural data — only Admins and Owners can create, edit, or delete them.

Stages

Each pipeline contains an ordered set of stages that deals move through (e.g. Lead → Proposal → Negotiation). Stages are ordered by an order_index and can be renamed, reordered, added, or removed by Admins.

Deals

A deal is a revenue opportunity linked to a Contact (required) and optionally to a Company. Deals sit on a specific stage within a pipeline and carry a monetary value and a status (open, won, or lost).

Data Model

TablePurposeKey Columns
pipelinesSales process definitionname, workspace_id
pipeline_stagesOrdered steps within a pipelinename, order_index, pipeline_id
dealsRevenue opportunitiestitle, value, status, contact_id, company_id, pipeline_stage_id, assigned_user_id, closed_at
deal_paymentsPayment tracking against dealslabel, expected_amount, paid_amount, status, deal_id

Deal Status Lifecycle

open → won    (sets closed_at, fires deal_status_changed automation)
open → lost   (sets closed_at, fires deal_status_changed automation)
won  → open   (clears closed_at, reopens deal)
lost → open   (clears closed_at, reopens deal)

RBAC

Pipelines & Stages follow the Structural Data access model — only Admins and Owners can create, modify, or delete them.

Deals follow the Operational Data access model — all members can create and edit deals, but only Admins and Owners can delete them.

EntityCreateReadEditDelete
PipelinesAdmin+AllAdmin+Admin+
StagesAdmin+AllAdmin+Admin+
DealsAllAllAllAdmin+

Automation Integration

Deal transitions fire automation triggers that connect into the unified automation engine:

Trigger TypeFires WhenTrigger ID Format
deal_stage_changedA deal is moved to a new stageStage UUID
deal_status_changedA deal is marked as Won or Lost{pipelineId}_{status} (composite)

Since every deal requires a linked contact, the automation engine always has a contact context available when these triggers fire.

Next Steps

  • Pipelines & Stages — Creating, configuring, and managing pipelines.
  • Deals — Deal CRUD, entity linking, and status transitions.
  • Payments & Revenue — Payment schedules, recording, progress tracking, and dashboard integration.
  • Kanban Board — Visual drag-and-drop deal management.