system-prompts-and-models-o.../dealix/auto_client_acquisition/revenue_launch/pipeline_tracker.py
Sami Assiri b13cb389cc feat(dealix): sync full Dealix package to repo
- API routers, ACA modules, integrations (draft operators)
- Docs, landing pages, scripts (launch readiness, scorecard)
- Tests and CI workflow updates for Dealix

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-01 21:01:17 +03:00

50 lines
1.4 KiB
Python

"""Simple pipeline schema for founder-led beta — in-memory demo only."""
from __future__ import annotations
from typing import Any
STAGES = [
"identified",
"contacted",
"replied",
"demo_booked",
"diagnostic_sent",
"pilot_offered",
"paid",
"lost",
]
def build_pipeline_schema() -> dict[str, Any]:
return {
"stages": STAGES,
"fields_ar": ["company", "person", "segment", "channel", "stage", "next_step_ar", "notes"],
"demo": True,
}
def add_prospect(company: str, person: str, segment: str, channel: str) -> dict[str, Any]:
return {
"id": f"prospect_{hash(company + person) % 10_000_000}",
"company": company,
"person": person,
"segment": segment,
"channel": channel,
"stage": "identified",
"demo": True,
}
def update_stage(prospect_id: str, new_stage: str) -> dict[str, Any]:
st = new_stage if new_stage in STAGES else "identified"
return {"id": prospect_id, "stage": st, "ok": True, "demo": True}
def summarize_pipeline(prospects: list[dict[str, Any]] | None = None) -> dict[str, Any]:
rows = prospects or []
counts: dict[str, int] = {s: 0 for s in STAGES}
for r in rows:
counts[r.get("stage", "identified")] = counts.get(r.get("stage", "identified"), 0) + 1
return {"counts_by_stage": counts, "total": len(rows), "demo": True}