Back to Novu

Notification event schema

docs/api-reference/notifications/notification-event-schema.mdx

3.19.02.8 KB
Original Source

Notification event

Notification event is the event that is generated when a workflow is triggered to subscribers. It contains workflow details, subscriber details payload sent during trigger, execution details of each step in the workflow and the result of the execution of each step.

FieldTypeDescription
idstringUnique identifier of the notification
environmentIdstringEnvironment ID of the notification
organizationIdstringOrganization ID of the notification
subscriberIdstringSubscriber ID of the notification
transactionIdstringTransaction ID of the notification
templateIdstringTemplate ID of the notification
digestedNotificationIdstringDigested Notification ID
createdAtstringCreation time of the notification
updatedAtstringLast updated time of the notification
channelsstring[]
subscriberActivityNotificationSubscriberResponseDtoSubscriber of the notification
templateActivityNotificationTemplateResponseDtoTemplate of the notification
jobsActivityNotificationJobResponseDto[]Jobs of the notification
payloadRecord<string, unknown>Payload of the notification
tagsstring[]Tags associated with the notification
controlsRecord<string, unknown>Controls associated with the notification
toRecord<string, unknown>To field for subscriber definition
topicsActivityTopicDto[]Topics of the notification
severitySeverityLevelEnumSeverity of the workflow
criticalbooleanCriticality of the notification
contextKeysstring[]Context (single or multi) in which the notification was sent

Workflow

Workflow contains the details of the workflow that was triggered.

FieldTypeDescription
idstring
namestring
descriptionstring
activeboolean
draftboolean
preferenceSettingsSubscriberPreferenceChannels
criticalboolean
tagsstring[]
stepsNotificationStepDto[]
organizationIdstring
creatorIdstring
environmentIdstring
triggersNotificationTrigger[]
notificationGroupIdstring
parentIdstring
deletedboolean
deletedAtstring
deletedBystring
notificationGroupNotificationGroup
dataWorkflowResponseData
workflowIntegrationStatusWorkflowIntegrationStatus

ChannelTypeEnum

ChannelTypeEnum is the type of the channel that the notification was sent to.

typescript
ChannelTypeEnum {
  IN_APP = "in_app",
  EMAIL = "email",
  SMS = "sms",
  CHAT = "chat",
  PUSH = "push"
}