Setup Milestone and Entitlement Process

•	Setup Milestone : Milestones represent required steps in your support management process, like first response times. Set up and customize milestones in your org so they can be added to entitlement processes and applied to support records like cases and work orders.
1.	Customize Milestone Page Layouts : Customize your page layouts for milestones to help support agents and supervisors track support progress. 
a.	Add any of the following fields to case and object milestone detail pages.
•	 To edit case milestone detail page layouts, from Setup, enter Case Milestones in the Quick Find box, then click Page Layouts under Case Milestones.
•	To edit object milestone detail page layouts (which apply to work order milestones), from Setup, enter Object Milestones in the Quick Find box, then click Page Layouts under Object Milestones.
•	 Fields with Description
•	Actual Elapsed Time :	The amount of time that it took to complete a milestone.
             (Elapsed Time) – (Stopped Time) = (Actual Elapsed Time)
•	Completed :  Icon that indicates milestone completion.
•	Completion Date :   The date and time the milestone was completed.
•	Elapsed Time :    The time it took to complete a milestone. Automatically calculated to include any business hours on the support record. Elapsed time is calculated only after the Completion Date field is populated.
•	Entitlement Process :	The entitlement process that is being used for the record. Entitlement processes are optional.
•	 Start Date :   The date and time that the milestone tracking started.
•	Stopped Time :  How long an agent has been blocked from completing a milestone. For example, an agent might wait for a customer to reply with more information.
•	Target Date :	The date and time to complete the milestone.
•	Target Response :  The time to complete the milestone. Automatically calculated to include any business hours on the support record.
•	Time Remaining :    The time that remains before a milestone violation. Automatically calculated to include any business hours on the support record.
•	Time Since Target  :	The time that has elapsed since a milestone violation. Automatically calculated to include any business hours on the support record.
•	Violation :   Icon that indicates a milestone violation.
   b.    Add milestone elements to case and work order page layouts.
•	 Add milestone fields.
•	Fields with Description
•	Milestone Status :  The milestone’s status.
•	Milestone Status Icon	: An icon that corresponds to the milestone status:
•	Milestone completed icon  
•	Milestone open violation icon  
•	Closed violation icon  
•	Entitlement Process Start Time :  The time the record enters the entitlement process.
•	Entitlement Process End Time :   The time the record exits the entitlement process.	
•	 Add the Case Milestones or Object Milestones related list to display the record’s 
             milestones.
       2.  Enable Milestone Feed Items : From Setup, enter Entitlement Settings in the 
            Quick Find box, then select Entitlement Settings.
•	Select Enable milestone feed items. This enables feed items for both cases and work orders.
•	milestones feed items are posted, agents can click the milestone name to view its details.
     3.    Set Up the Milestone Tracker : The milestone tracker gives support agents a       complete view of upcoming and completed milestones, and displays countdowns for active and overdue milestones. Add it to the case feed, work order feed, a custom page, or the Service Console. The milestone tracker helps agents be prepared for support deadlines by showing them:
a.	 The time remaining until an active milestone reaches its Target Date
b.	The time passed since an overdue milestone’s Target Date
c.	A list of upcoming milestones
d.	A list of completed milestones

        

         In Salesforce Classic, you can:
•	Add it to the case feed. If you plan to use milestones on work orders, follow the same steps to add the tracker to the work order feed.
a.	From the object management settings for cases, go to Page Layouts.
b.	In the Case Page Layouts section, click Edit, and then click Feed View in the page layout editor.
c.	In the Other Tools and Components section, select the Milestone Tracker and specify where on the page you want it to appear.
d.	Click Save.
•	Add it to a custom Visualforce page using the <apex:milestoneTracker> component.
•	Add it as a component to the Service Console.
•	To make it display time remaining or time overdue in business hours, follow these steps.
a.	From Setup, enter Entitlement Settings in the Quick Find box, then select Entitlement Settings.
b.	In the Milestone Tracker section, deselect Show the time remaining in actual hours, not business hours.
c.	Click Save.
      4.  Limit User Updates to Milestones :  Add validation rules to milestones to prevent                  users from updating milestones unless certain criteria are met.   
      5.   Create a Milestone  :  Milestones represent required steps in your support process, such as case resolution time and first response time. You create master milestones in your org and then add them to entitlement processes to enforce different service levels on support records, like cases and work orders.
      6.   Auto-Complete Case Milestones  :  Create an Apex trigger that automatically marks milestones Completed on cases that match unique criteria. In your trigger, define which events and related case criteria must be satisfied for a milestone to be marked Completed. You can implement a similar trigger to auto-complete work order milestones.
•	Setup Entitlement process : Entitlement processes are timelines that include all of the steps (milestones) that your support team must complete to resolve cases or work orders. Set up an entitlement process to apply to entitlements in your Salesforce org.
1.  Create an Entitlement Process : Create an entitlement process to give support agents  a timeline of required steps to follow when solving support records. Each process includes the logic necessary to determine how to enforce the correct service level for your customers. You must create milestones before you create an entitlement process.
•	From Setup, enter Entitlement Processes in the Quick Find box, then select Entitlement Processes under Entitlement Management.
•	Click New Entitlement Process.
•	Select an entitlement process type. If you intend to use the process to enforce milestones on cases, select Case. If you intend to use the process to enforce milestones on work orders, select Work Order. 
•	Enter a name—for example, Standard Support Process—and a description.
•	If you want to enable the process, select Active.
•	Optionally, if entitlement versioning is enabled, select Default Version to make this version of the entitlement process the default.
•	Choose the criteria for records to enter and exit the entitlement process.
  2.  Customize Entitlement Process Fields : If you intend to use entitlement processes in   your Salesforce org, customize page layouts to ensure that support agents can see     and interact with entitlement processes.
a.	Add these fields to case and work order page layouts.
•	Timeline (available only on case page layouts)	How far along a case is to reaching an entitlement process’s milestones. You can click or hover your mouse pointer over each milestone to view its details. These icons represent milestones:
          Completed milestone        Violated milestone   
•	Stopped : Lets you stop an entitlement process on a record, which might be necessary if you’re waiting for a customer’s response.
•	Stopped Since	The date and time the entitlement process was stopped on the record.
       b.   Save your changes.
  3.  Add a Milestone to an Entitlement Process : Add milestones to entitlement              processes to define required steps in your support process.
•	From Setup, enter Entitlement Processes in the Quick Find box, then select Entitlement Processes.
•	Click the name of an entitlement process.
•	If you’re using versioning, click the name of the entitlement process again under Entitlement Process Versions.
•	Click New on the Milestones related list.
•	Choose the milestone.
•	In Time Trigger (Minutes), enter the number of minutes in which users must complete the milestone before it triggers an action.
•	 if you’d like the trigger time for the milestone to be calculated dynamically based on the milestone type and properties of the case or work order, click Enable Apex Class for the Time Trigger (Minutes).
•	If you selected Enable Apex Class for the Time Trigger (Minutes), use the lookup to specify an Apex class for the dynamically calculated milestone.
•	Choose when the milestone starts:
•	Optionally, select the business hours that you want to apply to the Target Date calculation for this milestone. If you don’t specify business hours for the milestone, then the Entitlement Process business hours are used. If neither are specified, then the business hours on the case or work order are used.
•	Specify the order in which Salesforce should process the milestones. This applies to situations where a support record matches the criteria of multiple milestones at the same time.
•	Enter the criteria a record must match for the milestone to apply to it:
•	Choose criteria are met and select the filter criteria that a record must meet for a milestone to apply to it. For example, set a case filter to Priority equals High if you want the milestone to apply to cases with the Priority field marked High.
•	Choose formula evaluates to true and enter a formula that returns a value of “True” or “False.” Salesforce triggers the rule if the formula returns “True.”
•	Choose formula evaluates to true and enter a formula that returns a value of “True” or “False.” The milestone applies to records if the formula returns “True.” For example, the formula (Case: Priority equals High) AND (Case: Case Origin equals Email, Web) applies the milestone to cases where the Priority field is High and the Case Origin field is marked Email or Web. You can’t use the Case Owner field in formulas.
•	Click Save.
4.  Add a Milestone Action to an Entitlement Process : Milestone actions are time- dependent workflow actions that occur at every step (milestone) in an entitlement process. After you create an entitlement process and add milestones to it, add milestone actions to the milestones.
•	From Setup, enter Entitlement Processes in the Quick Find box, then select Entitlement Processes.
•	Click the name of an entitlement process.
•	Click the name of a milestone on the Milestones related list.
•	If you want to add a warning or violation action, add a time trigger first. After you add a trigger, the option to add a workflow action appears. Success actions use the milestone’s time trigger.
•	Click Add Workflow Action and select an option.
5.  Apply an Entitlement Process to an Entitlement : You’ve created an entitlement process; now it’s time to use it! Apply an entitlement process to a customer’s entitlement so all support records linked to the entitlement use that process.
•	Go to the entitlement.
•	In the Entitlement Process lookup field, select the process you want to apply.
•	Click Save.