-
Notifications
You must be signed in to change notification settings - Fork 110
Clean up of the notification concept page #886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Aviatorscode2
wants to merge
2
commits into
main
Choose a base branch
from
notification-concept-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ description: 'Learn about the Novu notifications lifecycle and the key entities | |
icon: 'BellRing' | ||
--- | ||
|
||
In Novu, notifications are the core building blocks of your product’s communication experience. When your user receives a message via an in-app alert, an email, or a push notification, what they’re seeing is the final output of a notification. | ||
In Novu, _notifications_ are the core building blocks of your product’s communication experience. When your user receives a message via an in-app alert, an email, or a push notification, they’re seeing the final output of a notification. | ||
|
||
Notifications represent the complete journey of a message triggered by an event in your application and delivered to a specific user across one or more channels. They encapsulate all the execution logic and delivery metadata in a single traceable unit. | ||
|
||
|
@@ -20,84 +20,42 @@ A notification doesn't exist in isolation, it’s the result of a sequence of in | |
|
||
### Event | ||
|
||
Something meaningful happens in your application, such as a user signing up, a password reset being requested, or a comment being posted. You emit this event to Novu using the [Event Trigger API](/api-reference/events/trigger-event). | ||
The notification lifecycle starts with an event, this event represents something meaningful that has happened in your application, such as a new comment, user sign-up, or password reset request. | ||
|
||
Each event contains: | ||
- A name that maps to a specific workflow (user_signed_up) | ||
These events are how your application communicates to Novu that it is time to send a particular notification to certain subscribers. | ||
|
||
Each event in Novu contains: | ||
- A name that maps to a specific workflow (`user_signed_up`) | ||
- A payload with dynamic data | ||
- One or more subscribers | ||
- Optional overrides or metadata | ||
|
||
This is how your application tells Novu, “It’s time to send something.” | ||
|
||
### Workflow | ||
|
||
Novu matches the incoming event to a predefined workflow. This workflow is your logic for determining: | ||
- What channels to use (email, in-app, SMS, etc.) | ||
- What message templates to render | ||
- When and how messages should be sent | ||
|
||
The workflow is where message personalization, conditional logic, and multi-channel orchestration happens. | ||
This event that was triggered in your application, in turn triggers the workflow(s) attached to it. This workflow determines the delivery channels to be used to send the notification to the user and also the format in which the notification content will be displayed in the various channels. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
in my opinion, bullet points are more easy to comprehend by user |
||
|
||
<Callout title="Want to learn more?" type="info">Refer to the [Workflows documentation](/platform/concepts/workflows).</Callout> | ||
<Callout type="info">This is covered in depth in the [Workflows concept documentation](/platform/concepts/workflows).</Callout> | ||
|
||
### Notification | ||
|
||
Once the workflow starts executing, Novu creates a notification for each subscriber involved. This notification acts as the central entity tracking everything that happens - every job, message, and delivery status. It includes: | ||
Once the workflow begins, Novu creates a notification for each subscriber included in the event. | ||
|
||
Think of it as the container for all activity triggered by a single event for a single user. It contains a full record of what happened from the moment the event was triggered to when one or more messages were delivered or failed to deliver. | ||
|
||
It includes: | ||
- The subscriber details | ||
- The workflow (template) used | ||
- The event payload | ||
- Jobs executed | ||
- Messages generated | ||
- Delivery status updates and errors | ||
|
||
Think of it as the container for all activity triggered by a single event for a single user. | ||
|
||
<Callout> | ||
In simpler terms, when a workflow is triggered to a subscriber, it creates an event. One event is one notification. | ||
</Callout> | ||
All these properties can be seen from the [Notification API](https://docs.novu.co/api-reference/notifications/list-all-events) response and are also displayed in the Novu dashboard’s [Activity Feed](https://dashboard.novu.co/activity-feed) for visual traceability. | ||
|
||
### Message | ||
|
||
Each channel step in the workflow results in one or more messages. These are the actual pieces of content sent to users' emails, push notifications, SMS, and in-app alerts. | ||
|
||
Messages are live entities, tracked in real-time, with full visibility into: | ||
|
||
- Rendering logic | ||
- Channel used | ||
- Delivery status | ||
- Provider responses or errors | ||
|
||
<Callout>Each message has a unique ID and status, learn more about this in the [Messages API](/api-reference/messages/message-schema).</Callout> | ||
|
||
## Notification structure | ||
|
||
A notification in Novu is more than just a message, it’s a full record of what happened from the moment an event was triggered to when one or more messages were delivered or failed to deliver. | ||
|
||
Each notification encapsulates a set of properties that describe its creation, context, execution, and result. These properties are essential for debugging, analytics, and tracking user communications. | ||
|
||
### Notification properties | ||
|
||
| Property | Description | | ||
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `transactionId` | A unique identifier for this specific notification execution run. Useful for tracing across APIs and logs. | | ||
| `template` | The workflow (template) that was executed. Defines the steps and channels used. | | ||
| `subscriber` | The user who received the notification. Includes subscriber ID and metadata. | | ||
| `payload` | Dynamic data passed in from the event, used to render personalized message content. | | ||
| `jobs` | A list of steps (jobs) that were executed as part of the workflow. Each job corresponds to a workflow action, for example, send email or run delay. | | ||
| `messages` | The individual messages generated for each channel. Contains delivery status, content, and provider response. | | ||
| `status` | The current execution state of the notification (`pending`, `completed`, `failed`, and so on). | | ||
|
||
These fields are accessible via the [Notifications API](/api-reference/notifications/list-all-events) and are also displayed in the Novu dashboard’s [Activity Feed](https://dashboard.novu.co/activity-feed) for visual traceability. | ||
|
||
|
||
## Frequently asked questions | ||
These are some of the most frequently asked questions about notifications in Novu. | ||
|
||
### What is the difference between a notification and an event? | ||
Message is the final **phase** in the notification lifecycle. It is the actual notification content that is sent to the subscriber from the workflow. | ||
|
||
A notification is the result of an event. An event is the trigger of a workflow to a subscriber that causes a notification to be created. | ||
Messages are delivered to your users using any or all of the channels defined in your workflow, and each message can be customized for each channel. | ||
|
||
### What is the difference between a notification and a message? | ||
One notification event can have multiple messages as per the workflow configuration. Messages are the actual "notification message" to the end user. | ||
Messages are live entities and can be tracked in real-time, with full visibility into channels used, delivery status and other important properties from the [Message API](https://docs.novu.co/api-reference/notifications/list-all-events) response. |
Binary file modified
BIN
+24.6 KB
(130%)
public/images/concepts/notifications/notification-life-cycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rephrase this line,