Notification Templates

Changing the default Veza reminder emails and notifications.

You can use the Notification Templates API to customize the subject and body contents of emails triggered by Veza Workflow events, such as notifications when a reviewer is assigned or changes, or reminders as a certification due date approaches.

{
  "value": {
    "name": "New Certification",
    "description": "Send to notify participants a new workflow is available",
    "subject_template": "New Access Workflow for {{WORKFLOW_NAME}}",
    "body_template": "A certification was started by {{WORKFLOW_OWNER}}, at {{WORKFLOW_CERT_STARTED_ON_TIME}}. <a href=\"{{WORKFLOW_URL}}\" rel=\"noreferrer noopener\" target=\"_blank\"> Review in Veza <\/a>.",
    "usage": "ACCESS_WORKFLOW_STARTED"
  }
}

Templates support HTML and CSS, as well as placeholders and customizable date/time stamps. To use images in an email template, you can add small files as attachments, or reference an image hosted elsewhere.

Emails are sent based on workflow actions and states (the template's usage). You can customize a template for each usage, such as when a workflow reviewer changes, or for inactivity reminders. Each usage can have a single customized template.

Workflows can publish notifications for certification actions or reminders based on date or activity. Each reminder and Orchestration Action enabled for a workflow will trigger independently.

Default templates and usages

The {{WORKFLOW_TEXT}} placeholder contains a default message, which changes based on the usage specified for the template:

UsageSubject{{WORKFLOW_TEXT}}

ACCESS_WORKFLOW_STARTED

Access Workflow --> Certification: A new certification was started on workflow {{WORKFLOW_NAME}}

A new certification was started for workflow {{WORKFLOW_NAME}}

ACCESS_WORKFLOW_COMPLETED

Access Certification: A certification on workflow {{WORKFLOW_NAME}} has been completed

A certification has been completed on workflow {{WORKFLOW_NAME}}

ACCESS_WORKFLOW_REVIEWER_CHANGED

Access Certification: Assigned reviewers changed on certification for workflow {{WORKFLOW_NAME}}

  • When setting to email old reviewer: On a certification for workflow {{WORKFLOW_NAME}} the assigned reviewers has changed from {{WORKFLOW_CERT_OLD_REVIEWERS}} to {{WORKFLOW_CERT_REVIEWERS}}.

  • otherwise: {{WORKFLOW_TEXT}}: On a certification for workflow {{WORKFLOW_NAME}} the assigned reviewers has changed to {{WORKFLOW_CERT_REVIEWERS}}.

ACCESS_WORKFLOW_OWNER_CHANGED

Access Workflow: A new owner assigned to workflow {{WORKFLOW_OWNER}}

The owner of access workflow {{WORKFLOW_NAME}} has changed from {{WORKFLOW_OLD_OWNER}} to {{WORKFLOW_OWNER}}.

ACCESS_WORKFLOW_REMINDER_NO_ACTIVITY

Access Certification Reminder: Certification has had no activity from {{WORKFLOW_CERT_LAST_ACTIVITY_REVIEWER}} {{WORKFLOW_CERT_LAST_ACTIVITY_PHASE}} on workflow "WORKFLOW_NAME"

User {{WORKFLOW_CERT_LAST_ACTIVITY_REVIEWER}} hasn't made progress on the certification started on {{WORKFLOW_CERT_STARTED_ON_DATE}} {{WORKFLOW_CERT_LAST_ACTIVITY_PHASE}}. User {{WORKFLOW_CERT_LAST_ACTIVITY_REVIEWER}} has {{WORKFLOW_CERT_LAST_ACTIVITY_ROWS_NEED_SIGN_OFF}} of {{WORKFLOW_CERT_LAST_ACTIVITY_ROWS_TOTAL}} rows that need to be signed off.

ACCESS_WORKFLOW_REMINDER_DUE

Access Certification Reminder: Certification {{WORKFLOW_CERT_DUE_IN_PHRASE}} on workflow {{WORKFLOW_NAME}}

The certification started on {{WORKFLOW_CERT_STARTED_ON_DATE}} for workflow {{WORKFLOW_NAME}} {{WORKFLOW_CERT_DUE_ON_PHRASE}}.

Adding attachments

To embed high-resolution images in your templates, it's recommended to host the content from a publicly available location, and use HTML to reference and style the content. However, small images under 64kb can be included as attachments that can be referenced within the associated template.

The attachment must be base64-encoded and specified in the attachments field. To use an attachment in a template, reference it by name in the body_template, for example:

<img src="cid:<name_of_attachment>"

Example Body Template

Note that depending on how you are submitting your request, you may have to escape any double quotes " in your HTML templates for JSON compatibility, for example:

<html>
 <head>
 <meta charset=\"UTF-8\" />
 </head>
</html>

Body template:

<html>
    <head>
   <meta charset="UTF-8" />
   <title>Notification</title>
   <meta http-equiv="Content-Type" content="text/html charset=UTF-8" />
   <meta name="viewport" content="width=device-width,initial-scale=1" />
   <meta name="x-apple-disable-message-reformatting" />
   <style>
     * {
       font-family: Roboto, Arial, sans-serif;
     }
     body {
       padding: 0;
       margin: 0;
     }
     table {
       border: 0;
       width: 100%;
       border-spacing: 0;
     }
     table tr td {
       padding: 0;
     }
     .timestamp {
       color: #9097ad;
       font-size: 12px;
       line-height: 14px;
       padding-bottom: 5px;
     }
     .notification-text {
       font-size: 14px;
       line-height: 16px;
       color: #263040;
       padding-bottom: 30px;
     }
     .view-in-link a {
       text-decoration: none;
       background: #933aeb;
       border-radius: 10px;
       color: #ffffff;
       font-size: 14px;
       line-height: 16px;
       padding: 15px 35px;
       display: inline-block;
       font-weight: 500;
     }
     .ExternalClass {
       width: 100%;
     }
   </style>
 </head>
    <body style="padding: 0;">
     <table style="margin: 0; padding: 24px !important;">
       <tr style="margin: 0; padding: 0;">
         <th style="margin: 0; padding: 0 0 24px 0; text-align: left">
           <img src="cid:vezaLogo" style="width: 75px; display:inline-block;" alt="Veza logo" />
         </th>
       </tr>
       <tr>
         <td class="timestamp">{{WORKFLOW_TIME}}</td>
       </tr>
       <tr>
         <td class="notification-text">{{WORKFLOW_TEXT}}</td>
       </tr>
       <tr>
         <td class="view-in-link">
           <a href="{{WORKFLOW_URL}}" rel="noreferrer noopener" target="_blank"> View in Veza </a>
         </td>
       </tr>
     </table>
   </body>
</html>

The template above is used by Veza by default.

  • {{WORKFLOW_TEXT}} is a placeholder for default text, based on template usage -{{WORKFLOW_TIME}} is the time in GMT

Placeholders

Placeholders are used to add dynamic information such as decision and certification timestamps, reviewer names, and other workflow and certification metadata. Some placeholders are available depending on the template usage, and a general set of shortcodes can be used with all templates, such as {{WORKFLOW_NAME}} and {{WORKFLOW_URL}}.

For placeholders that refer to a timestamp, you can choose between the complete "Time" or simple "Date" format. For example:

  • {{WORKFLOW_CERT_STARTED_ON_TIME}} result: "Mon, Jan 2nd 2006, 3:04:05PM"

  • {{WORKFLOW_CERT_STARTED_ON_DATE}} result: "2006-01-02"

The template is not validated upon submission. You should test custom templates for each usage using an empty certification, to ensure that all placeholders and attachments are rendering as expected.

Placeholders for all templates

SummaryPlaceholder

Workflow Name

{{WORKFLOW_NAME}}

Workflow Text

{{WORKFLOW_TEXT}}

Workflow URL

{{WORKFLOW_URL}}

Workflow Time

{{WORKFLOW_TIME}}

Workflow Owner

{{WORKFLOW_OWNER}}

Workflow Description

{{WORKFLOW_DESCRIPTION}}

If a certification exists for a workflow, the following placeholders can be used to include dates and timestamps for certification events:

SummaryPlaceholder

Workflow Cert Due On Date

{{WORKFLOW_CERT_DUE_ON_DATE}}

Workflow Cert Last Activity On Date

{{WORKFLOW_CERT_LAST_ACTIVITY_ON_DATE}}

Workflow Cert Last Activity On Time

{{WORKFLOW_CERT_LAST_ACTIVITY_ON_TIME}}

Workflow Cert Last Activity By

{{WORKFLOW_CERT_LAST_ACTIVITY_BY}}

Workflow Cert Last Updated On

{{WORKFLOW_CERT_LAST_UPDATED_ON_DATE}}

Workflow Cert Last Updated On Full

{{WORKFLOW_CERT_LAST_UPDATED_ON_TIME}}

Workflow Cert Last Updated By

{{WORKFLOW_CERT_LAST_UPDATED_BY}}

Workflow Cert Started On Date

{{WORKFLOW_CERT_STARTED_ON_DATE}}

Workflow Cert Started On Time

{{WORKFLOW_CERT_STARTED_ON_TIME}}

Workflow Cert Created By

{{WORKFLOW_CERT_CREATED_BY}}

Workflow Cert Completed On Date

{{WORKFLOW_CERT_COMPLETED_ON_DATE}}

Workflow Cert Completed On Time

{{WORKFLOW_CERT_COMPLETED_ON_TIME}}

Workflow Cert Completed By

{{WORKFLOW_CERT_COMPLETED_BY}}

Workflow Cert Phrase

{{WORKFLOW_CERT_PHRASE}

ACCESS_WORKFLOW_OWNER_CHANGED placeholders

SummaryPlaceholder

Workflow Old Owner

{{WORKFLOW_OLD_OWNER}}

ACCESS_WORKFLOW_REMINDER_NO_ACTIVITY placeholders

SummaryPlaceholder

Workflow Cert Last Activity Days

{{WORKFLOW_CERT_LAST_ACTIVITY_DAYS}}

Workflow Cert Last Activity Phrase

{{WORKFLOW_CERT_LAST_ACTIVITY_PHASE}}

Workflow Cert Last Activity Reviewer

{{WORKFLOW_CERT_LAST_ACTIVITY_REVIEWER}}

Workflow Cert Last Activity Rows Total

{{WORKFLOW_CERT_LAST_ACTIVITY_ROWS_TOTAL}}

Workflow Cert Last Activity Rows Need Sign Off

{{WORKFLOW_CERT_LAST_ACTIVITY_ROWS_NEED_SIGN_OFF}}

Workflow Cert Last Activity Rows Signed Off

{{WORKFLOW_CERT_LAST_ACTIVITY_ROWS_SIGNED_OFF}}

ACCESS_WORKFLOW_REMINDER placeholders

SummaryPlaceholder

Workflow Cert Due In Phrase

{{WORKFLOW_CERT_DUE_IN_PHRASE}}

Workflow Cert Due Date Phrase

{{WORKFLOW_CERT_DUE_ON_PHRASE}}

Workflow Cert Due Days

{{WORKFLOW_CERT_DUE_DAYS}}

ACCESS_WORKFLOW_REVIEWER_CHANGED placeholders

SummaryPlaceholder

Workflow Cert Old Reviewers

{{WORKFLOW_CERT_OLD_REVIEWERS}}

Workflow Cert Current Reviewers

{{WORKFLOW_CERT_REVIEWERS}}

Phrases

Some placeholders represent multiple strings and other variables, and can be used to customize a message based on the Veza defaults:

{{ACCESS_WORKFLOW_STARTED_PHRASE}}

  • Access Workflow --> Certification: A new certification was started on workflow "{{WORKFLOW_NAME}}"

{{ACCESS_WORKFLOW_COMPLETED_PHRASE}}

  • Access Certification: A certification on workflow "{{WORKFLOW_NAME}}" has been completed

{{ACCESS_WORKFLOW_REVIEWER_CHANGED_PHRASE}}

  • Access Workflow: A new owner assigned to workflow "{{WORKFLOW_NAME}}"

{{ACCESS_WORKFLOW_OWNER_CHANGED_PHRASE}}

  • Access Certification Reminder: Certification has had no activity from {{WORKFLOW_CERT_LAST_ACTIVITY_REVIEWER}} {{WORKFLOW_CERT_LAST_ACTIVITY_PHASE}} on workflow "{{WORKFLOW_NAME}}"

{{ACCESS_WORKFLOW_REMINDER_NO_ACTIVITY_PHRASE}}

  • `Access Certification Reminder: Certification has had no activity from {{WORKFLOW_CERT_LAST_ACTIVITY_REVIEWER}} {{WORKFLOW_CERT_LAST_ACTIVITY_PHASE}} on workflow "{{WORKFLOW_NAME}}"

{{ACCESS_WORKFLOW_REMINDER_DUE_PHRASE}}

  • Access Certification Reminder: Certification {{WORKFLOW_CERT_DUE_IN_PHRASE}} on workflow "{{WORKFLOW_NAME}}"

{{WORKFLOW_CERT_DUE_IN_PHRASE}}

Adapts depending on the if the due date is in the past or future:

  • "is due on {{WORKFLOW_CERT_DUE_ON_DATE}}"

  • "was due on {{WORKFLOW_CERT_DUE_ON_DATE}}"

{{WORKFLOW_CERT_LAST_ACTIVITY_PHASE}}

Adapts when one or multiple days have passed:

  • "for {{WORKFLOW_CERT_LAST_ACTIVITY_DAYS}} day"

  • "for {{WORKFLOW_CERT_LAST_ACTIVITY_DAYS}} days"

Last updated