Broadcasts & Notifications

Send campaigns and deliver in-app and email notifications. This guide follows version 3.1.7 (03acdf712c).

For inbound email, see Email & Mail Worker.

Broadcasts

backend/core-api/src/modules/broadcast/ (graphql/schemas/{index,engage}.ts, db/definitions/{engages,deliveryReports,broadcastTraces,smsRequest}.ts, trpc/broadcast.ts, worker/, trackers/):

  • An engage message defines kind, messenger|email|sms channel, method, targetType/targetIds, title, fromUserId/fromEmail, cpId, and isDraft/isLive.
  • Delivery is tracked via DeliveryReports, BroadcastTraces, SmsRequests, and Logs. Email sending uses SES-flavored headers built in broadcast/utils/email.ts.

Draft, preview, and target a small segment before going live. A broadcast is not a transactional API; track deliveries through the report collections.

Notifications

backend/core-api/src/modules/notifications/ (graphql/schema/{index,subscription}.ts, db/models/{EmailSenders,EmailAddresses,EmailDeliveries,EmailRamp}.ts, trpc/email.ts, routes.ts):

  • GraphQL subscriptions push realtime updates; the email pipeline (Senders/Addresses/Deliveries/Ramp/Configs/Settings) manages outbound mail state.
  • Shared schemas and helpers live in backend/erxes-api-shared/src/core-modules/notifications/.

Plugins extend notifications through meta/notifications.ts and render entries in their own NotificationsWidgets.

Verify

  1. Send a test broadcast to a seeded segment and check delivery reports.
  2. Trigger a notification (assign a task or ticket) and confirm it appears for the recipient and via subscription.
  3. Check the email delivery collections when outbound mail is enabled.

Source references

Was this helpful?