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#

  • WebhookController exposes 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 via WmTriggerEmailsController.
  • WmTriggersActionSubsc — subscription of a recipient / role / group to a trigger. Managed via wmTriggersActionSubscController.
  • WmTriggerNotificationHelper — in-app notification counterpart (bell-icon notification, not email).

Notification pollers#

The ManExService runs pollers that convert queued events into actual sends:

TriggerPurpose
NotificationPollerDispatches queued in-app / email notifications.
MirsNotificationTriggerMIRS-specific notification dispatch.
MxNoteReminderTriggerFollow-up reminders on notes.
CalenderTriggerCalendar / scheduled events.
LcPollerLetter-of-credit polling.
AutoLogoutPollerIdle-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#

LayerFile
ControllerWebhookController, WmTriggerEmailsController, wmTriggersActionSubscController, DeliverNotificationController
HelperWmTriggerEmailsHelper.cs, WmTriggerNotificationHelper.cs, MnxEFModel/Helper/Notification/MnxTriggersActionHelper.cs
ServiceManExService/NotificationPoller.cs, MirsNotificationTrigger.cs, MxNoteReminderTrigger.cs, CalenderTrigger.cs, LcPoller.cs, AutoLogoutPoller.cs