Outcome
Rescore one active contact (contactId) or every active contact (up to 5000) against the published model at the current time, then deliver pending lead handoffs this caller can reach (handoffs queued by the scheduled decay pass or a Notify delivery wait for a credentialed call like this one). Safe to repeat: an unchanged score writes no history and each contact qualifies once. The first time a contact qualifies Nurture records one mql lifecycle event (journey trigger and goal, segment event condition) and queues a handoff to every active connector with lead_handoff (TopoloCRM: a follow-up task on the linked CRM contact; TopoloEngage: enrolment into the connector's Engage campaign from its seat, skipped for an archived Engage contact or an address with a hard bounce, complaint or wrong-person block); without one the contact stays in Nurture (scoring.qualified.list, segment condition lead_score).
Before you start
- Verify identity and pin the intended organization and environment before discovering the action.
- Discover a granted Nurture workspace. The application permission is workspace:write; required workspace access is read_write. A permission alone does not supply a workspace grant.
- Organization and workspace come from verified context. Select resourceType/resourceId separately from action input; body fields cannot grant a different organization or workspace. The first authorized product action can initialize an identity-only workspace mirror.
- Obtain authorization for the documented effect or personal-data export before supplying CLI --confirm or MCP confirm:true.
Discover the target
topolo whoami --json
topolo actions get app_topolo_nurture.scoring.recompute --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json
topolo actions get app_topolo_nurture.contacts.list --detail --json
contactId: Nurture contact id; this is not a CRM contact id.
Request
POST /api/scoring/recompute
Save action input as payload.json. The reviewed plan separates path identifiers, query fields and HTTP body. Set NURTURE_WORKSPACE_ID from granted resource discovery; it is separate from action input.
Inspect and test this action in the signed action console. A test response still requires the verification below.
Input fields
| Field | Required | Type | Constraints |
|---|---|---|---|
contactId | Optional | string | Nurture contact id; this is not a CRM contact id. {"minLength":1,"maxLength":64} |
Exact input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"contactId": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"additionalProperties": false
}
Effects
- Updates contact scores and appends score history where a score changed.
- Records an mql event and queues handoffs for contacts qualifying for the first time.
- Creates TopoloCRM tasks or TopoloEngage contacts and enrolments for pending handoffs through lead_handoff connectors; a handoff failing 3 times is marked failed.
Interpret the response
The model version is an integer or null, not a resource identifier. Inspect the model or recompute outcome and discover contacts separately before using contact ids.
Call app_topolo_nurture.scoring.qualified.list or app_topolo_nurture.contact_scores.get and confirm the scores and handoff statuses.
Exact success schema:
{
"type": "object",
"required": [
"modelVersion",
"recompute",
"handoffs"
],
"properties": {
"modelVersion": {
"type": "integer"
},
"recompute": {
"type": "object",
"required": [
"evaluated",
"changed",
"qualified",
"newlyQualified",
"truncated"
],
"properties": {
"evaluated": {
"type": "integer"
},
"changed": {
"type": "integer"
},
"qualified": {
"type": "integer"
},
"newlyQualified": {
"type": "integer"
},
"truncated": {
"type": "boolean"
}
}
},
"handoffs": {
"type": "object",
"required": [
"sent",
"skipped",
"failed",
"pending"
],
"properties": {
"sent": {
"type": "integer"
},
"skipped": {
"type": "integer"
},
"failed": {
"type": "integer"
},
"pending": {
"type": "integer"
}
}
}
}
}
Worked examples
Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Replace synthetic identifiers using credential-scoped discovery. A local success is not evidence of a deployed effect, configured provider or delivered message.
Successful request
Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.
Input · payload.json:
{
"contactId": "nct_5568b0b2ec9e40879cf13f74ffa85401"
}
CLI:
topolo actions validate app_topolo_nurture.scoring.recompute --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring.recompute --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.scoring.recompute --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_nurture.scoring.recompute",
"input": {
"contactId": "nct_5568b0b2ec9e40879cf13f74ffa85401"
},
"resourceType": "workspace",
"resourceId": "<identifier returned by resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"modelVersion": 1,
"recompute": {
"evaluated": 1,
"changed": 1,
"qualified": 0,
"newlyQualified": 0,
"truncated": false
},
"handoffs": {
"sent": 0,
"skipped": 0,
"failed": 0,
"pending": 0
}
}
HTTP 200. Call app_topolo_nurture.scoring.qualified.list or app_topolo_nurture.contact_scores.get and confirm the scores and handoff statuses.
Another supported request
Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.
Input · payload.json:
{}
CLI:
topolo actions validate app_topolo_nurture.scoring.recompute --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring.recompute --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.scoring.recompute --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --confirm --json
MCP tool and arguments:
{
"tool": "topolo_call_action",
"arguments": {
"actionId": "app_topolo_nurture.scoring.recompute",
"input": {},
"resourceType": "workspace",
"resourceId": "<identifier returned by resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"modelVersion": 1,
"recompute": {
"evaluated": 1,
"changed": 0,
"qualified": 1,
"newlyQualified": 0,
"truncated": false
},
"handoffs": {
"sent": 0,
"skipped": 0,
"failed": 0,
"pending": 0
}
}
HTTP 200. Call app_topolo_nurture.scoring.qualified.list or app_topolo_nurture.contact_scores.get and confirm the scores and handoff statuses.
Refused request · not_found
Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.
Input · payload.json:
{
"contactId": "nct_28625f0115ce484489c9595ebb4ac12a"
}
CLI:
topolo actions validate app_topolo_nurture.scoring.recompute --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring.recompute --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 404:
{
"error": {
"code": "not_found",
"message": "Active contact was not found in this workspace."
}
}
HTTP 404. Preserve the refusal details and do not claim success.
Refused request · model_not_published
Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.
Input · payload.json:
{}
CLI:
topolo actions validate app_topolo_nurture.scoring.recompute --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring.recompute --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 409:
{
"error": {
"code": "model_not_published",
"message": "Publish a scoring model with scoring_model.publish first."
}
}
HTTP 409. Preserve the refusal details and do not claim success.
Refused request · permission_denied
Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.
Input · payload.json:
{}
CLI:
topolo actions validate app_topolo_nurture.scoring.recompute --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring.recompute --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 403:
{
"error": {
"code": "permission_denied",
"message": "The credential lacks workspace:write.",
"details": {
"requiredPermission": "workspace:write"
}
}
}
HTTP 403. Preserve the refusal details and do not claim success.
Verify the result
- Call app_topolo_nurture.scoring.qualified.list or app_topolo_nurture.contact_scores.get and confirm the scores and handoff statuses.
Errors and recovery
organization_required(HTTP 403): Select an organization available to the verified caller before choosing a Nurture workspace.permission_denied(HTTP 403): Grant the credential the required Nurture workspace permission.workspace_required(HTTP 409): Create a Nurture workspace, or pass the workspace resource context.invalid_input(HTTP 422): Correct the fields named in error.details using inputSchema, then retry.not_found(HTTP 404): List contacts to find a valid id in this workspace.model_not_published(HTTP 409): Publish a model with app_topolo_nurture.scoring_model.publish first.
Auth or gateway failures may precede this handler. Preserve the exact response shape, error string/code, request id and credential context; no synthetic fixture establishes live credential access.
Recovery boundary
Scores always reflect the published model; fix the rules, publish, and recompute. Delete a CRM task created in error with app_topolo_crm.tasks.delete, or stop an Engage enrolment with app_topolo_engage.enrollments.stop (the id is the handoff remoteRef).
Related actions
- List qualified leads: List active contacts whose current lead score is at or above the MQL threshold, highest first (up to 500), with email, score breakdown, when they first qualified and each lead handoff's status. This is where qualified leads stay when no lead_handoff connector is enabled; the segment condition lead_score (operator qualified) holds the same set.
- Get contact lead score: Read one contact's current lead score (fit, behaviour, total, qualified, per-rule reasons, model version, when it first qualified) with the current MQL threshold and its lead handoffs. score is null until the contact has been scored against a published model.
- Update lead scoring draft: Replace the draft lead scoring model (behaviourRules, fitRules, mqlThreshold; up to 50 rules each with unique ids). Scores do not change until scoring_model.publish. Score = fit + behaviour. Fit rules add points when a contact field matches (equals, not_equals, contains, exists, not_exists). Behaviour rules add points per matching lifecycle event (optionally only when properties[key] equals a value), each event halving every halfLifeDays (0 = no decay), with the rule clipped to maxPoints. A contact qualifies when score >= mqlThreshold.
Evidence
Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Test scenario and capture digests are retained with each fixture.