AlmondTill/G3N API

On this page

caseMessages

query · in the family Reading your records

What it does

One case’s message thread — staff replies, internal notes, and the customer’s messages.

ONE case's message thread, OLDEST-FIRST + born-paginated internal notes). caseId is the REQUIRED anchor (tenant-scoped — a cross-tenant/missing case refuses NOT_FOUND). 'nextToken' = the prior page's cursor, verbatim (opaque + case-bound; malformed/foreign → VALIDATION/INVALID). Requires authentication.

What happens

Reads only.

Who may call it

Capability area: Reading your records — Looking up and listing the records of your organization.

Arguments

NameTypeRequiredNotes
caseIdID ID!yesNo further notes.
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

CaseMessagePage CaseMessagePage! — One page of a case's thread.

This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.

Example request

query ExampleCaseMessages($caseId: ID!, $limit: Int) {
  caseMessages(caseId: $caseId, limit: $limit) {
    items {
      id
      type
      caption
      status
      parentId
      rootId
      createdAt
      updatedAt
      revisionNum
      revision
      authorKind
      authorId
      visibility
      body
    }
    nextToken
  }
}

Variables:

{
  "caseId": "01900000-0000-7000-8000-4559fce40000",
  "limit": 1
}

Example response

{
  "data": {
    "caseMessages": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "type": "<type>",
          "caption": "Blue jeans",
          "status": "<status>",
          "parentId": "01900000-0000-7000-8000-065235280000",
          "rootId": "01900000-0000-7000-8000-a093dd800000",
          "createdAt": "2027-01-31T00:00:00.000Z",
          "updatedAt": "2027-01-31T00:00:00.000Z",
          "revisionNum": 1,
          "revision": "01900000-0000-7000-8000-b7960e180000",
          "authorKind": "<author kind>",
          "authorId": "01900000-0000-7000-8000-0046e40b0000",
          "visibility": "<visibility>",
          "body": "Restock before the weekend."
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer