API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · support_live_sessions

Support Live Session Schema

Schema-ID
support_live_session
Collection
support_live_sessions
Permissions
  • Lesensupport_request_view
  • Anlegensupport_request_create
  • Ändernsupport_request_edit
  • Löschensupport_request_delete

Felder

Support Live Session Schema

support_live_sessions4 Permissions

A paid live support session attached to a support request

requestIdstringerforderlich

The support request this session escalated from — MANDATORY (ADR 0938 decision 10). There is no direct entry into live support: the agent gets context and the already-run AI triage for free, and the customer does not pay for the minutes spent typing the problem description.

max 100 Zeichen
statusstringerforderlich

Lifecycle: requested → queued → active → ended, and to `abandoned` from any state. ⚠ `requested` is a transient transition state that exists only between POST and dispatch — it must never be observable for more than fractions of a second and NO business logic may branch on it (ADR 0938 decision 11). The states that carry meaning are queued, active, ended and abandoned.

requestedqueuedactivepausedendedabandoned
Default: "requested"read-only
requestedByUserIdstringoptional

The tenant user who asked for live support. Kept separately from the request’s `createdBy` because a colleague may escalate someone else’s request, and the consent below is that person’s, not the original reporter’s.

max 100 ZeichenDefault: nullnullable
agentUserIdstringoptional

The Codemeta agent who pulled this session. Null while queued — assignment is pull-only, never automatic (ADR 0938 decision 13).

max 100 ZeichenDefault: nullread-onlynullable
queuedAtdatetimeoptional

When the customer entered the queue. Sort key of the fallback FIFO rung.

Default: nullread-onlynullable
activatedAtdatetimeoptional

When the agent joined. THE BILLING CLOCK STARTS HERE and nowhere else — waiting is always free, so a customer who queues for 20 minutes and gives up pays nothing (ADR 0938 decision 11).

Default: nullread-onlynullable
endedAtdatetimeoptional

When the session stopped. NOT the billed span on its own — a session can be paused, so the billed time is the sum of its active segments (`billableMs`).

Default: nullread-onlynullable
billableMsnumberoptional

Billable time from CLOSED segments, in milliseconds. An agent may pause a running session — to look something up or consult a colleague — and the meter must stop while they do (decision Lukas, 2026-08-10). Absent or 0 on a session that was never paused, where the single segment is `activatedAt → endedAt`: no backfill needed.

≥ 0Default: 0read-only
segmentStartedAtdatetimeoptional

Start of the OPEN billing segment; null while paused. This — not `status` — is what the money is computed from, so a paused session cannot accrue cost even if a status write were ever missed.

Default: nullread-onlynullable
endedReasonstringoptional

Why it stopped. Load-bearing for billing disputes: `idle_timeout` means nobody closed the session and the clock was stopped for them, which is exactly the case a customer will ask about.

agent_endedcustomer_endedidle_timeoutqueue_timeoutabandonednull
Default: nullread-onlynullable
alarmedAtdatetimeoptional

When the queue alarm fired for this entry (ADR 0938 decision 11, alarm threshold). Stored so the alarm is raised once rather than on every sweep, and so the pull model’s known weakness — “someone else will take it” — is measurable afterwards.

Default: nullread-onlynullable
billingStatestringoptional

ADR 0938 decision 5. `included` (contractually covered, never billable) and `waived` (would have been billable, deliberately forgiven) are deliberately distinct: collapsing them makes “how much support is covered?” and “how much are we giving away?” indistinguishable in hindsight. `held` means the price was missing — hold the charge, never bill zero.

pendingmeteredincludedwaivedheld
Default: "pending"read-only
billedBlocksnumberoptional

Number of started blocks the rollup charged. Written once by the rollup; null while pending. Stored rather than recomputed so an invoice line stays reproducible even after the block size changes.

≥ 0Default: nullread-onlynullable
chargeSourceRefstringoptional

Idempotency key handed to `recordPlatformCharge()`. Present exactly when a charge was recorded, which makes a double-charge detectable rather than merely unlikely.

max 200 ZeichenDefault: nullread-onlynullable

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/support_live_sessions — Liste, paginiert + filterbar
  • GET /api/v1/support_live_sessions/<id> — Einzelne Entity
  • POST /api/v1/support_live_sessions — Anlegen
  • PATCH /api/v1/support_live_sessions/<id> — Teil-Update
  • DELETE /api/v1/support_live_sessions/<id> — Soft-Delete
  • GET /api/v1/support_live_sessions/<id>/timeline — Audit + Aktivitäten

Suche