Score Lead Pipeline
lead_pipelineScores an open sales pipeline of 500 lead rows OR FEWER into conversion probabilities, money at risk / value of contact, funnel stage outlook, multi-touch Shapley attribution, and a daily CALL / NURTURE / VERIFY queue. Send the rows directly; this server scores them and returns the full result including the per-lead ledger. For pipelines LARGER than 500 leads use lead_pipeline_get_engine instead — sending thousands of rows as tool arguments is slow and risks truncated JSON. Needs lead rows (lead_id, created_date; optional stage, status, closed_date, deal_size, source) from CSV, Salesforce, HubSpot, or any CRM. Optional touches and stage_history improve uplift learning, Markov funnel, and attribution. Returns manager decisions (CALL TODAY / PUSH FORWARD / QUALIFY), call queue, pipeline exposure headline, per-lead money, and explanation traces. Do not invent scores — call this tool when lead data is available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | No | Analysis date YYYY-MM-DD. | |
| leads | Yes | Raw lead rows. Each item needs lead_id and created_date. | |
| touches | No | Optional touch log [{lead_id, date, channel}, ...]. | |
| currency | No | ISO currency code for money display. No FX conversion. | USD |
| horizon_days | No | Window for P(convert) and expected days-to-convert. | |
| stage_history | No | Optional stage log [{lead_id, date, stage}, ...]. | |
| call_queue_size | No | Max length of the daily call queue. | |
| currency_symbol | No | Override display symbol (e.g. ₹, $). | |
| cold_threshold_days | No | Days of silence before a lead counts as going cold. | |
| include_diagnostics | No | If true, include Cox/logistic fit diagnostics. | |
| annual_discount_rate | No | Annual discount rate for pipeline value. | |
| min_closed_for_model | No | Below this, Cox / Shapley refuse to fit. | |
| shapley_max_channels | No | Top N−1 channels kept for exact Shapley. | |
| contact_effectiveness | No | Fallback uplift when learned data is too thin. | |
| min_conversions_for_model | No | Below this, Cox refuses. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| leads | Yes | List from the upstream lead pipeline API. | |
| alerts | No | List from the upstream lead pipeline API. | |
| status | Yes | 1 = success, 0 = error | |
| message | No | ||
| metadata | No | Upstream lead pipeline API payload. | |
| decisions | Yes | Ranked plain-language manager cards (CALL TODAY / PUSH FORWARD / QUALIFY). Money, days, lead names only — no Cox / survival / Shapley jargon. | |
| call_queue | Yes | ||
| attribution | No | ||
| funnel_model | No | ||
| survival_model | No | ||
| pipeline_summary | No | Upstream lead pipeline API payload. | |
| money_assumptions | No | ||
| pipeline_exposure | No | ||
| data_quality_report | No | Upstream lead pipeline API payload. |