Email Notification Logic
Case 1: New Case Creation
When a new case is created in the system, an automated email notification is triggered and sent to the appropriate recipients. The business logic governing this process is outlined below:
-
-
The system first verifies whether the newly created case is associated with a specific company.
-
If a company is linked to the case, the system attempts to identify all users assigned to that company.
-
If company users are found, they are designated as the recipients of the notification email.
-
In the event that no company users are available, the system proceeds to identify users holding a legal role (e.g., lawyers) to receive the notification.
-
If no eligible recipients are identified through either of the above steps, a predefined fallback email address is used to ensure the notification is delivered.
- production default email: stefan.kuehleis@kuehleisgroup.de
- staging default email:
-
The system then sends an email with the subject “Neuer Hinweisgeberfall” to the determined recipients, informing them of the newly created case.
-
Case 2: Follow-Up Case
This process ensures that cases in the system are not left unanswered for too long. When a case remains inactive (i.e., no response has been given) for several days, the system automatically sends reminder emails to responsible users to follow up. This helps maintain timely responses and accountability.
The system checks all open cases every few hours. A follow-up email is sent if a case has not received a reply within 3, 5, or 7 days. The reminder urgency depends on how long the case has been idle.
The business logic governing this process is outlined below:
-
If the case is assigned to a company:
-
It checks for users linked to that company.
-
These users receive a follow-up reminder email.
-
-
If no company users are found:
-
It checks whether there are any lawyers already linked to the case.
-
If found, those lawyers receive the reminder.
-
-
If no lawyers are linked at all:
-
The system sends the reminder to the fallback email address, to ensure that someone is made aware of the case.
-
Need to double confirm if there is no company users, will it send to the lawyer that assigned to this case. or every time is sent to the default email