{{ subscriber.firstName }}
.
In addition to the subscriber’s details, developers can use data payload variables that encapsulate dynamic data meant to be injected into the content of a workflow.
For instance, in the code example the variables username and resetLink are data payload variables that would be adjusted based on the workflow’s purpose.
The utilization of these variables allows Novu to deliver personalized notifications to the receiver, thus improving user experience and accomplishing better communication outcomes.
Variable | Type | Description |
---|---|---|
subscriber | Object | Represents someone who is intended to receive a notification. |
firstName | String | The first name of the subscriber. |
lastName | String | The last name of the subscriber. |
email | String | The subscriber’s email address. |
phone | String | The phone number associated with the subscriber. |
avatar | String | A URL or reference to the subscriber’s avatar or profile picture. |
locale | String | The preferred locale or language of the subscriber. |
subscriberId | String | Unique identifier for the subscriber. |
data | Object | An additional object that can hold custom subscriber data as key-value pairs. |
Variable | Type | Description |
---|---|---|
actor | Object | A subscriber who initiates actions triggering events. |
firstName | String | The first name of the actor. |
lastName | String | The last name of the actor. |
email | String | The actor’s email address. |
phone | String | The phone number associated with the actor. |
avatar | String | A URL or reference to the actor’s avatar or profile picture. |
locale | String | The preferred locale or language of the actor. |
subscriberId | String | Unique identifier for the actor. |
data | Object | An additional object that can hold custom actor data as key-value pairs. |
Variable | Type | Description |
---|---|---|
step | Object | A component in the execution of a workflow. |
digest | Boolean | Indicates whether digest mode is active or not. |
events | Array | An aggregated collection of events (that are stored when digest is active). |
total_count | Number | Represents the total number of events in the digest. |
Variable | Type | Description |
---|---|---|
branding | Object | Enables customization of the notification’s visual identity. |
logo | String | Insert the brand logo. |
color | String | Set the primary color of the notification based on the brand configuration. |
Variable | Type | Description |
---|---|---|
tenant | Object | Group of users or an organization. |
name | String | Insert the brand logo. |
data | Object | An additional object that can hold custom tenant data as key-value pairs. |
username
and resetLink
are representative of data payload variables.
Importantly, it’s worth noting that the payload itself can encompass any serializable JSON object.
email
as variable name because {{subscriber.email}}
is a system reserved variable