Notification Template Reference
Overview
Protrak notification templates define the content of notifications (email + push) triggered by
platform events. Templates use Razor markup syntax (@Model.*) and are stored as paired files:
NotificationTemplates/<title>.json— metadata (title, target, push message, state)NotificationTemplates/<title>.html— HTML email body (Razor template)
Two templates are needed for a complete email notification: one for the subject (title ending
in Subject) and one for the body (title ending in Body). Push-only templates need only
the .json with a messageText value.
This reference covers the content of notification templates (the
@Modelvariables and Razor syntax). For sending notifications imperatively from a program — building recipient lists and callingINotificationService.SendNotification— see the Send Notification Pattern.
Target Types
| Target | Trigger event | Usage |
|---|---|---|
PromoteNotification | Lifecycle promote action | Link in a lifecycle's "Send Notification" command |
AccountNotification | User creation / password reset | Link in Tenant Settings → Notifications |
WorkflowNotification | Workflow notification activity | Link in Workflow → Notification Activity |
WorkflowTaskNotification | Workflow input/checklist task creation | Link in Workflow → Input/Checklist Task Activity |
@Model Variables — PromoteNotification
Available when target is PromoteNotification. These reflect the promoted instance.
@Model.InstanceName — Display name of the instance
@Model.InstanceUrl — Deep link URL to the instance
@Model.InstanceId — GUID of the instance
@Model.InstanceTrackingId — Tracking / reference number
@Model.PreviousStateName — Lifecycle state before the promote
@Model.CurrentStateName — Lifecycle state after the promote
@Model.ModifiedDate — Date/time of the promote (UTC)
@Model.ModifiedBy — Name of the user who triggered it
@Model.CreatedBy — Name of the user who created the instance
@Model.Remarks — Remarks entered on the promote action
@Model.AttributeValues["<AttributeName>"] — Attribute accessor (see below)
@Model.TenantInfo.TenantName
@Model.TenantInfo.LogoUrl
@Model.TenantInfo.DateTimeFormat.DateFormat
@Model.TenantInfo.DateTimeFormat.TimeFormat
@Model.TenantInfo.DateTimeFormat.TimeZone
@Model.TenantInfo.Locale.Name
@Model.TenantInfo.Locale.DisplayName
@Model.ApplicationUrl
@Model Variables — AccountNotification
Available when target is AccountNotification. These reflect the Protrak user account.
@Model.UserName
@Model.UserFullName
@Model.UserEmail
@Model.UserPassword
@Model.CompanyName
@Model.CompanyEmail
@Model.CompanyDomain
@Model.CompanyLogoUrl
@Model.UserRoles[index]
@Model.UserAttributes["<AttributeName>"]
@Model.MFAVerificationCode
@Model.MFAVerificationCodeValidity
@Model Variables — WorkflowNotification
Available when target is WorkflowNotification. These reflect the instance attached to the workflow.
@Model.InstanceName
@Model.InstanceUrl
@Model.InstanceId
@Model.InstanceTrackingId
@Model.ApplicationUrl
@Model.StateName
@Model.ModifiedDate
@Model.ModifiedBy
@Model.CreatedBy
@Model.AttributeValues["<AttributeName>"]
@Model Variables — WorkflowTaskNotification
Available when target is WorkflowTaskNotification. These reflect the workflow task.
@Model.InstanceName
@Model.InstanceUrl
@Model.InstanceId
@Model.InstanceTrackingId
@Model.ApplicationUrl
@Model.StateName
@Model.ModifiedDate
@Model.ModifiedBy
@Model.CreatedBy
@Model.AttributeValues["<AttributeName>"]
@Model.WorkflowTask.Id
@Model.WorkflowTask.Name
@Model.WorkflowTask.Description
@Model.WorkflowTask.Comments
@Model.WorkflowTask.Type
@Model.WorkflowTask.WorkflowInstanceId
@Model.WorkflowTask.PausedWorkflowInstActivityId
@Model.WorkflowTask.TypeInstId
@Model.WorkflowTask.Status
@Model.WorkflowTask.AssignedUserId
@Model.WorkflowTask.AssignedRoleId
@Model.WorkflowTask.Created
@Model.WorkflowTask.Due
@Model.WorkflowTask.Completed
@Model.WorkflowTask.CompletedBy
@Model.WorkflowTask.ChecklistItems[index].Id
@Model.WorkflowTask.ChecklistItems[index].Name
@Model.WorkflowTask.ChecklistItems[index].IsMandatory
@Model.WorkflowTask.ChecklistItems[index].IsCompleted
Attribute Value Accessors
The @Model.AttributeValues["<AttributeName>"] accessor returns an object with type-specific
properties. Access the correct property based on the attribute type:
.TextValue — Text attributes
.NumericValue — Numeric attributes
.DateValue — Date attributes (stored as UTC DateTime)
.ArrayValue[0] — Picklist (single) — string value
.UserValues[0].UserName — User attributes (first user)
.UserValues[0].UserEmail
.UserValues[0].UserId
.ReferenceValue[0].Name — Reference attributes (first linked instance)
.ReferenceValue[0].Id