entity

Franchise Partner

The link between a franchise unit and a person behind it, with one or more roles - FRANCHISEE (leads the unit) or OPERATING_PARTNER (takes part in operating it). Travels on the Franchise Kafka topic keyed by the franchise.

Entity

Overview

Partners are replaced as a set whenever a franchise is created from a contract, its legal information is edited, or a contract is applied onto it: rows are removed, added and updated by diff, and one message per partner goes out (Franchise Partner RemovedFranchise Partner RemovedEventv1.2.0A person stopped being a partner of a franchise unit. One message per partner. Consumed by cna-nexus to invalidate the e...Ownercna-platformSchemaMapView docs, Franchise Partner AddedFranchise Partner AddedEventv1.2.0A person became a partner of a franchise unit, with their roles and whether they are a primary contact of the unit. One ...Ownercna-platformSchemaMapView docs, Franchise Partner UpdatedFranchise Partner UpdatedEventv1.2.0The roles or the primary contact flag of a franchise partner changed. Carries both before and after. Consumed by cna-nex...Ownercna-platformSchemaMapView docs) in the same commit. Rows are hard-deleted, which is why the partner events exist: without them the economic group statistics cache would never notice a removal.

Since 1.1.0 the link carries isPrimaryContact, whether the partner is a primary contact of the franchise. Operations and Implementation set it by hand in cna-nexus, through the operation that sets the primary contacts of a franchise; contracts never set it. The flows that replace the partners as a set keep the flag of whoever stays, add newcomers unflagged and drop it with whoever leaves. The partner events carry it since their 1.2.0; the franchise snapshots do not.

Partners also travel inside the Franchise CreatedFranchise CreatedEventv1.2.0A franchise unit was created in CNA Nexus by activating an opening contract. Full snapshot of the unit; cna-one mirrors ...Ownercna-platformSchemaMapView docs and Franchise UpdatedFranchise UpdatedEventv1.2.0A franchise unit changed in CNA Nexus - edited in one of the franchise screens, re-activated from a contract, or amended...Ownercna-platformSchemaMapView docs snapshots, without their roles. There each partner is identified by id, the person id (personId here), never by the id of the junction row; the partner events carry the same value in person.id. CNA OneCNA OneServicev1.0.0Franchise operating system (franchises and employees, pricing, products and learning books, school operations). Publishe...PublishesGrantApplicationAccess, EmployeeCreated +6SubscribesInviteUser, FranchiseCreated +12Ownercna-platformMapRepoView docs turns those into employees with the FRANCHISEE job role.

The link is not the person. A change to the person’s own data (name, contacts, birth date) does not publish any partner event; it is the fact of PartnerPartnerEntityv1.0.0A person (common.persons in Nexus) in their capacity as partner of one or more franchise units - the identity and contac...Ownercna-platformView docs and travels as Partner UpdatedPartner UpdatedEventv1.0.0The personal data of a franchise partner changed in CNA Nexus - name, legal name, e-mail, phone or birth date. Snapshot ...Ownercna-platformSchemaMapView docs on Partner (Kafka topic)Partner (Kafka topic)Channelv1.0.0Kafka topic for the Partner aggregate - a person in their capacity as partner of one or more franchise units. Carries Pa...Ownercna-platformView docs (target contract, not implemented yet).

NameTypeRequiredDescriptionReference
idstringRequiredInternal id (UUID) in franchise.franchise_partners.—
franchiseIdstringRequiredThe unit the person is a partner of. Kafka message key of the partner events.
FranchiseProperty: id
personIdstringRequiredThe person (common.persons) - name, document, contacts. Changes to the person's own data travel as PartnerUpdated on the Partner topic, keyed by this id.
PartnerProperty: id
rolesstring[]RequiredOne or more of FRANCHISEE and OPERATING_PARTNER. Changing them publishes FranchisePartnerUpdated.—
isPrimaryContactbooleanRequiredWhether the partner is a primary contact of the franchise, the partner the franchisor team usually talks to. Independent of the roles; a franchise may have none, one or several. Set by hand in cna-nexus, never by a contract; false by default. Changing it publishes FranchisePartnerUpdated.—

Custom properties

PropertyValue
Kafka Topicx-kafka-topicFranchise
Routing Keyx-routing-keyfranchiseId