Add explainable lead scoring to your Clay table
Call kenbun's scoring endpoint from a Clay HTTP API enrichment column so each contact or account row comes back with a lead score and the rule-level reasons behind it.
Most enrichment returns a number; this returns the score and the rules that fired to produce it, so the cell shows why a row scored the way it did, not just what it scored.
Prerequisites
- A kenbun Personal Access Token with the
write:scoringscope. Create one under Settings → API Tokens. - A Clay workspace on a plan that includes HTTP API enrichment columns.
Add the enrichment column
-
In your table, add a new column and choose the HTTP API enrichment.
-
Set the method to POST and the URL to:
https://api.kenbun.io/scoring/score -
Add a header for authentication:
Authorization: Bearer kbn_pat_your_token_hereAdd
Content-Type: application/jsonif your column doesn't set it by default. -
In the request body, map your Clay columns into the JSON fields. Put person-level firmographics under
profileand company-level attributes underaccount. Reference Clay columns with the column-merge syntax (for example{{Email}}):{
"external_id": "clay-{{Email}}",
"profile": {
"email": "{{Email}}",
"job_title": "{{Job Title}}",
"country": "{{Country}}"
},
"account": {
"domain": "{{Company Domain}}",
"employee_count": "{{Employee Count}}",
"industry": "{{Industry}}"
}
}Only the properties your scoring rules reference need to be sent.
external_idis any stable identifier for the row; reusing the same value on a re-run keeps the lead consistent in kenbun. -
Run the column on a row to test the response.
Example response
{
"external_id": "clay-jordan@acme.io",
"lead_id": "a1f2…",
"dimensions_scored": ["profile", "account"],
"profile": {
"score": 18,
"level": "Good Fit",
"drivers": [
{ "property": "job_title", "condition": "contains", "value": "VP", "weight": 10, "matched": true },
{ "property": "country", "condition": "equals", "value": "US", "weight": 8, "matched": true }
]
},
"account": {
"score": 12,
"level": "Tier 2",
"drivers": [
{ "property": "employee_count", "condition": "greater_than", "value": "100", "weight": 12, "matched": true }
]
}
}
Map the response back into columns
Each scored dimension returns its own block. Pull the fields you want into Clay columns:
profile.scoreandaccount.score— the numeric scores.profile.levelandaccount.level— the named tier for each score.profile.driversandaccount.drivers— one entry per rule, with the property, condition, weight, and amatchedflag. The entries wherematchedistrueare the reasons the score fired; concatenate theirpropertyvalues into a single column for a readable "why" cell.
With the score and reasons in columns, sort or filter your table by score and route high-fit rows into the rest of your Clay workflow.