solarOSsolarOS Docs
Concepts

A Lead is raw interest before you know if it's a real deal; it has its own LeadStatus (see Concepts: data model). Converting a Lead creates (or links) a Customer, Property, and Opportunity; from that point the Opportunity moves through OpportunityStage, not the Lead. Both the staff app (/api/leads/[id]/convert) and the Org API (/api/v1/leads/[id]/convert) expose this as an explicit convert action, not an automatic status flip.

TODO(owner, likely product): write this page from apps/web/src/lib/validations/lead.ts and apps/web/src/app/api/v1/leads/[id]/convert/route.ts: cover what a conversion requires (does it always create a new Customer/Property, or can it link existing ones?), what happens to the Lead's record after conversion (is it still queryable, does its status change), and whether a Lead can be converted more than once. Confirm against the convert route's Zod schema before writing anything definitive.

Was this page helpful?