Outcome
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.
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_model.update --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json
Request
PUT /api/scoring/model
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 |
|---|---|---|---|
behaviourRules | Required | array | {"maxItems":50} |
fitRules | Required | array | {"maxItems":50} |
mqlThreshold | Required | integer | {"minimum":1,"maximum":100000} |
Exact input schema:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"behaviourRules": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]{0,47}$"
},
"eventType": {
"type": "string",
"enum": [
"signup",
"trial_started",
"trial_ending",
"form_submitted",
"purchase",
"subscription_changed",
"feature_used",
"inactive",
"engage_not_now"
]
},
"propertyMatch": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
},
"required": [
"key",
"value"
],
"additionalProperties": false
},
"points": {
"type": "integer",
"minimum": -1000,
"maximum": 1000
},
"halfLifeDays": {
"type": "number",
"minimum": 0,
"maximum": 365
},
"maxPoints": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"id",
"eventType",
"points",
"halfLifeDays"
],
"additionalProperties": false
}
},
"fitRules": {
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]{0,47}$"
},
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,62}$"
},
"operator": {
"type": "string",
"enum": [
"equals",
"not_equals",
"contains",
"exists",
"not_exists"
]
},
"value": {
"type": "string",
"maxLength": 500
},
"points": {
"type": "integer",
"minimum": -1000,
"maximum": 1000
}
},
"required": [
"id",
"field",
"operator",
"points"
],
"additionalProperties": false
}
},
"mqlThreshold": {
"type": "integer",
"minimum": 1,
"maximum": 100000
}
},
"required": [
"behaviourRules",
"fitRules",
"mqlThreshold"
],
"additionalProperties": false
}
Effects
- Replaces the draft; the published version and every score are unchanged.
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_model.get and confirm model.draft and hasUnpublishedChanges.
Exact success schema:
{
"type": "object",
"required": [
"model",
"handoff"
],
"properties": {
"model": {
"type": "object",
"required": [
"draft",
"currentVersion",
"published",
"hasUnpublishedChanges"
],
"properties": {
"draft": {
"type": "object",
"required": [
"behaviourRules",
"fitRules",
"mqlThreshold"
],
"properties": {
"behaviourRules": {
"type": "array",
"items": {
"type": "object"
}
},
"fitRules": {
"type": "array",
"items": {
"type": "object"
}
},
"mqlThreshold": {
"type": "integer"
}
}
},
"currentVersion": {
"type": [
"integer",
"null"
]
},
"hasUnpublishedChanges": {
"type": "boolean"
},
"updatedAt": {
"type": [
"string",
"null"
]
},
"updatedBy": {
"type": [
"string",
"null"
]
},
"published": {
"type": [
"object",
"null"
],
"properties": {
"version": {
"type": "integer"
},
"model": {
"type": "object",
"required": [
"behaviourRules",
"fitRules",
"mqlThreshold"
],
"properties": {
"behaviourRules": {
"type": "array",
"items": {
"type": "object"
}
},
"fitRules": {
"type": "array",
"items": {
"type": "object"
}
},
"mqlThreshold": {
"type": "integer"
}
}
},
"publishedAt": {
"type": "string"
},
"publishedBy": {
"type": "string"
}
}
}
}
},
"handoff": {
"type": "object",
"required": [
"connectors",
"unavailable"
],
"properties": {
"connectors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"connectorId": {
"type": "string"
},
"provider": {
"type": "string"
},
"status": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"unavailable": {
"type": "array",
"items": {
"type": "object",
"properties": {
"provider": {
"type": "string"
},
"name": {
"type": "string"
},
"reason": {
"type": "string"
}
}
}
}
}
}
}
}
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:
{
"behaviourRules": [
{
"id": "pricing",
"eventType": "feature_used",
"propertyMatch": {
"key": "feature",
"value": "pricing"
},
"points": 20,
"halfLifeDays": 7,
"maxPoints": 60
},
{
"id": "signup",
"eventType": "signup",
"points": 5,
"halfLifeDays": 0
}
],
"fitRules": [
{
"id": "saas",
"field": "industry",
"operator": "equals",
"value": "saas",
"points": 20
}
],
"mqlThreshold": 50
}
CLI:
topolo actions validate app_topolo_nurture.scoring_model.update --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring_model.update --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.scoring_model.update --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_model.update",
"input": {
"behaviourRules": [
{
"id": "pricing",
"eventType": "feature_used",
"propertyMatch": {
"key": "feature",
"value": "pricing"
},
"points": 20,
"halfLifeDays": 7,
"maxPoints": 60
},
{
"id": "signup",
"eventType": "signup",
"points": 5,
"halfLifeDays": 0
}
],
"fitRules": [
{
"id": "saas",
"field": "industry",
"operator": "equals",
"value": "saas",
"points": 20
}
],
"mqlThreshold": 50
},
"resourceType": "workspace",
"resourceId": "<identifier returned by resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"model": {
"draft": {
"behaviourRules": [
{
"id": "pricing",
"eventType": "feature_used",
"propertyMatch": {
"key": "feature",
"value": "pricing"
},
"points": 20,
"halfLifeDays": 7,
"maxPoints": 60
},
{
"id": "signup",
"eventType": "signup",
"points": 5,
"halfLifeDays": 0
}
],
"fitRules": [
{
"id": "saas",
"field": "industry",
"operator": "equals",
"value": "saas",
"points": 20
}
],
"mqlThreshold": 50
},
"currentVersion": null,
"published": null,
"hasUnpublishedChanges": true,
"updatedAt": "2026-10-04T00:32:36.137Z",
"updatedBy": "u1"
},
"handoff": {
"connectors": [],
"unavailable": []
}
}
HTTP 200. Call app_topolo_nurture.scoring_model.get and confirm model.draft and hasUnpublishedChanges.
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:
{
"behaviourRules": [
{
"id": "pricing",
"eventType": "feature_used",
"propertyMatch": {
"key": "feature",
"value": "pricing"
},
"points": 20,
"halfLifeDays": 7,
"maxPoints": 60
},
{
"id": "signup",
"eventType": "signup",
"points": 5,
"halfLifeDays": 0
}
],
"fitRules": [
{
"id": "saas",
"field": "industry",
"operator": "equals",
"value": "saas",
"points": 20
}
],
"mqlThreshold": 50
}
CLI:
topolo actions validate app_topolo_nurture.scoring_model.update --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring_model.update --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.scoring_model.update --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_model.update",
"input": {
"behaviourRules": [
{
"id": "pricing",
"eventType": "feature_used",
"propertyMatch": {
"key": "feature",
"value": "pricing"
},
"points": 20,
"halfLifeDays": 7,
"maxPoints": 60
},
{
"id": "signup",
"eventType": "signup",
"points": 5,
"halfLifeDays": 0
}
],
"fitRules": [
{
"id": "saas",
"field": "industry",
"operator": "equals",
"value": "saas",
"points": 20
}
],
"mqlThreshold": 50
},
"resourceType": "workspace",
"resourceId": "<identifier returned by resource discovery>",
"confirm": true
}
}
Captured local response · HTTP 200:
{
"model": {
"draft": {
"behaviourRules": [
{
"id": "pricing",
"eventType": "feature_used",
"propertyMatch": {
"key": "feature",
"value": "pricing"
},
"points": 20,
"halfLifeDays": 7,
"maxPoints": 60
},
{
"id": "signup",
"eventType": "signup",
"points": 5,
"halfLifeDays": 0
}
],
"fitRules": [
{
"id": "saas",
"field": "industry",
"operator": "equals",
"value": "saas",
"points": 20
}
],
"mqlThreshold": 50
},
"currentVersion": null,
"published": null,
"hasUnpublishedChanges": true,
"updatedAt": "2026-10-04T00:32:36.006Z",
"updatedBy": "u1"
},
"handoff": {
"connectors": [],
"unavailable": []
}
}
HTTP 200. Call app_topolo_nurture.scoring_model.get and confirm model.draft and hasUnpublishedChanges.
Refused request · invalid_input
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:
{
"mqlThreshold": 0,
"fitRules": [
{
"id": "saas",
"field": "industry",
"operator": "equals",
"value": "saas",
"points": 20
}
],
"behaviourRules": [
{
"id": "pricing",
"eventType": "feature_used",
"propertyMatch": {
"key": "feature",
"value": "pricing"
},
"points": 20,
"halfLifeDays": 7,
"maxPoints": 60
},
{
"id": "signup",
"eventType": "signup",
"points": 5,
"halfLifeDays": 0
}
]
}
CLI:
topolo actions validate app_topolo_nurture.scoring_model.update --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring_model.update --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
Captured local response · HTTP 422:
{
"error": {
"code": "invalid_input",
"message": "The input does not match the action schema.",
"details": [
{
"origin": "number",
"code": "too_small",
"minimum": 1,
"inclusive": true,
"path": [
"mqlThreshold"
],
"message": "Too small: expected number to be >=1"
}
]
}
}
HTTP 422. 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:
{
"behaviourRules": [
{
"id": "pricing",
"eventType": "feature_used",
"propertyMatch": {
"key": "feature",
"value": "pricing"
},
"points": 20,
"halfLifeDays": 7,
"maxPoints": 60
},
{
"id": "signup",
"eventType": "signup",
"points": 5,
"halfLifeDays": 0
}
],
"fitRules": [
{
"id": "saas",
"field": "industry",
"operator": "equals",
"value": "saas",
"points": 20
}
],
"mqlThreshold": 50
}
CLI:
topolo actions validate app_topolo_nurture.scoring_model.update --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring_model.update --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_model.get and confirm model.draft and hasUnpublishedChanges.
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.
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
Send the previous draft (or model.published.model) back through update.
Related actions
- Publish lead scoring model: Freeze the draft as the next model version, make it current and rescore every active contact (up to 5000; truncated says when more remain, finish with scoring.recompute). 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).
- 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.