# getEmployeeCaseload

The contacts one AI employee is on, newest attachment first, offset-paged (`offset`, `limit`; `total` is the full count). Each row says whether it is working that contact now, when it last worked it, the next run of a repeating schedule (`attachment.schedule`), the soonest follow-up it booked itself (`nextBookedFollowUpAt`, null when none), and whether the contact replied or escalated. A new touch on a contact with one booked comes before that follow-up. `includeRemoved: true` adds contacts a person took it off.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "getEmployeeCaseload", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no
- Result cap: `limit` is clamped to 100, without an error

## Variables

- `employeeId`: `ID!` (required)
- `offset`: `Int` (default `0`)
- `limit`: `Int` (default `25`)
- `includeRemoved`: `Boolean`

## Response (data, an example)

```json
{
  "aiEmployeesQuery": {
    "contactAgentCaseload": {
      "total": 0,
      "items": [
        {
          "contactId": "<ID>",
          "contactName": "…",
          "isWorkingNow": true,
          "lastWorkedAt": "2026-01-01T00:00:00.000Z",
          "lastCommunicationAt": "2026-01-01T00:00:00.000Z",
          "nextBookedFollowUpAt": "2026-01-01T00:00:00.000Z",
          "attachment": {
            "id": "<ID>",
            "source": "MANUAL",
            "status": "ACTIVE",
            "createdAt": "2026-01-01T00:00:00.000Z",
            "schedule": {
              "nextFireAt": "2026-01-01T00:00:00.000Z"
            },
            "engagement": {
              "receivedReply": true,
              "positivelyEscalated": true,
              "negativeIntent": true
            }
          }
        }
      ]
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "getEmployeeCaseload",
    "variables": {
      "employeeId": "<employeeId>"
    }
  }'
```
