Source: https://www.vtfriday.com/2026/11/salesforce-entitlements-milestones-and.html
A standard Case Escalation Rule works fine when every customer shares the same response window. Once your company sells tiered support plans, or promises separate deadlines for First Response, status updates, and Final Resolution on the same ticket, one escalation clock falls short.
Service Cloud Entitlement Management separates who qualifies for support from how the SLA timer behaves. Instead of asking agents to open contract PDFs or memorize VIP accounts, Salesforce links the contractual timeline straight to the Case and puts a live countdown clock inside the Lightning Console.
🔑 Key points
- Entitlement Management uses four linked pieces: Milestones (the individual SLA steps), Entitlement Processes (the timeline templates), Entitlements (the customer records), and Case Milestones (the active timers on a Case).
- Every Entitlement belongs to an Account, and you can also scope it to a specific Asset, a Service Contract, or a list of eligible Contacts.
- Each Milestone uses one of three recurrence types: No Recurrence (runs once per Case), Independent (restarts after completion based on the completion time), or Sequential (repeats on a fixed cadence from when criteria were first met).
- Milestones do not guess when an agent replied. Unless you configure completion automation (such as a Record-Triggered Flow or Apex trigger updating
CaseMilestone.CompletionDate) or have agents mark them complete manually, the timer runs straight into a breach. - Turning on Entitlement Versioning lets you edit milestone structures in a new version of an active Entitlement Process without disturbing open Cases on the older version. Note that once you enable versioning, Salesforce does not let you turn it back off.
🎬 Example scenario: the "false breach" first-response trap
The symptom: A support team rolls out a new Entitlement Process with a 60-minute "First Response" milestone. Agents reply to customers from the Case Feed within 15 minutes, yet every single ticket fires a 60-minute SLA violation email to management.
The cause: The admin built the Milestone, added it to the Entitlement Process, and linked the Entitlement to incoming Cases, assuming Salesforce would stop the First Response timer as soon as an outbound email went out. Instead, CaseMilestone records stay open until something populates their CompletionDate field.
The fix: The admin adds an after-save Record-Triggered Flow on EmailMessage (filtering for Incoming = FALSE where ParentId starts with the Case prefix 500). The Flow updates open CaseMilestone records on that Case matching the First Response milestone and sets CompletionDate to $Flow.CurrentDateTime.
Verification: On the next test Case, sending an outbound email from the Case Feed turns the First Response timer green in the Milestone Tracker and cancels the pending warning and violation alerts.
⚙️ How entitlements, processes, and milestones work together
The object names in Entitlement Management sound similar enough to blur together at first. The easiest way to keep them straight is to separate the reusable SLA template in Setup from the customer records stored as org data.
1. Milestones (the reusable SLA steps)
In Setup, a Milestone (MilestoneType) is just a named step in your support workflow, like First Response, Engineering Handoff, or Resolution Time. You do not set minutes here. You only pick a name and a Recurrence Type:
- No Recurrence runs once on a Case, which fits First Response and Final Resolution.
- Independent starts a new instance whenever the previous one finishes (assuming criteria still match), measuring the new target from the previous completion timestamp. Teams use this for rules like "update the customer every 4 hours after your last reply."
- Sequential also creates a new instance after completion, but calculates each target on a fixed schedule from when the Case originally matched the criteria.
2. Entitlement Processes (the SLA timeline template)
An Entitlement Process (SlaProcess) combines your Milestones into an enforceable timeline. Inside the process, you configure four things:
- Entry and exit criteria decide when a Case joins the process (such as
Case: Closed EQUALS False) and when it leaves (usuallyCase: Closed EQUALS True). - Milestone criteria and time triggers set how many minutes each step gets based on Case fields (for example, 60 minutes when
Priority = High, or 240 minutes whenPriority = Medium). If target minutes depend on custom math, you can point the milestone to an Apex class implementingSupport.MilestoneTriggerTimeCalculator. - Business Hours can be set at the Entitlement Process level or overridden on individual Milestones. When left blank on the process, Salesforce checks the Business Hours on the Case record, then falls back to the org default Business Hours.
- Each milestone step supports three time-dependent action tracks: Success Actions (fire on timely completion), Warning Actions (fire a set number of minutes or hours before the deadline), and Violation Actions (fire after the deadline passes). These use standard workflow action types: Email Alerts, Field Updates, Tasks, and Outbound Messages.
3. Entitlements and Service Contracts (what the customer bought)
Once the Entitlement Process is active, you create Entitlement records for your customers. Every Entitlement links to an Account and points to an SlaProcess such as "Gold Support Process."
Depending on how your company sells support, you can attach Entitlements straight to Accounts, tie them to specific Assets (like hardware serial numbers or software licenses), or group them under Service Contracts and Contract Line Items with StartDate and EndDate values. If you sell incident packs (like 10 support cases per year), check PerIncident and track the balance in RemainingCases.
4. Case Milestones and the Milestone Tracker
When a Case is saved with an active EntitlementId, Salesforce runs entitlement rules right after escalation rules in the Save Order of Execution. For every milestone step whose criteria match the Case, Salesforce generates a child CaseMilestone record with a calculated TargetDate. Dropping the standard Milestones component onto the Case Lightning Record Page shows agents a live countdown clock for active, completed, and breached steps.
🛠️ Worked example: 1-hour response and 8-hour resolution SLA
Here is a practical setup where premium accounts get a 1-hour first response and an 8-hour resolution target on high-priority tickets, paired with Apex logic to close the First Response milestone when an agent sends an outbound email.
Prerequisites, editions, and permissions
- Entitlement Management is available in Enterprise, Performance, Unlimited, and Developer Editions, and in Professional Edition with the Service Cloud add-on.
- In Setup, open Entitlement Settings, check Enable Entitlement Management, and click Save.
- Admins need
Manage EntitlementsandCustomize Application. Agents need at least Read on Entitlements, Edit on Cases, and Read Field-Level Security (FLS) onEntitlementId,SlaStartDate, andSlaExitDate. - Add the Entitlement Name lookup to the Case Page Layout, add the Entitlements related list to the Account Page Layout, and place the Milestones component on the Case Lightning Record Page.
Step-by-step declarative configuration
- Go to Setup > Entitlement Management > Milestones and click New Milestone. Create
First Responsewith Recurrence Type set to No Recurrence, then createResolution Timewith No Recurrence as well. - Go to Setup > Entitlement Management > Entitlement Processes and click New Entitlement Process. Choose Case, name it
Premium Support SLA, set Case enters the process to Based on case created date, set entry criteria toCase: Closed EQUALS False, and save. - On the
Premium Support SLAdetail page, open the Milestones related list and click New. PickFirst Response, enter60for Time Trigger (Minutes), set Start Time to Milestone Criteria, set criteria toCase: Priority EQUALS High, select your support Business Hours, and save. - Click into that
First Responsemilestone step to add alerts. Under Warning Actions, add a trigger for15minutes before target (fires at minute 45) with an Email Alert to the Case Owner. Under Violation Actions, add a trigger for0minutes after target with an Email Alert to the Support Manager and a Field Update checking a customSLA_Violated__cbox. - Return to the Entitlement Process and add
Resolution Timewith480minutes (8 hours) andCase: Priority EQUALS High, along with its Warning and Violation actions. Check Active onPremium Support SLAand save. - Open a premium customer's Account, scroll to the Entitlements related list, click New, name it
Acme Gold Support, link it toPremium Support SLA, enter a valid Start Date and End Date, and save.
Automating milestone completion in Apex (illustrative excerpt)
Salesforce does not automatically stamp EntitlementId on incoming Email-to-Case or Web-to-Case tickets, and by default it does not mark First Response complete when an agent replies. You can handle both with Record-Triggered Flows, or follow the Auto-Complete Case Milestones pattern in Apex when several channels (email, public Case Comments, or messaging) all count as a valid first reply.
The illustrative Apex excerpt below queries open CaseMilestone records by milestone name and stamps CompletionDate. This is an excerpt only: pair it with an after-insert trigger on EmailMessage (or expose it as an @InvocableMethod for Flow) and test it in your sandbox before deploying.
// Illustrative Apex Excerpt: Completing a CaseMilestone by Milestone Name
// Call this helper from an after-insert EmailMessage trigger or InvocableMethod
// when an agent sends an outbound email on an open Case.
public with sharing class MilestoneCompletionService {
public static void completeMilestoneByName(Set<Id> caseIds, String milestoneName, DateTime completedTime) {
if (caseIds == null || caseIds.isEmpty() || String.isBlank(milestoneName)) {
return;
}
DateTime completionStamp = (completedTime != null) ? completedTime : System.now();
// Query only open CaseMilestones matching the target Cases and MilestoneType name
List<CaseMilestone> openMilestones = [
SELECT Id, CompletionDate
FROM CaseMilestone
WHERE CaseId IN :caseIds
AND MilestoneType.Name = :milestoneName
AND IsCompleted = false
WITH USER_MODE
];
if (openMilestones.isEmpty()) {
return;
}
for (CaseMilestone cm : openMilestones) {
cm.CompletionDate = completionStamp;
}
// Updating CompletionDate automatically sets IsCompleted = true in Salesforce
Database.update(openMilestones, AccessLevel.USER_MODE);
}
}
Notice that the code updates CompletionDate rather than IsCompleted. On CaseMilestone, IsCompleted is read-only and flips to true automatically as soon as CompletionDate is populated. For the Resolution Time milestone, use a similar Record-Triggered Flow or trigger when Case.IsClosed turns true.
How to verify your setup
- Create a test Case on the
AcmeAccount, setPrioritytoHigh, and pickAcme Gold Supportin Entitlement Name. - Check the Milestones component on the Case page. You should see two live countdowns:
First Response(1 hour) andResolution Time(8 hours). - Trigger your completion logic (either send an outbound email from the Case Feed or run
MilestoneCompletionService.completeMilestoneByNamein Anonymous Apex), refresh the page, and confirmFirst Responseshows a green checkmark whileResolution Timekeeps running.
⚠️ Common mistakes and interview traps
⚠️ Interview Trap 1: Assuming "First Response" completes on its own
This trips up more Service Cloud builds than almost anything else. Salesforce starts the timer, but it cannot know what your support desk counts as a first response (an outbound email, a public Case Comment, a phone call log, or a status change to Working). Agree on that event up front and build the Flow or Apex logic to populate CaseMilestone.CompletionDate.
Trap 2: Expecting Case.EntitlementId to fill in automatically
Adding an active Entitlement to an Account does not automatically link that Entitlement to new Cases for that Account. Without a before-save Record-Triggered Flow or Apex trigger to look up the active Entitlement and stamp Case.EntitlementId, the Entitlement Process will never start unless an agent selects it by hand.
Trap 3: Confusing Case exit criteria with milestone completion
If a Case closes and hits the process exit criteria (Case: Closed EQUALS True) before your automation stamps CompletionDate on the Resolution milestone, the Case leaves the process with that milestone still marked incomplete. Make sure your Case-close automation stamps CompletionDate when the ticket closes.
Trap 4: Trying to add or remove milestones on an active, unversioned process
Once an Entitlement Process is active and referenced by Entitlements, Salesforce blocks you from adding or deleting milestones directly. Enable Entitlement Versioning in Entitlement Settings and make structural edits on a new version instead.
🧭 360 Card: Entitlements, Milestones, and SLAs
Rule: An Entitlement tracks the support tier a customer bought, and Milestones enforce the individual deadlines inside that tier's Entitlement Process.
Benefit: Multi-stage contractual commitments (First Response, ongoing updates, Resolution) show up as live countdown clocks on the Case and fire warnings before a breach happens.
Tradeoff: Four moving parts have to stay wired together: Entitlement assignment on the Case, the active Entitlement Process, the Milestones, and completion automation. Miss one link and timers either never start or falsely breach.
Limits: Entitlements attach to Accounts, Contacts, Assets, or Service Contracts. Milestone actions are limited to Email Alerts, Field Updates, Tasks, and Outbound Messages, and rely on accurate Business Hours.
Alternative (Case Escalation Rules): Faster to build when every customer gets one uniform timer and agents do not need live countdown widgets or contract tiers.
At scale: Across hundreds or thousands of B2B accounts, store the support tier on customer Entitlements pointing to a handful of clean Entitlement Processes rather than maintaining dozens of brittle Escalation Rules.
❓ Core Q&A and scenario walkthroughs
A: Putting that SLA in place requires five connected pieces:
- Create two No-Recurrence Milestones in Setup: First Response and Resolution.
- Build an active Case Entitlement Process (
Premium SLA) linked to your support Business Hours, giving First Response 60 minutes and Resolution 480 minutes (8 hours). - Attach Warning Actions (like an Email Alert to the owner 15 minutes before the deadline) and Violation Actions (like a Field Update escalating priority or owner plus a manager Email Alert at breach) to each milestone step.
- Create Entitlement records for premium Accounts (or under their Service Contracts) pointing to
Premium SLA. - Automate the glue with Record-Triggered Flows or Apex: one to stamp
Case.EntitlementIdon incoming premium tickets, and another to populateCaseMilestone.CompletionDatewhen the agent sends the first reply and when the Case closes.
A1: Milestones do not stop on their own. You trigger completion by populating CompletionDate on the open CaseMilestone record when the qualifying reply happens:
- Define what counts as a first reply in your org, usually an outbound
EmailMessage(Incoming = false) sent from the Case Feed or a publicCaseCommentposted by an internal user. - Build an after-save Record-Triggered Flow (or Apex trigger) on
EmailMessage. When an agent sends an email tied to a Case, updateCaseMilestonewhereCaseId = {!$Record.ParentId},MilestoneTypeIdmatches First Response, andIsCompleted = False, settingCompletionDate = {!$Flow.CurrentDateTime}. - Once
CompletionDateis saved, Salesforce flipsIsCompletedtotrue, stops the countdown in the Milestone Tracker, and cancels any queued Warning or Violation actions for that step.
A2: Pick the tool that matches how complex your SLA commitments actually are:
- Use Case Escalation Rules when one blanket threshold applies across the org (such as escalating any open High-Priority Case after 4 business hours), you do not track per-customer support contracts or assets, and agents do not need a live countdown clock on the page.
- Use Entitlements and Milestones when a single Case carries multiple SLA stages (First Response, ongoing updates, Resolution), customers buy different tiers (Gold vs. Silver, or fixed incident counts), agents need visual countdown timers, and leadership wants milestone compliance reports by contract.
✅ Self-check question: A support agent works a Case with an active 1-hour "First Response" milestone and an 8-hour "Resolution" milestone. Forty minutes after Case creation, the customer calls in to say they fixed the issue themselves, so the agent sets Status = Closed without sending an outbound email. Your Case-close Flow completes the "Resolution" milestone, while your "First Response" Flow only runs on outbound emails. What happens to both milestones when the Case closes?
Answer: The Resolution milestone is marked Completed because the Case-close Flow stamped its CompletionDate. The First Response milestone stops counting down because the Case exited the Entitlement Process (Case: Closed EQUALS True) before the 60-minute mark, so no Violation action fires. However, its IsCompleted field stays false, which makes it look uncompleted in SLA reports unless your Case-close Flow also stamps CompletionDate on any still-open First Response milestone when a ticket closes early.
🔗 Next concept follow-up: pausing the SLA clock while waiting on the customer
A: Use the standard Stopped checkbox (IsStopped) on the Case object. When an agent (or a Record-Triggered Flow watching for Status = Waiting on Customer) sets Case.IsStopped = true, Salesforce pauses every active Milestone timer on that Case and logs the pause timestamp in StopStartDate.
When the customer replies and your automation flips Case.IsStopped back to false, Salesforce calculates the business-hours duration the Case spent paused and pushes the TargetDate of each open CaseMilestone forward by that exact window. Your support team is only measured on the time the ticket was actually in their hands.
Comments
Questions, corrections and your own experience are all welcome.
Post a Comment