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

# Borrower Deal Activity Logs

> Activities recorded against a borrower deal

| Property      | Value                                              |
| ------------- | -------------------------------------------------- |
| Dataset code  | `D17`                                              |
| Section code  | `S3` — Collections Cases                           |
| Endpoint path | `/exports/S3/D17`                                  |
| Cursor field  | `created_at`                                       |
| Page size     | `1`–`1000` (default `500`)                         |
| Availability  | Available (v1.2)                                   |
| Pagination    | Via (variable page size — joined through a parent) |

Each row is one activity recorded against a borrower deal — a stage change, agent assignment, manual touch, and so on.

## Fields

| Field        | Type           | Description                                          | Notes                                                  |
| ------------ | -------------- | ---------------------------------------------------- | ------------------------------------------------------ |
| `public_id`  | string         | Stable per-row identifier (string-cast Mongo `_id`). | Use as the warehouse primary key                       |
| `action`     | string         | Action code (e.g. `stage_changed`, `assigned`).      |                                                        |
| `comment`    | string \| null | Optional comment.                                    |                                                        |
| `created_by` | string         | Actor (user id or system tag).                       |                                                        |
| `details`    | object         | Sub-object describing the change.                    | Inner keys: `oldStage`, `newStage`, `assignedUserName` |
| `created_at` | string         | Event timestamp (ISO-8601).                          | Cursor field                                           |

### `details` object

| Field              | Type           | Description                              |
| ------------------ | -------------- | ---------------------------------------- |
| `oldStage`         | string \| null | Stage before the change.                 |
| `newStage`         | string \| null | Stage after the change.                  |
| `assignedUserName` | string \| null | Agent assigned as part of this activity. |

## Sample row

```json theme={null}
{
  "public_id": "664b1c2d3e4f5a6071829017",
  "action": "stage_changed",
  "comment": "Customer requested a call back next week",
  "created_by": "agent_4471",
  "details": {
    "oldStage": "stage_new",
    "newStage": "stage_negotiation",
    "assignedUserName": "Mariam Al-Shehri"
  },
  "created_at": "2026-05-22T11:14:05.000Z"
}
```

## Pagination characteristics

This dataset is **via** — it is filtered to your tenant by joining through its parent (`deal_id` → `BorrowerDeals`). On multi-tenant databases a single response may contain **fewer rows than your `limit`** even when more data exists. The cursor still advances correctly — keep paging until `nextCursor` is `null`. See [Pagination → Variable page size](/api-reference/exports/pagination).

## Use cases

* Case-activity audit trail.
* Agent productivity attribution.
* Stage-funnel analysis.

***

<Snippet file="snippets/support-info.mdx" />
