Recipient
Recipient Management
This document outlines the logic for managing Recipient entities within the Entity Management Service.
Create Logic
Whenever the system encounters:
New
Internal Number:A new Recipient Group record is created.
A single Recipient (Child) record is created within the new Group, even if the Recipient lacks a VAT number.
Update Logic
For existing Recipients (identified by Internal Number):
The system considers three cases:
Recipient with existing VAT: The Recipient data is updated.
Recipient with new VAT: A new Recipient is created within the existing Group.
Recipient without VAT: A new Recipient is created within the existing Group.
Delete Logic
Two scenarios exist for deleting Recipients:
Delete Individual Recipient (Child):
The relationship between the Recipient and associated Invoices is de-linked.
The Recipient record is deleted.
Delete Recipient Group:
Prerequisites: All child Recipients within the Group must be deleted beforehand.
The system de-links relationships between the Group and associated Invoices and Vendors.
The Recipient Group record is then deleted.
Additional Notes:
All formatted numbers (IBAN, VAT, TAX, etc.) should adhere to a format accepting only letters and numbers.
Recipient Matching
This document outlines the logic for matching Recipient entities within the Entity Management Service.
Matching Factors (Priority Order)
VAT Number
Recipient Name
Matching Algorithm
The system searches for an exact match of the provided VAT Number against all known Recipients.
If no exact match is found, it applies fuzzy matching with a 75% similarity threshold on the Recipient Group name.
Additional Notes
Fuzzy matching uses the "ratio" method.
Invoice Linking Logic
Each Invoice can be linked to multiple Recipients.