> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clariodesk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CSAT

> An inline satisfaction rating when an agent resolves a ticket.

When an agent resolves a ticket, ClarioDesk can prompt the end user for a quick
satisfaction rating. It uses the existing resolve flow: there's no separate
screen or modal, and the rating itself is the confirmation.

## The flow

1. An agent marks a ticket resolved.
2. The SDK surfaces an inline five-face rating prompt (😔 → 😄) in the thread.
3. The user taps a face (and can add an optional comment).
4. A rating of 3 or higher advances the ticket `resolved → closed`. Reopening
   stays a separate action — an unhappy user just replies in the thread, which
   reopens the ticket as usual.

The rating is cached on the ticket, so you can render the resolved state
correctly without a second fetch.

## Submitting a rating

If you build your own UI, submit the rating with one call:

<CodeGroup>
  ```dart Flutter theme={null}
  await ClarioDesk.submitCsat(ticketId, score: 5, comment: 'Fast fix, thanks!');
  ```

  ```ts React Native theme={null}
  await ClarioDesk.submitCsat(ticketId, { score: 5, comment: 'Fast fix, thanks!' });
  ```

  ```swift Swift theme={null}
  try await ClarioDesk.submitCsat(ticketId: ticket.id, score: 5, comment: "Fast fix, thanks!")
  ```
</CodeGroup>

`score` is a 5-point scale, low to high: `1` (😔) … `5` (😄).

<Note>
  If you use the [prebuilt UI](/flutter/prebuilt-ui), the CSAT prompt is rendered
  for you on resolve, so you don't need to call `submitCsat` yourself.
</Note>
