Topolo Docs Topolo Platform
Open workspace

Record reply outcome

Classify an enrollment's reply: one of replied_positive, replied_negative, replied_neutral, meeting_booked (replied_positive and meeting_booked count as positive in analytics.report). A later call replaces the classification. An enrollment that is still active is stopped as replied (its scheduled messages are cancelled) because the contact has replied. 404 when the enrollment is not in this workspace; 409 state_conflict when it has never been sent a message. Verify with enrollments.get or analytics.report; correct by recording again. Audited.

Outcome

Classify an enrollment's reply: one of replied_positive, replied_negative, replied_neutral, meeting_booked (replied_positive and meeting_booked count as positive in analytics.report). A later call replaces the classification. An enrollment that is still active is stopped as replied (its scheduled messages are cancelled) because the contact has replied. 404 when the enrollment is not in this workspace; 409 state_conflict when it has never been sent a message. Verify with enrollments.get or analytics.report; correct by recording again. 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.outcomes.record --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}
outcomeYes{"type":"string","enum":["replied_positive","replied_negative","replied_neutral","meeting_booked"]}
noteNo{"type":"string","minLength":1,"maxLength":500}

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.outcomes.record --data @payload.json --json
topolo actions plan app_topolo_engage.outcomes.record --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.outcomes.record --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

Captured HTTP 200 · engagement analytics > labels a fact whose version or step is gone with an empty subject

Action input

{
  "id": "eng_enr_1",
  "outcome": "replied_positive"
}

Actual local response

{
  "outcome": {
    "enrollmentId": "eng_enr_1",
    "outcome": "replied_positive",
    "outcomeAt": "2026-10-06T08:30:00.000Z",
    "outcomeBy": "user_1",
    "status": "replied"
  }
}

Source test: engagement analytics > labels a fact whose version or step is gone with an empty subject. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 200 · outcomes.record > classifies a reply, stops an active enrollment as replied, replaces a classification and is audited

Action input

{
  "id": "eng_enr_1",
  "outcome": "meeting_booked",
  "note": "Booked for Friday"
}

Actual local response

{
  "outcome": {
    "enrollmentId": "eng_enr_1",
    "outcome": "meeting_booked",
    "outcomeAt": "2026-10-06T09:00:00.000Z",
    "outcomeBy": "user_1",
    "status": "replied"
  }
}

Source test: outcomes.record > classifies a reply, stops an active enrollment as replied, replaces a classification and is audited. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 200 · outcomes.record > classifies a reply, stops an active enrollment as replied, replaces a classification and is audited

Action input

{
  "id": "eng_enr_1",
  "outcome": "replied_negative"
}

Actual local response

{
  "outcome": {
    "enrollmentId": "eng_enr_1",
    "outcome": "replied_negative",
    "outcomeAt": "2026-10-06T09:00:00.000Z",
    "outcomeBy": "user_1",
    "status": "replied"
  }
}

Source test: outcomes.record > classifies a reply, stops an active enrollment as replied, replaces a classification and is audited. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Effects and response meaning

  • Classify an enrollment's reply: one of replied_positive, replied_negative, replied_neutral, meeting_booked (replied_positive and meeting_booked count as positive in analytics.report). A later call replaces the classification. An enrollment that is still active is stopped as replied (its scheduled messages are cancelled) because the contact has replied. 404 when the enrollment is not in this workspace; 409 state_conflict when it has never been sent a message. Verify with enrollments.get or analytics.report; correct by recording again. 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 409 · outcomes.record > classifies a reply, stops an active enrollment as replied, replaces a classification and is audited

Action input

{
  "id": "eng_enr_1",
  "outcome": "meeting_booked"
}

Actual local response

{
  "error": {
    "code": "state_conflict",
    "message": "Nothing has been sent to this enrollment yet."
  }
}

Source test: outcomes.record > classifies a reply, stops an active enrollment as replied, replaces a classification and is audited. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 404 · outcomes.record > 404s an unknown enrollment, refuses readers and invalid outcomes

Action input

{
  "id": "eng_enr_nope",
  "outcome": "replied_positive"
}

Actual local response

{
  "error": {
    "code": "not_found",
    "message": "Enrollment was not found in this workspace."
  }
}

Source test: outcomes.record > 404s an unknown enrollment, refuses readers and invalid outcomes. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 422 · outcomes.record > 404s an unknown enrollment, refuses readers and invalid outcomes

Refused input; do not execute

{
  "outcome": "thrilled",
  "id": "eng_enr_1"
}

Actual local response

{
  "error": {
    "code": "invalid_action_input",
    "message": "Input for outcomes.record is invalid.",
    "details": [
      {
        "code": "invalid_value",
        "values": [
          "replied_positive",
          "replied_negative",
          "replied_neutral",
          "meeting_booked"
        ],
        "path": [
          "outcome"
        ],
        "message": "Invalid option: expected one of \"replied_positive\"|\"replied_negative\"|\"replied_neutral\"|\"meeting_booked\""
      }
    ]
  }
}

Source test: outcomes.record > 404s an unknown enrollment, refuses readers and invalid outcomes. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Captured HTTP 403 · outcomes.record > 404s an unknown enrollment, refuses readers and invalid outcomes

Action input

{
  "id": "eng_enr_1",
  "outcome": "replied_positive"
}

Actual local response

{
  "error": {
    "code": "permission_denied",
    "message": "The credential lacks workspace:write.",
    "details": {
      "requiredPermission": "workspace:write"
    }
  }
}

Source test: outcomes.record > 404s an unknown enrollment, refuses readers and invalid outcomes. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.

Error recovery

  • HTTP 409 state_conflict: Read the current retained state and reconcile the requested transition before retrying. Do not blindly replay a non-idempotent mutation.
  • HTTP 404 not_found: Rediscover the identifier using the related list or get action in the same authorized resource. Do not guess identifiers or change organization context.
  • HTTP 422 invalid_action_input: Correct the request against the current action input schema, then validate it again before planning.
  • HTTP 403 permission_denied: Stop and inspect the current credential and selected resource. It needs workspace:write; do not broaden access or switch organization automatically.

Evidence and limits

  • /api/enrollments/{id}/outcome

  • 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.