Variables
Wolfx's content creation tools allow developers to utilize a wealth of variables when designing notification workflows.
As developers construct workflows using Wolfx, certain status facets—results of batch functions and other steps in the workflow - are auto-generated and can be utilized to control the content displayed in notification templates.
These variables offer dynamic and automated properties that hold subscriber information, such as first and last name, email, phone, and avatar.
For example, developers can insert a subscriber's first name into a workflow by using {{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.
System Variables
Workflow Default Variables
Variable | Type | Required | Description |
---|---|---|---|
firstName | String | O | The first name of the subscriber. |
lastName | String | O | The last name of the subscriber. |
String | X | The subscriber's email address. | |
phone | String | X | The phone number associated with the subscriber. |
Brand Variables
Variable | Type | Required | Description |
---|---|---|---|
branding | Object | X | Enables customization of the notification's visual identity. |
logo | String | X | Insert the brand logo. |
color | String | X | Set the primary color of the notification based on the brand configuration. |
Data Payload Variables
Data payload variables encompass the dynamic data intended to be injected into the content of a workflow. These variables are integral components of the payload object, forming part of the parameters for the trigger function.
Here's a more illustrative example of how data payload variables can be employed:
Within this code snippet, the variables title and job_code are representative of data payload variables.
Importantly, it's worth noting that the payload itself can encompass any serializable JSON object.
Avoid use of system reserved variables as normal variables. For example don't use email as variable name because {{job_code}}
is a system reserved variable