State Machines

How HotCRM enforces valid status transitions on leads and opportunities — and how to extend the rules.

State Machines

Some objects have a strict lifecycle — a lead progresses from New to Working to Qualified, never jumping backwards into New. A state machine enforces these transitions so users can't put records into nonsensical states.

Where state machines apply

HotCRM uses state machines on:

  • LeadsNew → Working → Qualified → Converted / Disqualified
  • Opportunities — through the 7 stages Prospecting → Qualification → Proposal → Negotiation → Closed Won / Closed Lost / Closed Without Decision

Other objects (case, contract, campaign, quote) have status fields but use simpler workflow rules rather than full state machines, because their transitions are less strict.

The Lead state machine

        ┌──────────────┐
        │     New      │
        └──────┬───────┘
               │ Begin working

        ┌──────────────┐
        │   Working    │
        └──┬────────┬──┘
   Disqual │        │ Qualify
           ▼        ▼
   ┌────────────┐  ┌────────────┐
   │Disqualified│  │ Qualified  │
   └────────────┘  └─────┬──────┘
                         │ Convert

                  ┌────────────┐
                  │ Converted  │
                  └────────────┘

Allowed transitions:

FromToTrigger
NewWorkingManual ("Begin Working") or auto-update on first activity
WorkingQualifiedManual ("Mark Qualified")
WorkingDisqualifiedManual ("Disqualify") with required reason
QualifiedConvertedThe Convert wizard (creates account/contact/opportunity)
Disqualified(terminal)
Converted(terminal)

Disallowed: jumping from New directly to Converted; reverting Converted back to Working.

The Opportunity state machine

Prospecting → Qualification → Proposal → Negotiation

                            ┌─────────────────┼────────────────────────┐
                            ▼                 ▼                        ▼
                        Closed Won      Closed Lost        Closed Without Decision

Rules:

  • You can move forward through Prospecting → Qualification → Proposal → Negotiation freely.
  • You can move backwards (e.g., from Negotiation back to Proposal) — sometimes deals slip.
  • From any open stage, you can move to one of the three closed stages.
  • Once Closed, the opportunity is locked for amount/stage edits (except via reopen — admin only).

The system also enforces:

  • Close Date is required before moving to Proposal.
  • Amount is required before moving to Negotiation.
  • Won/Lost reason is required when entering Closed Lost or Closed Won.
  • Approval may be required to enter Closed Won if amount > $500K and discount approval hasn't been granted.

Why state machines matter

Without them, you get:

  • Reps marking leads Converted by accident.
  • Opportunities jumping from Prospecting to Closed Won (no real qualification done).
  • Inaccurate funnel reports because records skipped stages.

With them, your funnel report reflects reality — every win went through every stage.

Customising state machines

Admins can:

  • Add new statuses (e.g., Lead status = Nurturing for marketing follow-up).
  • Remove transitions (e.g., disallow going backwards through opportunity stages).
  • Add entry conditions (e.g., Cannot enter Proposal without a Decision Maker contact role).
  • Add exit conditions (e.g., Cannot leave Negotiation without an updated Close Date).
  • Trigger automation on each transition (workflow rule, flow, notification).

Configure at Setup → Object → Status → State Machine.

What users see

  • The status field on the record only shows valid next states in the dropdown.
  • Attempting a disallowed transition shows an error: "Cannot move from Converted back to Working."
  • Required fields for the new state are enforced — the user sees them inline before save.

State machines and the AI Copilot

The Copilot understands the state machine. When suggesting an action:

  • "Qualify this lead" → only suggested if status is Working.
  • "Convert this lead" → only suggested if status is Qualified.
  • "Mark this opportunity Closed Won" → only suggested if win conditions are met (amount, close date, win reason, approval if required).

This prevents the Copilot from suggesting illegal transitions.

Tips for admins

  • Don't over-constrain — too many transition rules become a friction tax on the team.
  • ✅ When adding a new status, decide the entry and exit conditions first — the rest follows.
  • ✅ Use state-machine transitions to trigger automation rather than running automation on every save — much more performant.
  • Test the wizard flows (convert lead, close opportunity) after every change.

Tips for users

  • If a status dropdown is missing the option you expect, the state machine is blocking it. Check the current status, what comes next, and what fields are required.
  • If you genuinely need to bypass the rule (e.g., importing legacy data), ask an admin — they have a "bypass state machine" permission they can grant temporarily.

On this page