Skip to main content
A notification is a message sent to a recipient about an event. Notifications can be:
  • Direct: Sent to a specific recipient.
  • Broadcast: Sent to all recipients subscribed to a target.
Notifications include a payload (custom data) and are categorized by their target. A direct notification can also fan out to email by including an email block on the send — see mediums. Email is direct-only; broadcasts remain in-app. On a direct send the payload is optional: omit it and Bodhveda delivers the email without creating an in-app notification (an email-only send). A send must carry at least one of payload or email. Broadcasts always require a payload.

Status

Every notification carries a status — the in-app outcome, resolved asynchronously after the send is accepted: not_requested is the odd one out: it is set when the send is accepted and never changes, because there is nothing to resolve. Those notifications are hidden from the recipient’s feed, unread count, and mark-all-read — but they still carry the email delivery outcome, so you can retrieve one by id to see whether the email sent. Each other medium’s outcome lives on its own delivery record rather than on this scalar — retrieve a notification by id to read the email outcome alongside status. A direct notification will always be delivered to the recipient unless the recipient has unsubscribed that target. A broadcast notification will only be delivered to the recipients who are subscribed to the target.

How does Bodhveda determine if a recipient should receive a broadcast notification or not?

Let’s assume a broadcast was sent for a new comment that was made on post with id 12345. The target used for this broadcast is posts:12345:new_comment. Bodhveda will lookup recipients who have subscribed to this target via either posts:12345:new_comment or via posts:any:new_comment target. any has special behaviour in Bodhveda. Learn more about targets and preferences.