Knowledge Portal · engineering documentation

Skip to content

Federated from workspace · PRD-000 · zaixos-company-platform/app/Modules/Commercial/README.md Do not edit canonical truth here — update the source repo, then re-run npm 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 Opportunity

Responsibilities

ComponentRole
CreateLeadFromProposalActionCreates lead + opportunity from generated proposal
CommercialPipelineServiceStage transitions and domain events
CommercialConversationRouterRoutes post-proposal commercial intents (not discovery)

Commercial stages

new · qualified · discovery_complete · proposal_sent · customer_reviewing · accepted · rejected · closed_won · closed_lost

API

MethodPathDescription
POST/api/v1/commercial/leadsCreate 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}/stageUpdate pipeline stage
POST/api/v1/commercial/conversationRoute 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

ZAIXOS Knowledge Portal — public engineering docs at /docs · Staff operations at /admin