Contract
A franchise contract in CNA Nexus - opening, renewal or resale - uploaded as a document, analysed by AI, reviewed by a person and activated, at which point it becomes the source of truth for a franchise unit. Aggregate root of the Contract Kafka topic.
Overview
A contract enters Nexus as a document upload. It is analysed by AI (see the AI topic), lands in DRAFT for a person to review, and when saved goes to ACTIVATING and a Contract Activation RequestedContract Activation RequestedEventv1.0.0A user saved a contract for activation. cna-nexus's activation consumer turns it ACTIVE and creates or updates the franc...Ownercna-platformSchemaMapView docs is published. The activation consumer turns it ACTIVE and projects it onto the franchise: creating the Franchise on the first activation of an opening, or overwriting the existing franchise aggregate for renewals, resales and re-activations. A renewal also flips the previous contract to RENEWED. Every later edit of an active contract re-runs the activation so the franchise never drifts from the contract.
Amendments (attachments, addenda, rescissions) are separate documents attached to the contract, see Contract AmendmentContract AmendmentEntityv1.0.0A supplementary document attached to a contract - attachment, addendum or rescission - carrying one change per contract ...Ownercna-platformView docs.
| Name | Type | Required | Description | Reference |
|---|---|---|---|---|
id | string | Required | Internal id (UUID) in contract.contracts. Kafka message key of the Contract topic. | |
identifier | string | Optional | Human-readable identifier generated when the AI analysis completes. | |
type | stringEnum:
| Required | Kind of contract. Activating an OPENING with no franchise creates the franchise; RENEWAL and RESALE apply onto an existing one. | |
status | stringEnum:
| Required | Lifecycle. PENDING after upload; DRAFT after AI analysis; ACTIVATING when saved for activation; ACTIVE after activation; ACTIVATION_FAILED when the consumer fails; RENEWED when a renewal replaces it. | |
franchiseId | string | Optional | The franchise unit this contract governs. Null until the first activation of an opening creates it. | |
fileId | string | Optional | The uploaded document (storage.files) the AI analysis reads. | |
createdById | string | Required | User who uploaded the contract. | |
currentAssigneeId | string | Required | User currently responsible for the contract. | |
signedAt | string | Optional | Signature date, extracted by the AI analysis or edited by the reviewer. | |
activatedAt | string | Optional | When the contract was activated. | |
startedAt | string | Optional | Start of the contract term. | |
endedAt | string | Optional | End of the contract term. |
Custom properties
| Property | Value |
|---|---|
| Kafka Topicx-kafka-topic | Contract |
| Routing Keyx-routing-key | contractId |