Enneo

Quality Management

Live Quality Coach check on a draft reply

POST /ticket/{ticketId}/quality/check

POST /ticket/{ticketId}/quality/check

Score an unsent draft reply against every applicable scorecard whose liveCoach.enabled is true. Nothing is persisted. Used by the Quality Coach panel to render live scores per scorecard.

One ticket may match multiple live-enabled scorecards (e.g. Compliance, Empathy, Tone) — every match is scored and returned in scorecards, ordered by scorecardId ascending so the FE can rely on positional rendering.

Scorecards without any AI-evaluable criteria are silently skipped. When no applicable scorecard has Live Coach enabled for this ticket, scorecards is empty.

Either every applicable scorecard is scored successfully, or — if cortex fails on any of them — the whole request fails with 502; no partial results are returned.

Path parameters

ticketIdintegerpathrequired

Ticket ID

Request body

draftTextstringbodyrequired

Draft reply text (HTML allowed) to score

scorecardIdintegerbody

Optional override — score against a specific scorecard revision only. When set, applicability and liveCoach.enabled are ignored; the result always contains exactly one entry. When omitted, every applicable live-enabled scorecard is scored.

Request Example

{
  "draftText": "string",
  "scorecardId": 1
}

Responses

200 — Live coach evaluation results

Response Example

{
  "scorecards": [
    {
      "scorecardId": 1,
      "name": "string",
      "percentage": 1,
      "threshold": 1,
      "passed": true,
      "aiSummary": "string",
      "categories": [
        {
          "categoryId": 1,
          "label": "string",
          "score": 1,
          "maxPoints": 1,
          "criteria": [
            {
              "criterionId": null,
              "label": null,
              "score": null,
              "maxPoints": null,
              "reason": null,
              "autoGenerateByAi": null,
              "makeOrBreakForCategory": null,
              "makeOrBreakForAssessment": null
            }
          ]
        }
      ]
    }
  ]
}

400 — Missing or invalid draftText, or requested scorecardId is not active

404 — Requested explicit scorecardId does not exist

502 — Cortex evaluation endpoint unreachable or returned a validation error for one of the scorecards. The error message includes the scorecard name that failed.