Skip to content

Lead Score

A lead's score and the reasons behind it. A ring with the band, a trend and sparkline, the top reasons as signed bars with their source, and a Why did it change? button that asks a model through a callback you supply. The score and the signals come in as props.

On this page
Used for
  • Lead scoring
  • Account health
  • Renewal risk
  • Sales handoff
  • Intent signals

Examples

Lead

Next to a record header

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

score
number
0 to 100. A value outside that range, or not a number, is clamped.
signals
{ id, label, weight, source?, detail? }[]
The reasons. weight is -100 to 100: positive adds to the score, negative takes away. Drawn largest effect first.
history
{ at, score }[]
Scores over time, oldest first. Two or more points draw the sparkline and set the trend.
previousScore
number
The score before the last run, for a trend when there is no history.
maxSignals
number
Default5
Reasons shown before Show all.
onExplain
(ctx, signal) => Promise<{ summary, changes }>
Draws Why did it change?. ctx has from, to and the signals as shown. changes is { label, delta, source? }[]. Cancel aborts the signal; a late or unreadable answer is dropped or shown as an error.
title / subject
string
Default"Lead score"
The heading and the line under it.

What it handles

  1. 01Shows a score from 0 to 100 as a ring with its band (cold, warm or hot) and the number, and clamps a value that is out of range.
  2. 02Draws the trend as a signed change since the first point of the history, with a sparkline, or since the last run when there is no history.
  3. 03Lists the top reasons as bars from a centre line: points added to the right in green, points taken away to the left in red, each with its weight as text and its source.
  4. 04Shows five reasons and a Show all control for the rest, largest effect first.
  5. 05Asks an async callback why the score moved, with a loading line and Cancel, an error with Try again, and the answer with the points each reason moved it by.
  6. 06Drops a late or unreadable answer and never changes the score itself: the model output is a prop.

States

First render
Nothing. The ring, number and bars paint as they are
none
Score changes
The ring and the number move to the new value, the bars follow
280ms, ease in-out
Why did it change?
The panel folds open under the button, first as a loading line
180ms, ease out
Cancel or Close
The panel folds shut
120ms, ease out
Reduced motion
Everything changes at once
0ms

Works with

When to use

When to use

  • Showing why a model rates a lead or an account the way it does, with the evidence and where it came from.
  • Letting a rep ask for the reason a score moved before they call.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Lead Score to my app and wire it to my own data.
  • I need showing why a model rates a lead or an account the way it does, with the evidence and where it came from. Set that up with the Knowns UI Lead Score.
  • Which Lead Score props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "lead-score" }) and search_docs({ query: "lead score" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Lead Score, or found something off? We read every message.