entity

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.

Entity(Aggregate Root)

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.

NameTypeRequiredDescriptionReference
idstringRequiredInternal id (UUID) in contract.contracts. Kafka message key of the Contract topic.—
identifierstringOptionalHuman-readable identifier generated when the AI analysis completes.—
typestring
Enum:
  • OPENING
  • RENEWAL
  • RESALE
RequiredKind of contract. Activating an OPENING with no franchise creates the franchise; RENEWAL and RESALE apply onto an existing one.—
statusstring
Enum:
  • PENDING
  • PROCESSING_FAILED
  • DRAFT
  • ACTIVATING
  • ACTIVATION_FAILED
  • ACTIVE
  • CANCELLED
  • EXPIRED
  • RENEWED
  • DELETED
  • INACTIVE
RequiredLifecycle. 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.—
franchiseIdstringOptionalThe franchise unit this contract governs. Null until the first activation of an opening creates it.—
fileIdstringOptionalThe uploaded document (storage.files) the AI analysis reads.—
createdByIdstringRequiredUser who uploaded the contract.—
currentAssigneeIdstringRequiredUser currently responsible for the contract.—
signedAtstringOptionalSignature date, extracted by the AI analysis or edited by the reviewer.—
activatedAtstringOptionalWhen the contract was activated.—
startedAtstringOptionalStart of the contract term.—
endedAtstringOptionalEnd of the contract term.—

Custom properties

PropertyValue
Kafka Topicx-kafka-topicContract
Routing Keyx-routing-keycontractId