Contract Ticket Rule Schema
Felder
Contract Ticket Rule Schema
ADR 0439 — tenant-wide rule that turns activated contract positions into recurring tickets (interval + lead time + ticket template + checklist/task templates).
name
Rule name (shown in settings and on the contract Tickets tab).
description
Optional internal note on what this rule covers.
isActive
Inactive rules are neither suggested nor executed; existing activations on contracts stay dormant until the rule is reactivated.
matchArticleIds
Catalog articles that suggest this rule for a contract position (matched against position.articleId on both items[] and licensePositions[]). Positions without an articleId can only be activated manually.
interval
Recurring cadence between due dates. Recurring subset of the contract-item interval enum (no ONE_TIME/NONE/DAILY — a rule always recurs).
WEEKLYMONTHLYQUARTERLYSEMI_ANNUALYEARLYTWO_YEARLYTHREE_YEARLYleadDays
Days before the due date the ticket is created (ticket.dueAt stays the due date). 0 = create on the due date.
ticketTemplate
Template for the generated ticket. `title` and `descriptionHtml` support the placeholders {contract.name}, {contract.contractNumber}, {position.name}, {party.name} and {dueDate}.
title
Ticket title template (placeholders allowed).
descriptionHtml
Ticket description template, HTML (placeholders allowed).
priority
Priority of the generated ticket.
LOWNORMALHIGHCRITICALticketType
Ticket type key (references a ticket_type entity, tenant-configurable). null = tenant default.
orgUnitId
Team (org unit) the generated ticket is routed to. Assignment comes from the rule, not the contract (ADR 0439, decision 5).
assignedToId
Optional fixed assignee for the generated ticket.
checklistTemplateIds
checklist_template ids instantiated onto the generated ticket (spawnChecklistFromTemplate, best-effort).
taskTemplateIds
task_template ids instantiated onto the generated ticket (internal API bridge, flat-task fallback, best-effort).
Keine Felder passen zum Filter.
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/contract_ticket_rules— Liste, paginiert + filterbarGET /api/v1/contract_ticket_rules/<id>— Einzelne EntityPOST /api/v1/contract_ticket_rules— AnlegenPATCH /api/v1/contract_ticket_rules/<id>— Teil-UpdateDELETE /api/v1/contract_ticket_rules/<id>— Soft-DeleteGET /api/v1/contract_ticket_rules/<id>/timeline— Audit + Aktivitäten