Skip to main content

Select team information on statement template

Contact Type Field in Contacts Module

Purpose / Description

Enable categorization of contacts by introducing a "Contact Type" field in the Contacts module. This lays the foundation for filtering contacts by role/purpose across the system (e.g., filtering "Team Contact" type contacts in the Agreements module).

Use Case 


As a user , I want to assign a "Contact Type" to each contact in the Contacts module, so that contacts can be categorized (e.g., "Team Contact").
Primary Actor(s)
Stakeholders and Interest 
Trigger A user creates a new contact or edits an existing contact in the Contacts module.
Pre-condition(s)
  • The Contacts module exists and is accessible to the user.
  • User has permission to create/edit contacts.
Post-condition(s)
  • The contact record is saved with a value in the "Contact Type" field.
  • The contact becomes available for selection in downstream modules (e.g., Agreements) if its type matches the expected filter.
Main success scenario

1. User navigates to the Contacts module.

2. User creates a new contact or opens an existing one for editing.

3. User selects a value from the "Contact Type" dropdown (e.g., "Team Contact").

4. User completes other required contact fields (First Name, Last Name, Phone, Email, etc.).

5. User saves the contact.

6. System stores the contact with the selected Contact Type.

Extensions
  • 3a. User leaves "Contact Type" unselected (if not mandatory): contact is saved without a type and will not appear in type-filtered dropdowns elsewhere.
  • 3b. User changes Contact Type on an existing contact already linked to an agreement (see Open Questions — impact on existing links).
Exception scenarios
  • 5a. Save fails due to system/network/database error → system displays error message, no data is persisted.
Special requirements
  • Dropdown must be extensible so new Contact Types can be added by an administrator without a code deployment (ideally configurable in a settings/admin area).
  • Field must be filterable/searchable in the Contacts list view.
Open questions
  • What happens to existing agreement links if a contact's type is changed away from "Team Contact" after being linked?
  • Who manages the list of available Contact Types (admin-configurable vs. hardcoded)?

Mockup

Functional Requirements

TitleDescription
FR-1.1: Add Contact Type fieldSystem shall provide a "Contact Type" field on the contact creation/edit form.
FR-1.2: Predefined valueSystem shall include "Team Contact" as an initial selectable value.


Field level specification 

Label

Mandatory 

EditableData TypeValue setDefaultData sample
Contact TypeNoYesSingle-select dropdownTeam ContactNone (blank/unselected)"Team Contact"

Team Contact Dropdown in Agreements Module

Purpose / Description

Allow users to select a "Team Contact" (from contacts flagged as Contact Type = "Team Contact") within the "Invoice Contact" section of an agreement's Details tab, linking that contact to the agreement for later use in invoice generation.

Use Case 


As a user creating or editing an agreement, I want to be able to select a "Team Contact", so that the correct team contact is linked to that agreement.
Primary Actor(s)
Stakeholders and Interest 
Trigger A user creates a new agreement or edits an existing agreement and navigates to the Details tab.
Pre-condition(s)
  • At least one contact exists in the Contacts module with Contact Type = "Team Contact" (US-1 completed).
  • User has permission to create/edit agreements.
  • The Agreements module's Details tab and "Invoice Contact" section already exist.
Post-condition(s)
  • The agreement is saved with a reference (link) to the selected Team Contact.
  • The linked contact's data becomes available for use in placeholder resolution (US-3) at invoice generation time (US-5).
Main success scenario

 1. User opens a new or existing agreement.

2. User navigates to the Details tab.

3. User scrolls to the "Invoice Contact" section.

4. System displays a "Team Contact" dropdown field, populated with all contacts where Contact Type = "Team Contact".

5. User selects a contact from the dropdown.

6. User saves the agreement.

7. System stores the link between the agreement and the selected Team Contact.

 

Extensions
  • 4a. No contacts exist with Contact Type = "Team Contact" → dropdown is empty, with a message such as "No team contacts available."
  • 5a. User changes the previously selected Team Contact on an existing agreement → system updates the link on save.
Exception scenarios
  • 6a. Agreement save fails due to missing other mandatory fields → validation error shown, Team Contact selection is retained on the form (not lost).
Special requirements
  • Show contact identifying info (e.g., Full Name) in the dropdown label rather than an internal ID.
  • The dropdown should be scoped by Entity
Open questions

 

Mockup

Functional Requirements

TitleDescription
FR-2.1: Add Team Contact dropdownSystem shall add a "Team Contact" dropdown field within the "Invoice Contact" section of the agreement Details tab.
FR-2.2: Filtered populationDropdown shall be populated exclusively with contacts where Contact Type = "Team Contact".
FR-2.3: Editable post-creationUsers shall be able to change the selected Team Contact after the agreement is created.
FR-2.4: Scope by EntityThe "Team Contact" dropdown should only display the contacts of the Entity's agreement


Field level specification 

Label

Mandatory 

EditableData TypeValue setDefaultData sample
Team ContactNoYesSingle-select dropdownDynamic — all contacts where Contact Type = "Team Contact" of the EntityNone (blank/unselected)

"Team Contact"

"Invoicing Team"

Placeholders for Contact Details

Purpose / Description

Create system placeholders representing Team Contact attributes (First Name, Last Name, Phone Number, Email) so these values can be dynamically inserted into invoice templates during document generation.

Use Case 


As a user creating or editing an agreement, I want to be able to select a "Team Contact", so that the correct team contact is linked to that agreement.
Primary Actor(s)
Stakeholders and Interest 
Trigger A system configurator/administrator sets up or updates invoice templates and needs to insert dynamic contact fields.
Pre-condition(s)
  • The placeholder engine/templating system used for invoice generation already exists and supports adding new placeholder types.
  • US-2 is implemented so agreements have a linked Team Contact to resolve placeholder values from.
Post-condition(s)
  • Four new placeholders are available system-wide for use in any template: First Name, Last Name, Phone Number, Email.
  • Placeholders correctly resolve to the linked Team Contact's data when a pdf document is generated.
Main success scenario

 1. Developer defines new placeholder keys within the placeholder configuration (e.g., {{team_contact.first_name}}).

2. Placeholders are registered in the system's placeholder library/catalog.

3. Placeholders are made selectable within the Template Settings UI (see US-4).

4. At generation time, system resolves each placeholder using the Team Contact linked to the agreement (from US-2).

 

Extensions4a. No Team Contact is linked to the agreement → placeholder resolves to blank
Exception scenarios
  • 4a. Linked contact record was deleted after being linked → system should handle gracefully (blank value + log/warning) rather than fail generation entirely.
Special requirements
  • Placeholder naming convention should be consistent and documented (e.g., team_contact.<field>) to support future contact types cleanly (e.g., billing_contact.<field>).
  • Placeholder resolution logic must be centralized so it can be reused by both PDF and ZUGFeRD generation engines.
Open questions

 

Mockup

Functional Requirements

TitleDescription
FR-3.1: Create placeholdersSystem shall provide four new placeholders: First Name, Last Name, Phone Number, Email — sourced from the Team Contact linked to the agreement.
FR-3.2: Placeholder resolutionSystem shall resolve placeholders at document generation time using the Team Contact reference stored on the agreement.
FR-3.3: Fallback handlingSystem shall apply a fallback blank when no Team Contact is linked.
FR-3.4: ReusabilityPlaceholders shall be usable across both PDF and ZUGFeRD generation processes.


Field level specification 

Placeholder Label

Mandatory 

EditableData TypeDefaultData sample
Team ContTeam Contact – First NameactNoYesTextBlank

 

"Invoicing"


Team Contact – Last NameNoYesTextBlank

"Team"

Team Contact – Phone NumberNoYesTextBlank

"+49 89 2489 2092"

Team Contact – EmailNoYesTextBlank

"invoicing-team@meag.com"

Placeholder Insertion in Entity Template Settings

Purpose / Description

Allow administrators to insert the new Contact placeholders (US-3) into the correct section of each entity's invoice template within the Entities module's Template Settings, so the values render correctly in the generated document layout.

Use Case 


As a user, I want to place the new Contact placeholders into the correct section of the entity's template settings, so that they render in the right position on generated invoices.
Primary Actor(s)
Stakeholders and Interest 
Trigger A system configurator opens Template Settings for a specific entity to design or update the invoice layout.
Pre-condition(s)
  • Placeholders from US-3 exist and are registered in the system.
  • The Entities module and its Template Settings feature already support inserting placeholders into defined sections.
  • User has administrative permission to edit template settings.
Post-condition(s)
  • The entity's invoice template contains the new placeholders positioned in the desired section (e.g., "Invoicing Team" box).
  • Future invoices generated for that entity render the resolved contact data in that location.
Main success scenario

 

1. User navigates to Entities module → selects an entity → opens Template Settings.

2. User locates the relevant section of the template (e.g., "Right" box).

3. User inserts the placeholders: First Name, Last Name, Phone Number, Email — in the desired order/format.

4. User saves the template settings.

5. System stores the updated template layout for that entity.

Extensions3a. Administrator formats placeholders with static labels or line breaks (e.g., "T {{phone}}", "E {{email}}") matching the attachment's layout style.
Exception scenarios
  • 4a. Save fails due to malformed placeholder tag → system shows a validation error and does not save.
Special requirements
  • Placeholder insertion should ideally use a visual or guided picker rather than requiring the admin to manually type placeholder syntax, to reduce errors.
  • Template settings should be configurable per entity, since different entities may have different letterhead layouts.
Open questions

 

Mockup

Functional Requirements

TitleDescription
FR-4.1: Placeholder availability in Template SettingsSystem shall make the four Contact placeholders selectable/insertable within an entity's Template Settings UI.
FR-4.2: Section-level placementUser shall be able to place placeholders within the specific target section (e.g., "Right" box) of the template.
FR-4.3: Per-entity configurationTemplate placeholder configuration shall be stored and applied independently per entity.
FR-4.4: ValidationSystem shall validate placeholder syntax before saving template changes.


Data Population in Generated PDF and ZUGFeRD Invoices

Purpose / Description

Ensure that when a PDF or ZUGFeRD invoice is generated, the system automatically resolves and populates the Team Contact's First Name, Last Name, Phone Number, and Email into the invoice using the placeholders configured in the entity's template — matching the existing layout/format.

Use Case 


As a user, I want to place the new Contact placeholders into the correct section of the entity's template settings, so that they render in the right position on generated invoices.
Primary Actor(s)
Stakeholders and Interest 
Trigger A user (or an automated process) generates a PDF and/or ZUGFeRD invoice for an agreement.
Pre-condition(s)
  • The agreement has a Team Contact linked (US-2).
  • The entity's template includes the Contact placeholders in the correct section (US-4).
  • Placeholder resolution logic is implemented (US-3).
Post-condition(s)
  • The generated PDF visually displays the correct Team Contact details in the designated section.
  • The generated ZUGFeRD file contains the same data, both visually (PDF/A layer) and structurally (XML data), if required.
Main success scenario

1. User triggers invoice generation (PDF and/or ZUGFeRD) for a given agreement.

2. System retrieves the agreement's linked Team Contact.

3. System resolves each placeholder (First Name, Last Name, Phone, Email) using that contact's data.

4. System renders the PDF with resolved values in the correct template section.

5. System generates the ZUGFeRD XML with corresponding structured contact data (if applicable per ZUGFeRD schema).

6. System outputs the final invoice document(s) to the user/downstream process.

Extensions
  • 2a. Agreement has no linked Team Contact → system applies fallback behavior as defined (blank, default contact, or blocks generation — per Open Question in US-3).
  • 5a. ZUGFeRD schema field mapping requires specific structured tags (e.g., SellerContact, BuyerContact) → system maps Contact fields accordingly.
Exception scenarios
  • 3a. Linked contact was deleted after linking, and no fallback is defined → generation fails or logs a data-integrity warning; process should not silently produce incorrect data.
  • 5a. ZUGFeRD structured data fails schema validation due to missing/invalid Contact field format (e.g., invalid email) → system flags an error before finalizing the invoice file.
Special requirements

 

Open questions

 

Mockup

Functional Requirements

TitleDescription
FR-5.1: PDF populationSystem shall populate resolved Team Contact data into the PDF at the placeholder locations defined in the entity's template.
FR-5.2: ZUGFeRD structured populationSystem shall populate the equivalent structured contact fields in the ZUGFeRD XML, per the applicable ZUGFeRD profile schema.
FR-5.3: ConsistencyData shown in the PDF visual layer shall match the data embedded in the ZUGFeRD structured layer.
FR-5.4: Fallback handlingSystem shall apply the defined fallback behavior when no Team Contact is available.