API Docs Help

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:

    1. Recipient with existing VAT: The Recipient data is updated.

    2. Recipient with new VAT: A new Recipient is created within the existing Group.

    3. Recipient without VAT: A new Recipient is created within the existing Group.

Delete Logic

Two scenarios exist for deleting Recipients:

  1. Delete Individual Recipient (Child):

    • The relationship between the Recipient and associated Invoices is de-linked.

    • The Recipient record is deleted.

  2. 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)

  1. VAT Number

  2. Recipient Name

Matching Algorithm

  1. The system searches for an exact match of the provided VAT Number against all known Recipients.

  2. 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.

Last modified: 20 October 2024