---
tags: [companyuser, service]
module: CompanyUser
---

# NotificationServices

## Connections
[[_CompanyUser]] · [[[Model]User]] · [[[Controller]DashboardController]] · [[[Job]Jobs]] · [[[Cross]CrossModuleDependencies]]

## Source
`Modules/CompanyUser/Services/` (notification-related)
`Modules/CompanyUser/Notifications/`
`Modules/CompanyUser/Emails/`

## Notification Services
| Service | Responsibility |
|---|---|
| `GetNotificationsService` | Fetches paginated Laravel database notifications for the current user |
| `ShowNotificationService` | Marks notification as read + returns redirect URL |
| `DeletingNotificationsService` | Deletes all notifications for current user |
| `ContentGeneratorFactoryService` | Factory that resolves the correct content generator based on notification type |

## Email Services
| Class | Template | Trigger |
|---|---|---|
| `ReferralCongratulationsEmail` | referral/congratulations | Existing user whose referral just joined |
| `ReferralCongratulationsNewUserEmail` | referral/congratulations_new_user | New user who signed up via referral |
| `ReferralRequestMail` | referral/request | Invite email sent to referral candidate |
| `SendEmailNotificationToVomTeamForMarketplaceAccess` | marketplace_access | VOM team notified when user requests integration access |

## Notification Content Generators (cross-module)
Content generators from other modules call back into CompanyUser notifications:
- [[[Cross]CrossModuleDependencies#Sales]] — invoice due, payment received
- [[[Cross]CrossModuleDependencies#Purchases]] — bill due
- [[[Cross]CrossModuleDependencies#VomPay]] — `NotifySupplierApprovalContentGenerator`, `NotifySupplierRejectionContentGenerator`

## Jobs
[[[Job]Jobs#SendReferralEmailJob]] — async email dispatch
