Topolo Docs Topolo Platform
Open workspace

Hand off reply thread

Hand a thread to an optional connector. booking_link returns a reply draft containing the workspace bookingUrl (no Calendar dependency; nothing is sent). crm_deal and nurture call the workspace's CRM or Nurture connector. Without the setting or connector it answers 424 connector_not_configured. Audited.

Outcome

Hand a thread to an optional connector. booking_link returns a reply draft containing the workspace bookingUrl (no Calendar dependency; nothing is sent). crm_deal and nurture call the workspace's CRM or Nurture connector. Without the setting or connector it answers 424 connector_not_configured. Audited.

Before you start

  • Verify the intended environment, signed-in credential, authorized organization and the action permission workspace:write.
  • Discover and select an authorized canonical Engage workspace. Pass resourceType=workspace and resourceId separately from action input.
  • Review the exact effects and obtain approval before CLI --confirm or MCP confirm:true. A local capture does not authorize a live mutation.

Discover the target

topolo whoami --json
topolo actions get app_topolo_engage.threads.handoff --json
topolo workspaces list topolo-engage --json

Set ENGAGE_WORKSPACE_ID to the identifier of the selected authorized workspace.

Input contract

FieldRequiredDeclared constraints
idYes{"type":"string","minLength":1,"maxLength":128}
kindYes{"type":"string","enum":["booking_link","crm_deal","nurture"]}

Validate, plan and execute

Build payload.json from the current schema and discovered identifiers. The action description above defines its behavior, limits, side effects and declared errors.

: "${ENGAGE_WORKSPACE_ID:?Set ENGAGE_WORKSPACE_ID to your selected workspace identifier}"
topolo actions validate app_topolo_engage.threads.handoff --data @payload.json --json
topolo actions plan app_topolo_engage.threads.handoff --resource-type workspace --resource-id "$ENGAGE_WORKSPACE_ID" --data @payload.json --confirm --json

Review the plan and approve its exact effects before executing the unchanged request.

: "${ENGAGE_WORKSPACE_ID:?Set ENGAGE_WORKSPACE_ID to your selected workspace identifier}"
topolo actions call app_topolo_engage.threads.handoff --resource-type workspace --resource-id "$ENGAGE_WORKSPACE_ID" --data @payload.json --confirm --json

For MCP, use topolo_get_action, topolo_validate_action, topolo_plan_action and topolo_call_action. Pass resource context separately where required; confirm:true is required for mutations.

Captured successful requests and responses

Action input

{
  "id": "eng_thr_1",
  "kind": "booking_link"
}

Actual local response

{
  "kind": "booking_link",
  "draft": "Happy to find a time. You can pick one that suits you here: https://cal.example.com/ash",
  "externalRef": null
}

Source test: reply inbox actions > threads.handoff > drafts a booking-link reply from the workspace booking URL and hands off to a configured connector. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 200 · threads.handoff with the TopoloCRM connector > creates the deal as the caller and audits the external reference

Action input

{
  "id": "eng_thr_1",
  "kind": "crm_deal"
}

Actual local response

{
  "kind": "crm_deal",
  "draft": null,
  "externalRef": "deal_1"
}

Source test: threads.handoff with the TopoloCRM connector > creates the deal as the caller and audits the external reference. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Effects and response meaning

  • Hand a thread to an optional connector. booking_link returns a reply draft containing the workspace bookingUrl (no Calendar dependency; nothing is sent). crm_deal and nurture call the workspace's CRM or Nurture connector. Without the setting or connector it answers 424 connector_not_configured. Audited.

Verify the outcome

  • Check the response against the declared output schema and the requested operation. For mutations, use the action-specific read described in the action description before any dependent operation.

Recover

For an uncertain result, inspect current retained state with a read action before retrying. Do not replay a mutation unless its contract explicitly guarantees idempotency.

Refused requests

Captured HTTP 424 · reply inbox actions > threads.handoff > answers 424 without a booking URL or connector

Action input

{
  "id": "eng_thr_1",
  "kind": "booking_link"
}

Actual local response

{
  "error": {
    "code": "connector_not_configured",
    "message": "No booking_link connector is configured for this workspace.",
    "details": {
      "kind": "booking_link"
    }
  }
}

Source test: reply inbox actions > threads.handoff > answers 424 without a booking URL or connector. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Refused input; do not execute

{
  "kind": "calendar",
  "id": "eng_thr_1"
}

Actual local response

{
  "error": {
    "code": "invalid_action_input",
    "message": "Input for threads.handoff is invalid.",
    "details": [
      {
        "code": "invalid_value",
        "values": [
          "booking_link",
          "crm_deal",
          "nurture"
        ],
        "path": [
          "kind"
        ],
        "message": "Invalid option: expected one of \"booking_link\"|\"crm_deal\"|\"nurture\""
      }
    ]
  }
}

Source test: reply inbox actions > threads.handoff > drafts a booking-link reply from the workspace booking URL and hands off to a configured connector. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 403 · threads.handoff with the TopoloCRM connector > answers the connector's own error without auditing, and passes a removed contact and no token as unknown

Action input

{
  "id": "eng_thr_1",
  "kind": "crm_deal"
}

Actual local response

{
  "error": {
    "code": "crm_access_denied",
    "message": "denied",
    "details": {
      "kind": "crm_deal",
      "connector": "topolo_crm"
    }
  }
}

Source test: threads.handoff with the TopoloCRM connector > answers the connector's own error without auditing, and passes a removed contact and no token as unknown. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 502 · threads.handoff with the TopoloCRM connector > answers the connector's own error without auditing, and passes a removed contact and no token as unknown

Action input

{
  "id": "eng_thr_1",
  "kind": "crm_deal"
}

Actual local response

{
  "error": {
    "code": "crm_unavailable",
    "message": "down",
    "details": {
      "kind": "crm_deal",
      "connector": "topolo_crm"
    }
  }
}

Source test: threads.handoff with the TopoloCRM connector > answers the connector's own error without auditing, and passes a removed contact and no token as unknown. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 424 · reply inbox actions > threads.handoff > answers 424 without a booking URL or connector

Action input

{
  "id": "eng_thr_1",
  "kind": "crm_deal"
}

Actual local response

{
  "error": {
    "code": "connector_not_configured",
    "message": "No crm_deal connector is configured for this workspace.",
    "details": {
      "kind": "crm_deal"
    }
  }
}

Source test: reply inbox actions > threads.handoff > answers 424 without a booking URL or connector. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 424 · reply inbox actions > threads.handoff > answers 424 without a booking URL or connector

Action input

{
  "id": "eng_thr_1",
  "kind": "nurture"
}

Actual local response

{
  "error": {
    "code": "connector_not_configured",
    "message": "No nurture connector is configured for this workspace.",
    "details": {
      "kind": "nurture"
    }
  }
}

Source test: reply inbox actions > threads.handoff > answers 424 without a booking URL or connector. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Error recovery

  • HTTP 424 connector_not_configured: Read the refusal details and current action contract, correct the stated cause, then validate and plan again. Do not retry unchanged or infer success.
  • HTTP 422 invalid_action_input: Correct the request against the current action input schema, then validate it again before planning.
  • HTTP 403 crm_access_denied: Read the refusal details and current action contract, correct the stated cause, then validate and plan again. Do not retry unchanged or infer success.
  • HTTP 502 crm_unavailable: Preserve the request and inspect the declared dependency state. Retry only after the transient or configuration cause is resolved; do not infer that the operation completed.

Evidence and limits

  • /api/threads/{id}/handoff

  • Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

  • Widget/bootstrap use actual app handler but mocked worker runtime and app identity.

  • No gateway execution, live permissions, external delivery or deployed proof.

These are local route captures with synthetic identity and simulated dependencies. They do not prove live authorization, gateway execution, production state, or external delivery.