# [Digital](../domain.md) ## Entities ### Service Agent A Service Agent is a Party Role representing a staff member who serves customers — at a counter, on the phone, or in a chat window. Agents are modelled as a role for the same reason customers are. An agent is a person, that person may also be a customer of the business, and treating them as one Party wearing two roles avoids the awkward duplicate that appears when staff buy their employer's products. Recording which agent handled a transaction is what makes service quality measurable and gives every action an accountable human. ```mermaid --- config: layout: elk --- classDiagram class ServiceAgent{ * Service Agent Identifier : string Employee Number : string Assigned Location Identifier : string } ServiceAgent --|> PartyRole ServiceAgent "1" --> "0..*" Transaction : processes ServiceAgent "0..*" --> "1" ServiceLocation : assigned to class PartyRole["Party Role"] class Transaction["Transaction"] class ServiceLocation["Service Location"] ``` ```yaml extends: Party Role existence: independent mutability: slowly_changing attributes: Service Agent Identifier: type: string identifier: primary description: Unique identifier for the service agent role instance. Employee Number: type: string description: Internal staff identifier of the person acting as agent. Assigned Location Identifier: type: string description: The service location the agent normally works from. ``` ```yaml governance: pii: false classification: Internal retention: 7 years retention_basis: Domain default description: > Agent records identify staff rather than customers, but they are still about people: agent activity data should be used to improve service, not to build surveillance metrics about individual employees. access_role: - SERVICE_MANAGER - DATA_ANALYST ``` ## Relationships ### Service Agent Processes Transaction A Service Agent can handle one or more Transactions on a customer's behalf. ```yaml source: Service Agent type: associates_with target: Transaction cardinality: one-to-many granularity: atomic ownership: Service Agent ``` ### Service Agent Assigned To Service Location A Service Agent is assigned to a Service Location for operational purposes. ```yaml source: Service Agent type: assigned_to target: Service Location cardinality: many-to-one granularity: atomic ownership: Service Agent ```