Topolo Docs Topolo Platform
Open workspace

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.

Outcome

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.

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:read; required workspace access is read. 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.

Discover the target

topolo whoami --json
topolo actions get app_topolo_nurture.scoring.qualified.list --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json

Request

GET /api/scoring/qualified

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

FieldRequiredTypeConstraints
limitOptionalinteger{"minimum":1,"maximum":500}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    }
  },
  "additionalProperties": false
}

Effects

  • Reads scores and handoffs without changing state.

Interpret the response

The returned identifier path is $.leads[].contactId for contact_score. Empty lists do not discover a target.

Confirm every lead total is >= threshold.

Exact success schema:

{
  "type": "object",
  "required": [
    "modelVersion",
    "threshold",
    "leads"
  ],
  "properties": {
    "modelVersion": {
      "type": [
        "integer",
        "null"
      ]
    },
    "threshold": {
      "type": [
        "integer",
        "null"
      ]
    },
    "leads": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "contactId",
          "modelVersion",
          "fit",
          "behaviour",
          "total",
          "qualified",
          "reasons",
          "mqlAt",
          "computedAt",
          "email",
          "handoffs"
        ],
        "properties": {
          "contactId": {
            "type": "string"
          },
          "modelVersion": {
            "type": "integer"
          },
          "fit": {
            "type": "number"
          },
          "behaviour": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "qualified": {
            "type": "boolean"
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "ruleId",
                "kind",
                "points"
              ],
              "properties": {
                "ruleId": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "fit",
                    "behaviour"
                  ]
                },
                "points": {
                  "type": "number"
                },
                "events": {
                  "type": "integer"
                },
                "capped": {
                  "type": "boolean"
                }
              }
            }
          },
          "mqlAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "computedAt": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "handoffs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "connectorId",
                "provider",
                "status"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "contactId": {
                  "type": "string"
                },
                "connectorId": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "sent",
                    "skipped",
                    "failed"
                  ]
                },
                "remoteRef": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "attempts": {
                  "type": "integer"
                },
                "lastError": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "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:

{}

CLI:

topolo actions validate app_topolo_nurture.scoring.qualified.list --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring.qualified.list --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.scoring.qualified.list --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_nurture.scoring.qualified.list",
    "input": {},
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "modelVersion": 1,
  "threshold": 50,
  "leads": []
}

HTTP 200. Confirm every lead total is >= threshold.

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:

{
  "limit": 10
}

CLI:

topolo actions validate app_topolo_nurture.scoring.qualified.list --data @payload.json --json
topolo actions plan app_topolo_nurture.scoring.qualified.list --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.scoring.qualified.list --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

MCP tool and arguments:

{
  "tool": "topolo_read_action",
  "arguments": {
    "actionId": "app_topolo_nurture.scoring.qualified.list",
    "input": {
      "limit": 10
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>"
  }
}

Captured local response · HTTP 200:

{
  "modelVersion": 1,
  "threshold": 20,
  "leads": [
    {
      "contactId": "nct_57621a58e08c43f198a20f28a4fe4e14",
      "modelVersion": 1,
      "fit": 20,
      "behaviour": 0,
      "total": 20,
      "qualified": true,
      "reasons": [
        {
          "ruleId": "saas",
          "kind": "fit",
          "points": 20
        }
      ],
      "mqlAt": "2026-10-01T09:00:00.000Z",
      "computedAt": "2026-10-01T09:00:00.000Z",
      "email": "d1@example.com",
      "handoffs": []
    },
    {
      "contactId": "nct_9a9c20bf5e424e04b422e6bc25c558d6",
      "modelVersion": 1,
      "fit": 20,
      "behaviour": 0,
      "total": 20,
      "qualified": true,
      "reasons": [
        {
          "ruleId": "saas",
          "kind": "fit",
          "points": 20
        }
      ],
      "mqlAt": "2026-10-01T09:00:00.000Z",
      "computedAt": "2026-10-01T09:00:00.000Z",
      "email": "d2@example.com",
      "handoffs": []
    }
  ]
}

HTTP 200. Confirm every lead total is >= threshold.

Verify the result

  • Confirm every lead total is >= threshold.

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

This action does not change service state.

  • List contact score history: List one contact's lead score changes, newest first (up to 200): each entry has fit, behaviour, total, the change (delta), whether it qualified, the model version, the cause (event:<type>, model:v<n>, recompute or decay) and the rule contributions behind it.
  • Recompute lead scores: 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).

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.