Generate the notice of termination
Like “Decide before the notice deadline”, the workflow starts with “Deadline due” when the reminder of a contract’s “Notice deadline” comes, and the deadline’s owner gets the task “Verlängern oder kündigen?”. “Approve” keeps the contract. “Reject” with a comment terminates it: the workflow sets the “Contract status” to “Terminated”, and the card “Generate document” writes a document of the type “Correspondence” from the released template “Kündigungsschreiben”, with the subject “Kündigung”, the counterparty, today’s date and the direction “Outgoing”. The letter goes into the contract’s “Counterparty file”, and once Acriva has processed it, the workflow “Ausgehendes Schreiben signieren” starts on it with the card “Send for signature”. The template is your workspace’s own: after copying, choose your released template in the step “Kündigungsschreiben erzeugen”. It reads the contract number, the notice deadline and the term from the contract itself. Without the released template, the counterparty file or the add-on “Templates”, the card takes the exit “skipped” and the deadline’s owner writes the notice themselves. The letter is generated on behalf of the person who uploaded the contract, and it is confidential when the contract is. The AI never decides: a person always takes the decision. Needs the workflow designer and the add-on “Templates”.
The workflow
Section titled “The workflow”The workflow starts for every document of the type contract. Its file workflow.yaml:
$schema: 'https://docs.acriva.de/schemas/workflow.schema.json'format: 1schemaVersion: 10sdk: '1.0.0'key: termination-lettername: Kündigungsschreiben erzeugentemplate: customtrigger: documentType: contract deadline: stage: reminder kind: noticefields: []start: decidesteps: - kind: humanTask name: decide label: Verlängern oder kündigen? taskKind: review assignees: - when: null assignee: kind: deadlineOwner fallback: kind: role role: Geschäftsführung options: excludeRequester: false excludeActorsOfSteps: [] pickFile: false deadline: dateField: noticeDate remindBeforeWorkingDays: 10 next: keep onRejected: terminate - kind: notification name: keep label: Vertrag läuft weiter recipients: - kind: deadlineOwner notice: forInformation next: kept - kind: setField name: terminate label: Status „Gekündigt“ assignments: - field: contractStatus source: constant value: terminated next: letter - kind: generate name: letter label: Kündigungsschreiben erzeugen template: Kündigungsschreiben templateType: correspondence mapping: - targetKey: subject source: constant constant: Kündigung - targetKey: correspondent source: field sourceKey: counterparty - targetKey: letterDate source: today - targetKey: direction source: constant constant: outgoing title: Kündigungsschreiben filing: partnerFile startWorkflow: sign-letter next: terminated onSkipped: writeByHand - kind: humanTask name: writeByHand label: Kündigung selbst schreiben taskKind: acknowledge assignees: - when: null assignee: kind: deadlineOwner fallback: kind: role role: Geschäftsführung options: remindAfterWorkingDays: 2 excludeRequester: false excludeActorsOfSteps: [] pickFile: false next: terminated - kind: end name: kept label: Läuft weiter outcome: approved - kind: end name: terminated label: Gekündigt outcome: completed