ForceChallenges
ProblemsDailyNotesInterview
Sign in

Practice

All problemsSOQL practiceApex trigger challengesDaily challengeOpportunityTrigger.oldMapBefore UpdateBulkificationContactValidationGROUP BYSemi-JoinAccountBefore Insert

Interview questions

All questionsAdminAdministrationApexApex TriggerAsync ApexDevelopmentField ServiceField ServiceIntegrationLwc

By company

DeloitteSalesforceAccentureInfosysPwCCognizant

Learn

Study notes

ForceChallenges

AboutContact usPrivacy PolicyTerms of ServiceFor AI assistants (llms.txt)
© 2026 ForceChallenges · Salesforce SOQL & Apex trigger practice
Service Cloud questions98 of 100
Service CloudMedium 2 min read

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:

  1. Setup > Entitlement Settings: enable entitlements and milestones; create Entitlements for Accounts.
  2. Create Milestones, then an Entitlement Process with ordered milestones, their time triggers and business hours.
  3. 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.
  4. 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:

Practice SOQL & Apex
PreviousWhat architectural governance principles guarantee enterprise scalability and maintainability across large Service Cloud implementations?Next What is Salesforce Knowledge and how does it empower support organizations?

More Service Cloud questions

  • What role do asynchronous Apex and batch jobs play in handling heavy background processing for support operations?
  • What data governance practices ensure long-term database hygiene across enterprise Service Cloud environments?
  • How does entitlement process versioning manage rule updates for active customer support contracts?
  • How do real-time supervisor alerts assist contact center managers in mitigating queue bottlenecks?
  • How do Knowledge feedback analytics help authors identify articles that require content revision?
apex
// Complete open First Response milestones for cases that just got a public comment
List<CaseMilestone> toClose = [
    SELECT Id FROM CaseMilestone
    WHERE CaseId IN :caseIds AND MilestoneType.Name = 'First Response'
      AND IsCompleted = false];
for (CaseMilestone cm : toClose) cm.CompletionDate = System.now();
update toClose;

Hidden gotchas & must-remember points:

  • Time triggers run asynchronously, so timing is approximate.
  • Warning actions fire only if the milestone is still open at that time.
  • Business hours on the entitlement process change when violation happens.
  • Milestones that are completed late still count as violated.
  • Case must have an entitlement process or no milestones exist.
  • Do not rely on Process Builder or Workflow Rules for new work; use Flow where supported.

Best practice: Keep milestone actions minimal (field update or flag) and delegate escalation logic to a record-triggered Flow.

Service CloudMilestone ActionsSLA Automation