# Email Templates - Complete Mapping Guide ## 📧 Template Overview All email templates have been designed to be **dynamic** and **consistent**. Each template includes: - ✅ Only ONE action button: **"View Request Details"** (redirects to `/request/[RequestNumber]`) - ✅ Fully responsive design (mobile-friendly) - ✅ Professional Royal Enfield branding - ✅ Dynamic placeholders for personalization - ✅ Consistent footer with disclaimer --- ## 📋 Template Inventory (10 Templates) ### 1. **RequestCreated.html** **Trigger:** When a new workflow request is created **Recipients:** Initiator **Purpose:** Confirm request submission and inform about next steps **Placeholders:** - `[InitiatorName]` - Name of the person who created the request - `[FirstApproverName]` - Name of the first approver - `[RequestId]` - Request number (e.g., REQ-2025-12-0013) - `[RequestTitle]` - Title of the request - `[RequestType]` - Type of request - `[Priority]` - Priority level (LOW, MEDIUM, HIGH, CRITICAL) - `[RequestDate]` - Creation date - `[RequestTime]` - Creation time - `[TotalApprovers]` - Total number of approvers - `[ExpectedTAT]` - Expected turnaround time in hours - `[ViewDetailsLink]` - Link to request (baseURL/request/requestNumber) - `[CompanyName]` - Company name (e.g., Royal Enfield) **Priority:** High (send immediately after request creation) --- ### 2. **ApprovalRequest.html** **Trigger:** When a request is assigned to an approver (single approver) **Recipients:** Approver **Purpose:** Notify approver about pending approval request **Placeholders:** - `[ApproverName]` - Name of the approver - `[InitiatorName]` - Name of the initiator - `[RequestId]` - Request number - `[RequestDate]` - Submission date - `[RequestTime]` - Submission time - `[RequestType]` - Type of request - `[RequestDescription]` - Brief description - `[PrioritySection]` - Dynamic section (show only if priority is HIGH/CRITICAL) - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Dynamic Sections:** - `[PrioritySection]`: Show alert box if priority is HIGH or CRITICAL **Priority:** High (send immediately when assigned) --- ### 3. **MultiApproverRequest.html** **Trigger:** When a request is assigned to an approver (multi-level workflow) **Recipients:** Approver in multi-level workflow **Purpose:** Notify approver with approval chain visibility **Placeholders:** - `[ApproverName]` - Name of the approver - `[InitiatorName]` - Name of the initiator - `[RequestId]` - Request number - `[RequestDate]` - Submission date - `[RequestTime]` - Submission time - `[RequestType]` - Type of request - `[ApproverLevel]` - Current approver's level (e.g., 2) - `[TotalApprovers]` - Total approvers (e.g., 5) - `[ApproversList]` - Dynamic HTML showing approval chain with status - `[RequestDescription]` - Brief description - `[PrioritySection]` - Dynamic section for high priority - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Dynamic Sections:** - `[ApproversList]`: Generate HTML for each approver with status (✓ Approved, numbered for current, grayed for pending) - `[PrioritySection]`: Show if HIGH/CRITICAL priority **Priority:** High (send immediately when assigned) --- ### 4. **ApprovalConfirmation.html** **Trigger:** When an approver approves a request **Recipients:** Initiator (and optionally other stakeholders) **Purpose:** Confirm approval action **Placeholders:** - `[InitiatorName]` - Name of the initiator - `[ApproverName]` - Name of the approver who approved - `[RequestId]` - Request number - `[ApprovalDate]` - Approval date - `[ApprovalTime]` - Approval time - `[RequestType]` - Type of request - `[ApproverComments]` - Comments from approver - `[StatusSection]` - Dynamic section for workflow status - `[NextStepsSection]` - Dynamic section for next steps - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Dynamic Sections:** - `[StatusSection]`: Show if more approvals are pending - `[NextStepsSection]`: Show what happens next (if final approval, show closure instructions) **Priority:** High (send immediately after approval) --- ### 5. **RejectionNotification.html** **Trigger:** When an approver rejects a request **Recipients:** Initiator (and optionally other stakeholders) **Purpose:** Notify about rejection **Placeholders:** - `[InitiatorName]` - Name of the initiator - `[ApproverName]` - Name of the approver who rejected - `[RequestId]` - Request number - `[RejectionDate]` - Rejection date - `[RejectionTime]` - Rejection time - `[RequestType]` - Type of request - `[RejectionReason]` - Reason for rejection - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Priority:** Critical (send immediately after rejection) --- ### 6. **TATReminder.html** **Trigger:** When TAT deadline is approaching (e.g., 80% of TAT elapsed) **Recipients:** Approver **Purpose:** Remind approver about pending action **Placeholders:** - `[ApproverName]` - Name of the approver - `[RequestId]` - Request number - `[RequestTitle]` - Title of the request - `[InitiatorName]` - Name of the initiator - `[AssignedDate]` - Date when assigned to approver - `[TATDeadline]` - TAT deadline date and time - `[TimeRemaining]` - Time remaining (e.g., "4 hours") - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Priority:** High (send based on TAT threshold - e.g., when 80% elapsed) --- ### 7. **TATBreached.html** **Trigger:** When TAT deadline has passed **Recipients:** Approver, Management (optionally) **Purpose:** Escalate breached TAT **Placeholders:** - `[ApproverName]` - Name of the approver - `[RequestId]` - Request number - `[RequestTitle]` - Title of the request - `[InitiatorName]` - Name of the initiator - `[Priority]` - Priority level - `[AssignedDate]` - Date when assigned - `[TATDeadline]` - Original TAT deadline - `[TimeOverdue]` - Time overdue (e.g., "6 hours overdue") - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Priority:** Critical (send immediately when TAT breached) --- ### 8. **WorkflowPaused.html** **Trigger:** When a workflow is paused **Recipients:** Initiator, Current Approver, Spectators **Purpose:** Inform about workflow pause **Placeholders:** - `[RecipientName]` - Name of the recipient - `[RequestId]` - Request number - `[RequestTitle]` - Title of the request - `[PausedByName]` - Name of person who paused - `[PausedDate]` - Pause date - `[PausedTime]` - Pause time - `[ResumeDate]` - Scheduled resume date - `[PauseReason]` - Reason for pause - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Priority:** Medium (send when workflow is paused) --- ### 9. **WorkflowResumed.html** **Trigger:** When a workflow is resumed (auto or manual) **Recipients:** Initiator, Current Approver, Spectators **Purpose:** Inform about workflow resumption **Placeholders:** - `[RecipientName]` - Name of the recipient - `[RequestId]` - Request number - `[RequestTitle]` - Title of the request - `[ResumedByText]` - Text explaining resume (e.g., "automatically" or "by John Doe") - `[ResumedDate]` - Resume date - `[ResumedTime]` - Resume time - `[PausedDuration]` - Duration of pause (e.g., "3 days") - `[CurrentApprover]` - Name of current approver - `[NewTATDeadline]` - Updated TAT deadline - `[ActionRequiredSection]` - Dynamic section for approvers only - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Dynamic Sections:** - `[ActionRequiredSection]`: Show only to the current approver **Priority:** High (send immediately when resumed) --- ### 10. **ParticipantAdded.html** **Trigger:** When someone is added as Approver/Spectator to existing request **Recipients:** Newly added participant **Purpose:** Welcome participant and explain their role **Placeholders:** - `[ParticipantName]` - Name of the participant - `[ParticipantRole]` - Role (Approver, Spectator) - `[AddedByName]` - Name of person who added them - `[RoleDescription]` - Description of role - `[RequestId]` - Request number - `[RequestTitle]` - Title of the request - `[InitiatorName]` - Name of the initiator - `[RequestType]` - Type of request - `[CurrentStatus]` - Current workflow status - `[AddedDate]` - Date added - `[AddedTime]` - Time added - `[RequestDescription]` - Brief description - `[PermissionsContent]` - Dynamic HTML explaining permissions - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Dynamic Sections:** - `[PermissionsContent]`: Different content for Approver vs Spectator **Priority:** Medium (send when participant is added) --- ## 🆕 Additional Templates ### 11. **ApproverSkipped.html** **Trigger:** When an approver is skipped in the workflow **Recipients:** Skipped approver, Initiator, other stakeholders **Purpose:** Notify about level skip **Placeholders:** - `[RecipientName]` - Name of the recipient - `[RequestId]` - Request number - `[RequestTitle]` - Title of the request - `[SkippedApproverName]` - Name of skipped approver - `[SkippedByName]` - Name of person who skipped - `[SkippedDate]` - Skip date - `[SkippedTime]` - Skip time - `[NextApproverName]` - Next approver in line - `[SkipReason]` - Reason for skipping - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Priority:** Medium (send when approver is skipped) --- ### 12. **RequestClosed.html** **Trigger:** When initiator closes the request after all approvals **Recipients:** All participants (approvers, spectators) **Purpose:** Notify about request closure and provide summary **Placeholders:** - `[RecipientName]` - Name of the recipient - `[RequestId]` - Request number - `[RequestTitle]` - Title of the request - `[InitiatorName]` - Name of the initiator - `[CreatedDate]` - Request creation date - `[ClosedDate]` - Closure date - `[ClosedTime]` - Closure time - `[TotalDuration]` - Total duration from creation to closure - `[ConclusionSection]` - Dynamic section for conclusion remarks - `[TotalApprovers]` - Total number of approvers - `[TotalApprovals]` - Total approvals received - `[WorkNotesCount]` - Number of work notes - `[DocumentsCount]` - Number of documents - `[ViewDetailsLink]` - Link to request - `[CompanyName]` - Company name **Dynamic Sections:** - `[ConclusionSection]`: Show if conclusion remarks provided **Priority:** Low (send when request is closed) --- ## 🔄 Dynamic Placeholder Format ### Standard Placeholders Format: `[PlaceholderName]` Example: `[InitiatorName]` → Replace with actual name ### Dynamic Sections Format: `[SectionName]` These should be replaced with HTML blocks or empty strings based on conditions. **Example for Priority Section:** ```html
This request has been marked as HIGH priority and requires prompt attention.