---
title: "Ratings feedback (normalized)"
description: "Get rating and feedback data in a standard format with the rating_feedback_normalized GraphQL function, to compare and report on ratings."
---

# Ratings feedback (normalized)

> Get rating and feedback data in a standard format with the rating_feedback_normalized GraphQL function, to compare and report on ratings.

## Overview

The `rating_feedback_normalized` function provides normalized rating and feedback data for easier analysis and comparison. This endpoint standardizes the rating data format. Use this endpoint to:

- Get standardized rating data for cross-system comparison
- Build rating analysis dashboards
- Export normalized feedback data for reporting

## Quick start

```graphql
query RatingFeedbackNormalized(
  $deskIds: _uuid
  $brainIds: _uuid
  $integrationIds: _uuid
  $startDate: timestamp
  $endDate: timestamp
  $ratings: _int4
  $isTest: Boolean
) {
  rows: rating_feedback_normalized(
    args: {
      desk_ids: $deskIds
      brain_parent_ids: $brainIds
      integration_ids: $integrationIds
      start_time: $startDate
      end_time: $endDate
      ratings: $ratings
      is_test: $isTest
    }
  ) {
    session_id
    brain_parent_id
    rating
    feedback
    time
  }
}
```

**Variables:**

```json
{
  "deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
  "startDate": "2024-01-08",
  "endDate": "2024-01-17"
}
```

## Parameters

| Parameter        | Type        | Description                       |
| ---------------- | ----------- | --------------------------------- |
| `deskIds`        | `_uuid`     | Filter by desk IDs                |
| `brainIds`       | `_uuid`     | Filter by AI agent IDs            |
| `integrationIds` | `_uuid`     | Filter by integration IDs         |
| `startDate`      | `timestamp` | Start date (format: `yyyy-mm-dd`) |
| `endDate`        | `timestamp` | End date (format: `yyyy-mm-dd`)   |
| `ratings`        | `_int4`     | Filter by specific ratings        |
| `isTest`         | `Boolean`   | Exclude test sessions             |

## Response fields

| Field              | Type        | Description                       |
| ------------------ | ----------- | --------------------------------- |
| `session_id`       | `String`    | Session identifier                |
| `brain_parent_id`  | `uuid`      | AI agent identifier               |
| `rating`           | `Int`       | Rating normalized to a 1-5 scale  |
| `feedback`         | `String`    | User feedback text                |
| `time`             | `timestamp` | Rating timestamp                  |

## Common use cases

## Try it

<GraphiQLPlayground
  query={`query RatingFeedbackNormalized(
  \$deskIds: _uuid
  \$brainIds: _uuid
  \$integrationIds: _uuid
  \$startDate: timestamp
  \$endDate: timestamp
  \$ratings: _int4
  \$isTest: Boolean
) {
  rows: rating_feedback_normalized(
    args: {
      desk_ids: \$deskIds
      brain_parent_ids: \$brainIds
      integration_ids: \$integrationIds
      start_time: \$startDate
      end_time: \$endDate
      ratings: \$ratings
      is_test: \$isTest
    }
  ) {
    session_id
    brain_parent_id
    rating
    feedback
    time
  }
}`}
  variables={`{
  "deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
  "startDate": "2024-01-08",
  "endDate": "2024-01-17"
}`}
  endpoint="https://logs.moveo.ai/v1/graphql"
/>

**All ratings**

Get all normalized ratings:

```json
{
  "deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
  "startDate": "2024-01-08",
  "endDate": "2024-01-17"
}
```

**Low ratings**

Get low ratings (1-3):

```json
{
  "deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
  "ratings": "{1,2,3}",
  "startDate": "2024-01-08",
  "endDate": "2024-01-17"
}
```

**Production only**

Exclude test sessions:

```json
{
  "deskIds": "{d2be0283-9b53-4d7b-b77d-2650f3a1a99c}",
  "isTest": false,
  "startDate": "2024-01-08",
  "endDate": "2024-01-17"
}
```

## Example response

```json
{
  "data": {
    "rows": [
      {
        "session_id": "58c0c8ca-4830-4782-adb8-31f1597bdad9",
        "brain_parent_id": "a2wv9283-9b53-4d7b-b77d-2650f3a1a99c",
        "rating": 5,
        "feedback": "Very helpful and quick response!",
        "time": "2024-01-15T14:32:15.123"
      },
      {
        "session_id": "466fc385-706d-4514-9bf9-7cab74c52c52",
        "brain_parent_id": "a2wv9283-9b53-4d7b-b77d-2650f3a1a99c",
        "rating": 3,
        "feedback": "Could be better",
        "time": "2024-01-15T16:45:22.456"
      }
    ]
  }
}
```
