Webhooks & Email Triggers#
Two related mechanisms fire outbound signals when business events happen: webhooks (HTTP POST to external URLs) and email triggers (configurable email templates sent to configured recipients).
Webhooks#
WebhookControllerexposes the endpoint / config UI.- Subscribed events fan out to registered URLs when they fire (e.g.
ShipBill.Created,WO.Closed).
Email triggers#
WmTriggerEmails— templates and recipients per event type. Managed viaWmTriggerEmailsController.WmTriggersActionSubsc— subscription of a recipient / role / group to a trigger. Managed viawmTriggersActionSubscController.WmTriggerNotificationHelper— in-app notification counterpart (bell-icon notification, not email).
Notification pollers#
The ManExService runs pollers that convert queued events into actual sends:
| Trigger | Purpose |
|---|---|
NotificationPoller | Dispatches queued in-app / email notifications. |
MirsNotificationTrigger | MIRS-specific notification dispatch. |
MxNoteReminderTrigger | Follow-up reminders on notes. |
CalenderTrigger | Calendar / scheduled events. |
LcPoller | Letter-of-credit polling. |
AutoLogoutPoller | Idle-session auto-logout. |
Business rules#
- Email sending must not block the originating web request — enqueue and let the poller send.
- Deliverability failures are logged but do not roll back the underlying business event (e.g. a Ship Bill save succeeds even if the notification email fails).
- Webhook secrets / signing are per-endpoint; never log the full payload if it contains a signed body.
Where it lives#
| Layer | File |
|---|---|
| Controller | WebhookController, WmTriggerEmailsController, wmTriggersActionSubscController, DeliverNotificationController |
| Helper | WmTriggerEmailsHelper.cs, WmTriggerNotificationHelper.cs, MnxEFModel/Helper/Notification/MnxTriggersActionHelper.cs |
| Service | ManExService/NotificationPoller.cs, MirsNotificationTrigger.cs, MxNoteReminderTrigger.cs, CalenderTrigger.cs, LcPoller.cs, AutoLogoutPoller.cs |