Life ConnectLife Connect
Wiki index
Architecture
Services
Concepts
Runbooks
Infra
Swagger Docs
GitHub
Wiki index
Architecture
Services
Concepts
Runbooks
Infra
Swagger Docs
GitHub
  • Archive
  • Data Dictionary
  • Functional Epics

    • DICTIONARY OF ATTRIBUTES
    • Search Condos
    • Display

      • DisplayAll

        • Display all - Contracts
        • Display all - invoices
        • Display all - parts
        • Display all - Persons Relationships
        • Display all - Persons
        • Display tickets
      • DisplayContract

        • Display bank account Contract
        • Display Condo Member Contract
        • Display contact contract
        • Display Employee Contract
        • Display Generic Contract
        • Display Insurance Contract
        • Display Legal Represent Contract
        • Display Oral Contract
        • Display Owner Contract
        • Display Condo Regulation Contract
        • Display rental Contract
        • Display Supplier Contract
        • Display Trustee Contract
      • DisplayDelegate

        • Display Delegate
      • DisplayHistory

        • Display history
      • DisplayPerson

        • Display Company Person
        • Display Condo Person
        • Display Division Person
        • Display Group Person
        • Display Indivision Person
        • Display Natural Person
        • Display Union Person
        • Display Unknown Person
      • DisplayPersonsContracts

        • Display all Interventions
      • DisplayProperty

        • Display part
        • Display part
      • UiPerson

        • Display "mini" Persons
    • Process

      • Create

        • Create property & condo
      • Delete

        • Delete objects according to state machine
      • RC Renewal

        • RC RESIDENTIAL - automatic renewal
      • Review

        • rent amount review - RC residential - creation
        • rent amount review - RC residential - take-over
      • Sell

        • Sell a unit
    • Reporting

      • GRR

        • GLOBAL RENT REPORT
    • Search

      • Search
    • StateMachine

      • CreatingContract

        • State machine - creating a rental contract
        • State machine - creating a rental delegate contract
        • State machine - Referencing a abstract part contract
        • State machine - Referencing a bank contract
        • State machine - Referencing a condo regulation contract
        • State machine - Referencing a contact contract
        • State machine - Referencing an employee contract
        • State machine - Referencing a generic contract
        • State machine - Referencing a legal represent contract
        • State machine - Referencing a owner contract
        • State machine - Referencing a rental contract
        • State machine - Referencing a supplier contract
        • State machine - Referencing a trustee contract
      • CreatingIntervention

        • State machine - creating a ticket
        • State machine - Referencing a message
      • CreatingInvoice

        • State machine - creating a incoming (supplier) invoice
      • CreatingPayments

        • State machine - creating an incoming payment
      • EncodingPart

        • CreatingPart

          • State machine - Referencing part relationships
          • State machine - Referencing a part
      • EncodingPerson

        • CreatingAddresses

          • State machine - Creating email address
          • State machine - Creating phone address
          • State machine - Creating postal address
          • State machine - Creating web address
        • CreatingPerson

          • State machine - Referencing a company person
          • State machine - Referencing a condo person
          • State machine - Referencing a division person
          • State machine - Referencing an group person
          • State machine - Referencing an indivision person
          • State machine - Referencing a natural person
          • State machine - Referencing a union person
        • CreatingShareHolders

          • State machine - valuing a shareholder
      • Scanning

        • State machine scanning - analyze a document
        • State machine scanning - matching a document
        • State machine scanning - encoding a document : related information
    • Utility

      • Allocation keys
      • Company settings
      • Document data & file
      • Revision Index
    • Validations

      • Shareholders validation
  • Implicit

    • Callback

      • Logging In
  • ProductBoard

    • Rental Process

      • Rental delegate process
    • Ticketing

      • Create a ticket - link a ticket in Outlook add-in - add a call - display a ticket
      • Display Person Info in Outlook add-in
  • Technical Epics

    • Indexation Feature Documentation
    • Rent Amount Management Feature Documentation
    • I have an API
    • I can store the balance of an account
    • I Have Person Notifications
    • 🧩 System Process Diagrams
    • The Team has a DEV environment
    • The Team is organized
    • Accounting

      • Re-generation of Invoices
      • I can call the rent for my Rental Contract
      • Payment Creation Strategy Feature Documentation
      • I Can Revese

        • Payment Reversal
      • I Have Invoices

        • I have direction on invoice's item level
      • I Have Subsidies

        • I Can Receive Family Allowance Payments - Technical Documentation
        • Subsidies + Direct Debit Documentation
    • Communication Module

      • Communication module
    • Contracts

      • I can have contract guarantors
      • API Models
      • I Have Call For Rent Process

        • Call For Rent (CFR) Process Documentation
      • Occupancy Compensation

        • **OCCUPANCY COMPENSATION Documentation**
      • State Machine

        • I can have the Rental Contract state machine
    • Database

      • Database Indexes
    • E2e Testing

      • I can create an E2E dataset
    • Env Setup

      • Adapt env to stateless UI build
      • Blockhound
      • Table of Environments and Their Specifications
      • Environment How-To
      • Java Flight Recorder Management Documentation
      • Local Environment Setup
      • Kubernetes Logs Retrieval Documentation
      • Monitoring
      • I can create a new organisation
      • Production Environment Configuration
      • Remote Environment Setup
      • Set up of separate DB for env
      • Terraform Aws S3 Buckets
      • adb-ui Service Version Update
    • Files

      • I can have tags for files
    • Globals

      • boundaries
      • boundaries
      • boundaries
      • boundaries
    • Messaging

      • MongoDB Trigger Model Documentation
    • Open Api

      • Swagger Documentation Guide
      • Swagger
    • Parts

      • I Have A Forecast And Actuals Module
      • I can have part equipments
    • Process

      • Pre-Meeting Questionnaire
      • I Can Release My Feature
    • Security

      • I can create and provision an organisation
      • a user is granted access to the application
    • Stress Test

      • Introduction
      • Reports

        • Introduction
        • Introduction
        • Introduction
        • Introduction
        • Introduction
        • Table of contents
    • Tickets

      • Ticket Details Functionality
    • Troubleshooting

      • Prometheus Memory Issue Handling
Last updated 2026-06-02

Call For Rent (CFR) Process Documentation

Context

The Call For Rent (CFR) process is a core business flow used to charge tenants for their rent. This is achieved by generating a hierarchy of accounting events.

There are two types of parent events:

  • INITIAL_RENT β€” when it's the first rent call.
  • RECURRING_RENT β€” for subsequent periods.

These parent events wrap a set of child accounting events:

Parent EventChild Events
INITIAL_RENTCALL_FOR_RENT, CALL_FOR_RENTAL_CHARGES, CFR_CHARGES_HOUSEHOLD_WASTE, CALL_FOR_DEPOSIT
RECURRING_RENTCALL_FOR_RENT, CALL_FOR_RENTAL_CHARGES, CFR_CHARGES_HOUSEHOLD_WASTE

Project Structure

Components:

  • adb-contracts: A BE service that exposes /propose and /process endpoints, reads and updates contract data, and coordinates with accounting.
  • adb-accounting: A BE service that handles accounting logic and data. It generates accounting events and corresponding entries.
  • MongoDB: Each service has its own MongoDB instance. For adb-contracts, it stores real and temporary contract data. For adb-accounting, it stores event and entry records.
  • MongoDB Triggers: Similar to SQL triggers, they react to insert/update/delete events on collections and can emit messages externally (in our case, to AWS).
  • AWS EventBridge: An event bus that routes triggered messages to specific SQS queues.
  • AWS SQS Queues: Queues that ensure reliable, asynchronous delivery of messages between services.
  • WebSocket (WS): Used by adb-contracts to push real-time propose results back to the frontend UI.

Architecture Overview

diagram


CFR Process Flows

A. User-Initiated Flows

A1. Propose Flow

The Propose Flow is the first step in the Call For Rent process. It allows users to preview the generation of accounting events for eligible contracts without making any real changes. This flow simulates the process and returns event data in real time.

  1. User clicks "Generate Call for Rent".
  2. Frontend sends a POST /contracts/accounting/rent/periods/{period}/propose request to adb-contracts.
  3. adb-contracts filters eligible contracts and saves them to the temporary propose_contracts collection.
  4. For each contract, it calls adb-accounting to simulate the generation of events.
  5. Event data is returned (not persisted).
  6. Final result is sent back to the user in real time via WebSocket.

diagram

A2. Process Flow

The Process Flow is the second step in the Call For Rent process. It finalizes the proposed contracts and updates their statuses in the database, triggering downstream event generation.

  1. After previewing results, the user selects the contracts to finalize.
  2. A POST /contracts/accounting/rent/periods/{period}/process request is sent.
  3. The adb-contracts service updates the real contract with a PROCESSING status.
  4. This change activates the downstream event generation flow.

diagram


B. DB-Initiated Flows

Triggered automatically after a contract is marked as PROCESSING.

  1. MongoDB contract-modified trigger detects the change.
  2. Event is sent to contracts-contract-modified SQS queue.
  3. adb-accounting listens and generates real accounting events and entries.
  4. Events and entries are saved in the adb-accounting MongoDB collections.
  5. adb-contracts is notified via accounting-contract-modified queue to update the contract's nextCallForRentPeriod.
  6. adb-contracts updates the contract with the new callForRentPeriods and nextCallForRentPeriod.
  7. The user can then view the updated contract with the new rent periods.
  8. The process is complete, and the contract is ready for further actions.

B1. Contract Modified β†’ Generate Events

diagram

B2. Accounting Events Saved β†’ Contract Final Update

diagram


Trigger & Queue Event Map

diagram


Post-CFR Actions

Once the Call For Rent (CFR) process is finalized and accounting events are created, both adb-accounting and adb-contracts perform additional actions to complete downstream workflows. These actions are automated and triggered by event-driven mechanisms.


On the adb-accounting Side

When a CALL_FOR_RENT event is stored in the accounting_events collection, the MongoDB accounting-event-modified trigger fires and emits a message to the accounting-accounting-event-modified SQS queue.

adb-accounting listens to this queue and processes the following logic:

  • Invoice for Management Fees

    • A new invoice is generated for the owner to reflect management fees charged by the platform.
  • Invoice for GLI Insurance (if applicable)

    • If the rental contract includes GLI insurance, an additional invoice is generated.
    • This invoice records the insurance-related charge.

These invoices are persisted and can be reviewed under the accounting records of the respective contract and organization.


On the adb-contracts Side

After the CFR period is marked as processed for a contract, adb-contracts automatically generates relevant tenant-facing files.

File 1: Individual Call For Rent Report (PDF)

  • A PDF file is generated summarizing the rent call for the tenant.
  • This file is sent to the adb-files service.
    • adb-files stores file metadata in its database.
    • The actual PDF is uploaded to AWS S3.
  • Once processed, the file becomes visible:
    • On the documents tab of the rental contract.
    • On the tenant's personal page.

This file serves as the tenant’s official notice that rent has been generated and is due.

File 2: Rent Review Notification (Conditional)

  • If a rent amount review took place in the called period:
    • A second notification PDF is generated to inform the tenant of the reviewed rent amount.
    • This file follows the same flow through adb-files and appears alongside the first document.

These files ensure the tenant is clearly informed and all compliance requirements are met.


Summary

  • CFR is a multi-stage process:
    • /propose β€” previews rent generation and events, without real data changes.
    • /process β€” finalizes and saves changes using Mongo triggers + SQS.
  • Each service owns its data and reacts via event-driven architecture.
  • Diagrams break down the logic across UI, services, data, and events.

Related Endpoints

  • POST /contracts/accounting/rent/periods/{period}/propose
  • POST /contracts/accounting/rent/periods/{period}/process
  • POST /accounting/events/propose
  • POST /files
  • Triggers:
    • contract-modified
    • accounting-event-modified
    • accounting-entry-modified

Edit this page
Last Updated:
Contributors: Yevhenii Khudolii