Email Templates Form Guide

The Email Templates Form module provides an interactive interface for creating, editing, and configuring HTML email templates, subject lines, WYSIWYG body content, and runtime placeholder variables for automated workflow dispatches.

Overview

Email Templates Form allows administrators to define new email templates or update existing template records. It handles SMTP server binding, email category classification, rich text HTML body editing, and unique workflow store variable key assignments.

Email Template Form Fields

The table below describes all 10 dynamic form fields defined for Feature 24:

Field Label Input Type Required Description
EMAIL CONFIGURATION Select Yes Select the outbound SMTP server configuration bound to this template (from nm_app_email_configurations).
EMAIL TEMPLATE TYPE Select Yes Select the functional category classification (from nm_app_status_email).
COMPANY Select No Select a specific company scope or leave unassigned for System Global access.
EMAIL TEMPLATE NAME Text Yes Enter a clear display title for the template (e.g. Welcome Email).
EMAIL TEMPLATE SLUG Text Yes Enter a unique URL-friendly system identifier slug (e.g. welcome-email).
EMAIL TEMPLATE SUBJECT Text Yes Enter the default subject line text supporting dynamic placeholders (e.g. Welcome {nm_first_name}).
EMAIL TEMPLATE Editor Yes WYSIWYG rich text editor for formatting HTML email body content, images, links, and placeholder tags.
EMAIL STORE VARIABLE Text Yes Enter a unique workflow store variable key referenced by background system triggers (e.g. userOnboardEmail).
EMAIL TEMPLATE STATUS Select Yes Select 'Active' (1) to enable template usage or 'Inactive' (0) to disable it.
Email Template Form

Email Content & Rich Text Editor

The rich text WYSIWYG editor allows customizing HTML email body formatting with standard text styling, headings, lists, tables, links, and dynamic placeholders.

  • HTML formatting and typography
  • Lists, links, and embedded tables
  • Dynamic runtime placeholder variable insertion

Dynamic Runtime Variables

Placeholders can be typed directly into subject lines or HTML body content using curly-brace syntax. When an email event triggers, Ojoo Business OS substitutes placeholders with real recipient data:

Placeholder Tag Runtime Data Substituted
{nm_first_name} Recipient's first name.
{nm_last_name} Recipient's last name.
{nm_user_email} Recipient's email address.
{_email_password} Auto-generated account password for onboarding emails.
{reset_link} Secure URL link for password reset requests.
{changed_at} Timestamp of account security modifications.

Available Actions & Buttons

Button / Action Description
Save Template Validates required fields, saves template data to nm_app_email_templates, and redirects to the Email Templates List.
Cancel / Back Returns to the Email Templates List view without saving changes.

Form Validation & User Feedback

Validation Rule User Action Required
Missing Required Field Fill in all required fields (Config, Type, Name, Slug, Subject, Body, Store Variable, Status).
Duplicate Store Variable Key Ensure the Email Store Variable key is unique across all active template records.

Best Practices

  • Select valid SMTP configuration bindings before saving.
  • Verify placeholder spelling and curly brace syntax (e.g. {nm_first_name}).
  • Write concise, engaging subject lines.
  • Format HTML body text cleanly using the WYSIWYG editor.
  • Keep workflow store variable keys unique and descriptive.