Cases
Bundled legal matter/case management module with clients, assigned lawyers, parties, key dates, communication logs, linked entities, and cases agent tools.
What it does
cases is a bundled iframe module for legal matter and case management (Akten/Mandate): each case carries a client (Mandant), an assigned lawyer, workflow status, priority, practice area, court references, an opponent summary, and a conflict-check state. Around the core record it manages parties, key dates (deadlines, hearings, filings, limitation dates), a communication log, and links to existing Clapilot documents, tasks, calendar events, emails, drafts, and notes — plus a combined timeline over all of it.
How to open it
- Web:
/modules/cases(bundled module, slugcases); deep-link a case with?case_id=<uuid>, and the UI language follows theui_languageparameter (de/en/it, default de). - Manifest:
bundled-modules/cases/module.json; UI:bundled-modules/cases/index.html(iframe renderer); API:bundled-modules/cases/api/handler.mjs. - The module is bundled; it starts uninstalled on new minimal-policy instances and remains installed on grandfathered legacy-policy instances. Admins can install or uninstall it from the module store. It does not require developer mode.
- The database schema (
legal_casesand related tables) is created automatically on the module API's first request frombundled-modules/cases/migrations/001_cases.sql.
Key workflows
Manage the case list
- The left pane lists cases ordered by priority and next due date, with a search field (matches title, case number, practice area, opponent, court reference, and client name) plus status and lawyer filters.
- "New case" opens a dialog with title, case number, status, priority, practice area, client, lawyer, court fields, opponent summary, conflict state, and description.
Work a case in the detail pane
The detail pane shows hero facts and six tabs:
- Overview — core metadata, conflict-check panel (status
unchecked/clear/possible_conflict/conflictwith notes; changing the status stamps who checked and when), court panel, and linked-item counts. - Communication — chronological log entries with channel (
email,phone,meeting,letter,portal,fax,other), direction (incoming,outgoing,internal,note), subject, summary, and participants. - Documents — documents linked to the case; a linkable search finds existing Dokumente to attach.
- Tasks & dates — linked tasks plus case key dates (
deadline,hearing,filing,limitation,appointment,review,other) with due date, all-day flag, status (open/done/cancelled), notes, and an optional linked calendar event. - Parties — people/organizations with role
client,opposing_party,opposing_counsel,court,witness,expert,insurance, orother, plus contact details and notes. - Timeline — merged, newest-first view of communications, key dates, and entity links, filterable by group.
Link existing Clapilot records
Attach existing documents, tasks, calendar events, emails, drafts, or notes to a case; the module API resolves display labels from the source tables, and links are idempotent per (case, entity type, entity id).
How the agent can drive it
The native runtime exposes first-class Cases tools (tool family cases_, active on the Cases module page):
cases_list— list cases with client, lawyer, deadline, conflict, and status context; filters:search,status,mandant_id,assigned_user_id,practice_area,limit(1-300).cases_get— read one case byidincluding linked parties, key dates, communications, documents, tasks, and timeline.cases_create— create a case; requiredtitle; optional case number, status, priority, practice area,mandant_id(client),assigned_user_id(lawyer), court fields, opponent summary, conflict status/notes,opened_at, description.cases_update— update case metadata, workflow status, assigned lawyer, court references, or conflict-check state byid.cases_delete— delete one case byid.cases_link_entity/cases_unlink_entity— attach or remove adocument,task,calendar_event,email,draft, ornotelink on a case.cases_add_communication— add a log entry (requiredcase_id,summary; optional channel, direction,occurred_at, subject, participants).cases_add_key_date— add a deadline/hearing/filing/limitation/appointment/review date (requiredcase_id,title,due_at; optional kind,all_day, notes,calendar_event_id).
On the module page the agent is instructed to answer case questions with cases_list/cases_get instead of manually combining Mandanten, Dokumente, Aufgaben, and Kalender.
Module API reference
Base: /api/modules/cases/api
| Route | Purpose |
|---|---|
GET /health | health check |
GET /options | client (Mandanten) and user pickers |
GET /cases, POST /cases | list (with q, status, practice_area, mandant_id, assigned_user_id, limit, offset) / create |
GET /cases/:id, PATCH /cases/:id, DELETE /cases/:id | read/update/delete one case |
GET /cases/:id/overview, GET /cases/:id/timeline | aggregated counts / merged timeline (filter, limit, offset) |
GET/POST/PATCH/DELETE /cases/:id/parties[/:partyId] | manage parties |
GET/POST/PATCH/DELETE /cases/:id/key-dates[/:keyDateId] | manage key dates |
GET/POST /cases/:id/communications | list/add communication log entries |
GET/POST/DELETE /cases/:id/links[/:linkId] | manage entity links (delete also accepts entity_type + entity_id) |
| `GET /linkable?type=documents | tasks |
Configuration & limits
- No module settings page; behavior is fixed by the API. List page size defaults to 80 (max 300); timeline pages default to 40 (max 120); linkable search returns up to 100 rows.
- Data model (module migration
bundled-modules/cases/migrations/001_cases.sql):legal_cases,legal_case_parties,legal_case_key_dates,legal_case_communications,legal_case_links. Deleting a case cascades to its parties, dates, communications, and links. - Cases reference existing
mandantenandusersrows; deleting those sets the case fields to null rather than deleting the case.
Troubleshooting
- "DATABASE_URL is missing" errors: the module API needs the app database; without
DATABASE_URLin the runtime environment the Cases API is disabled. - A link shows a raw UUID as its label: the linked source record was deleted or has no title; set an explicit
labelon the link.
