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

# Notification Tray Overview

> Read notification tray items, tray seen status, and item seen status with the SDK notification tray APIs.

The notification tray SDK APIs expose in-app notification tray data for the signed-in user. Use them to render notification items, show a tray-level unread indicator, mark the tray as seen, and mark individual tray items as seen.

<Note>
  The current public Flutter SDK source reviewed for this page exposes push-notification registration and notification-settings APIs, but not notification tray item/status APIs.
</Note>

## SDK Surfaces

| Capability               | TypeScript                                             | iOS                                                  | Android                                                         | Flutter                                                                     |
| ------------------------ | ------------------------------------------------------ | ---------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| Query tray items         | `notificationTray.getNotificationTrayItems()`          | `client.notificationTray.getNotificationTrayItems()` | `AmityCoreClient.notificationTray().getNotificationTrayItems()` | Not exposed in the current public Flutter SDK source reviewed for this page |
| Observe tray seen status | `notificationTray.getNotificationTraySeen()`           | `client.notificationTray.getNotificationTraySeen()`  | `AmityCoreClient.notificationTray().getNotificationTraySeen()`  | Not exposed in the current public Flutter SDK source reviewed for this page |
| Mark tray seen           | `notificationTray.markTraySeen(lastSeenAt)`            | `client.notificationTray.markSeen()`                 | `AmityCoreClient.notificationTray().markTraySeen()`             | Not exposed in the current public Flutter SDK source reviewed for this page |
| Mark item seen           | `notificationTray.markItemsSeen([{ id, lastSeenAt }])` | `AmityNotificationTrayItem.markSeen()`               | `AmityNotificationTrayItem.markSeen()`                          | Not exposed in the current public Flutter SDK source reviewed for this page |

## Data Model

Notification tray items are returned with actor, target, reference, action, text, and seen-state data. Property names differ slightly by platform.

| Concept             | TypeScript               | iOS                      | Android                            |
| ------------------- | ------------------------ | ------------------------ | ---------------------------------- |
| Item ID             | `_id`                    | `notificationId`         | `getId()`                          |
| Last occurred       | `lastOccurredAt`         | `lastOccurredAt`         | `getLastOccurredAt()`              |
| Last seen           | `lastSeenAt`             | `lastSeenAt`             | `getLastSeenAt()`                  |
| Action type         | `actionType`             | `actionType`             | `getActionType()`                  |
| Category            | `trayItemCategory`       | `trayItemCategory`       | `getTrayItemCategory()`            |
| Target              | `targetId`, `targetType` | `targetId`, `targetType` | `getTargetId()`, `getTargetType()` |
| Text                | `text`, `templatedText`  | `text`, `templatedText`  | `getText()`, `getTemplatedText()`  |
| Linked users        | `users`                  | `users`                  | `getUsers()`                       |
| Item seen state     | `isSeen`                 | `isSeen`                 | `isSeen()`                         |
| Recent-state helper | `isRecent`               | `isRecent`               | `isRecent()`                       |

Tray seen status is a separate object with the latest tray occurrence timestamp, latest tray seen timestamp, and a derived `isSeen` value.

## Typical Flow

1. Observe tray seen status to decide whether to show a notification indicator.
2. Query tray items when the user opens the notification tray.
3. Mark the tray as seen after the user views the tray.
4. Mark individual items as seen when the user views or opens a specific item.
5. Dispose observers or subscriptions when the owning screen is destroyed.

## Related Topics

<CardGroup cols={3}>
  <Card title="Notification Items" href="./notification-items" icon="list">
    Query tray items and mark individual items as seen
  </Card>

  <Card title="Tray Status" href="./notification-tray-status" icon="eye">
    Observe and update tray-level seen status
  </Card>

  <Card title="Event Fields" href="./notification-events-reference" icon="bolt">
    Reference action and category values returned on tray items
  </Card>
</CardGroup>
