Federated from workspace ·
PRD-000·zaixos-company-platform/app/Modules/Commercial/README.mdDo not edit canonical truth here — update the source repo, then re-runnpm run docs:sync.
Commercial
Commercial pipeline for PRD-000 — leads and opportunities after proposal generation.
Status: WP-PRD000-06 — Commercial Pipeline
Traceability chain
Discovery Session → Proposal → Commercial Lead → Commercial OpportunityResponsibilities
| Component | Role |
|---|---|
CreateLeadFromProposalAction | Creates lead + opportunity from generated proposal |
CommercialPipelineService | Stage transitions and domain events |
CommercialConversationRouter | Routes post-proposal commercial intents (not discovery) |
Commercial stages
new · qualified · discovery_complete · proposal_sent · customer_reviewing · accepted · rejected · closed_won · closed_lost
API
| Method | Path | Description |
|---|---|---|
POST | /api/v1/commercial/leads | Create lead from { proposal_id } |
GET | /api/v1/commercial/leads/{id} | Fetch lead with traceability |
GET | /api/v1/commercial/opportunities/{id} | Fetch opportunity |
PATCH | /api/v1/commercial/opportunities/{id}/stage | Update pipeline stage |
POST | /api/v1/commercial/conversation | Route commercial intent { lead_id, message } |
Conversation intents
Pricing · Send proposal · Start · Contact sales · Schedule meeting
These routes continue the commercial conversation after proposal generation and do not restart discovery.
Boundaries
- Not CRM — separate bounded context from
App\Modules\CRM - No workspace, payments, or quotations
- Reads proposal/discovery data via DB snapshot readers (no cross-module Infrastructure imports)
Tests
bash
php artisan test --filter=Commercial