Skip to content

Flow Name: Send Emails on Case Create or Status Update

Last Updated: 2025-10-22 Source Code: Send_Emails_on_Case_create_or_status_update.flow-meta.xml

API Name: Send_Emails_on_Case_create_or_status_update Status: Active Type: Custom Trigger: After Case create/update (Origin = Email), with scheduled paths at 3, 7, and 14 days

Business Purpose

Automates Case communication lifecycle for email-originated cases through creation alerts, status update notifications, and time-based follow-ups. Ensures consistent stakeholder communication and timely responses for pending cases.

Process Flow

  1. Triggers on Case create/update when Origin = Email
  2. If new Case: Sends creation emails to supplier and general recipients
  3. If status changed: Sends status update email to supplier
  4. Scheduled paths at 3, 7, and 14 days after creation
  5. For scheduled paths: Checks if Status = "On Hold" then sends pending response email
📊 Click to view Process Flow Diagram
flowchart TD
    Start([Start: Case Create/Update]) --> Check{Origin =<br/>Email?}
    Check -->|No| End([End])
    Check -->|Yes| IsNew{Is New<br/>Case?}
    IsNew -->|Yes| CreateEmail[Send Creation Emails]
    IsNew -->|No| StatusChange{Status<br/>Changed?}
    StatusChange -->|Yes| UpdateEmail[Send Status Update Email]
    StatusChange -->|No| End
    CreateEmail --> Schedule[Schedule 3/7/14 Day Paths]
    UpdateEmail --> End
    Schedule --> Day3{Day 3:<br/>On Hold?}
    Day3 -->|Yes| Email3[Send Pending Response]
    Day3 -->|No| Day7{Day 7:<br/>On Hold?}
    Email3 --> End
    Day7 -->|Yes| Email7[Send Pending Response]
    Day7 -->|No| Day14{Day 14:<br/>On Hold?}
    Email7 --> End
    Day14 -->|Yes| Email14[Send Pending Response]
    Day14 -->|No| End
    Email14 --> End

    style Start fill:#e1f5ff
    style Check fill:#fff4e1
    style IsNew fill:#fff4e1
    style StatusChange fill:#fff4e1
    style CreateEmail fill:#ffe1e1
    style UpdateEmail fill:#ffe1e1
    style Schedule fill:#e1ffe1
    style Day3 fill:#fff4e1
    style Day7 fill:#fff4e1
    style Day14 fill:#fff4e1
    style Email3 fill:#ffe1e1
    style Email7 fill:#ffe1e1
    style Email14 fill:#ffe1e1
    style End fill:#e1f5ff

Key Business Rules

  • Only processes Cases with Origin = Email
  • Sends different emails based on event: creation, status update, or pending response
  • Scheduled follow-ups only sent if Case Status = "On Hold"
  • Uses ISNEW() to detect new Cases vs. updates
  • NDaysPendingResponse flag prevents duplicate emails during scheduled processing

Dependencies

  • Case object with Origin field
  • Email Alert templates: Case_Created_Email_Supplier, Case_Created_Email_Alert, Case_Status_Updated_Email_Alert_Supplier, Case_Pending_Response_Email_Alert
  • Scheduled flow capability
  • Email deliverability configuration

Changes

No Pull Request references found in metadata.

Pre-Go-Live Concerns

CRITICAL - Fix Before Go-Live

  • Hardcoded "On Hold" status should be moved to Custom Metadata for flexibility

HIGH - Address Soon After Go-Live

  • Verify all email alert templates are properly configured
  • Monitor scheduled path performance with high Case volumes

MEDIUM - Future Enhancement

  • Replace hardcoded status with configurable Custom Metadata
  • Consider consolidating duplicate email alert sends
  • Add error notifications for failed email sends

LOW - Monitor

  • Track email delivery success rates
  • Monitor recipient feedback on email timing and content

Maintenance Notes

Complexity: High - Multiple scheduled paths, complex decision logic, email integrations Review Schedule: Quarterly review or when email templates change Testing: Requires email alert configuration and scheduled path testing Email Templates: Four email alert templates must be maintained