What actions can be triggered automatically when a case milestone warning or violation occurs?
Answer
Basics: In Service Cloud, Entitlement Management attaches an Entitlement Process to a Case. The process has Milestones (for example First Response in 1 hour, Resolution in 8 hours). Milestone actions are the automations that run on those timers: warn the owner, escalate to the manager, flag the case, or record that the SLA was met.
How it works:
- Setup > Entitlement Settings: enable entitlements and milestones; create Entitlements for Accounts.
- Create Milestones, then an Entitlement Process with ordered milestones, their time triggers and business hours.
- For each milestone add actions: Success, Warning (time trigger before target) or Violation (at or after target), and choose email alert, task, field update or outbound message.
- A case gets an entitlement and process, creating CaseMilestone records with TargetDate. Completing the milestone (criteria met or manual/Flow/Apex) fires Success; otherwise the time trigger fires Warning or Violation.
Advanced / deep dive: Milestone actions use the time-trigger framework similar to old workflow actions, so they run asynchronously close to, but not exactly at, the target time. Milestones complete automatically when their completion criteria are met, or programmatically by setting CaseMilestone.CompletionDate. Each time-trigger can have multiple actions, and you can stagger warnings (for example 30 and 10 minutes before). Business hours and pauses (for example Status = On Hold using the entitlement process's "Pause" conditions) alter the real target time. Workflow Rules are retired for new development in favor of Flow, but milestone actions still rely on these legacy action types; newer releases add Flow-based options (verify availability). A common architecture is to set a field update on violation and let a record-triggered Flow handle the complex escalation.
Code / config example: