EntitlementProcess

Represents the settings for an entitlement process.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

Entitlement process values are stored in files in the entitlementProcesses directory. Each file has the name of a process and the suffix .entitlementProcess. Each file contains one entitlement process or, if entitlement versioning is enabled, one version of an entitlement process.

The name of the file is the name of the entitlement process with the version appended to the end, if applicable (for example, an entitlement process named “gold_support” can have the file name “gold_support_v2.entitlementProcess”). This file name corresponds to the slaProcess.NameNorm field exposed through SOAP API. This file name is distinct from the name field, which represents what displays in the user interface and, if versioning is enabled, can be shared among multiple versions of the same entitlement process. The slaProcess.NameNorm field contains the lowercase version of the name field shown in the user interface.

Version 

Entitlement processes are available in API version 27.0 and later.

Fields 

active 

  • Type: boolean
  • Required: No
  • Description: Indicates whether the entitlement process is active (true) or not (false).

businessHours 

  • Type: string
  • Required: No
  • Introduced: API version 30.0
  • Description: The business hours that apply to the entitlement process.

description 

  • Type: string
  • Required: No
  • Description: The description of the entitlement process.

entitlementRules 

entryStartDateField 

  • Type: string

  • Required: No

  • Description: For milestone processes on which a case enters the process based on a custom date/time field on the case, specifies which date and time are used. Valid values are:

    • SlaStartDate (entitlement process start date)
    • CreatedDate (date case was opened)
    • ClosedDate (date case was closed)
    • LastModifiedDate (date case was last modified)
    • StopStartDate (date case was stopped)

exitCriteriaBooleanFilter 

  • Type: string
  • Required: No
  • Description: For milestone processes on which a case exits the process when custom criteria are met, and for which filter logic is added, specifies that logic.

exitCriteriaFilterItems 

  • Type: FilterItem[]
  • Required: No
  • Description: For milestone processes on which a case exits the process when custom criteria are met, specifies those criteria.

exitCriteriaFormula 

  • Type: string
  • Required: No
  • Description: For milestone processes on which a case exits the process when a custom formula evaluates to true, specifies that formula.

isRecordTypeApplied 

  • Type: boolean
  • Required: No

isVersionDefault 

  • Type: boolean
  • Required: No
  • Introduced: API version 28.0
  • Description: Indicates whether the entitlement process is the default version (true) or not (false).

milestones 

name 

  • Type: string
  • Required: No
  • Description: The name of the entitlement process as it displays in the user interface.

recordType 

  • Type: string
  • Required: No

SObjectType 

  • Type: string
  • Required: No
  • Description: Indicates the type of record that the entitlement process can run on.

versionMaster 

  • Type: string
  • Required: No
  • Introduced: API version 28.0
  • Description: Identifies the sequence of versions to which this entitlement process belongs. This field’s contents can be any value as long as it’s identical among all versions of the entitlement process.

versionNotes 

  • Type: string
  • Required: No
  • Introduced: API version 28.0
  • Description: The description of the entitlement process version.

versionNumber 

  • Type: int
  • Required: No
  • Introduced: API version 28.0
  • Description: The version number of the entitlement process. Must be 1 or greater.

EntitlementProcessMilestoneItem Type 

Represents a milestone item on an entitlement process.

Fields 

agreementType 

  • Type: string
  • Required: No

businessHours 

  • Type: string
  • Required: No
  • Introduced: API version 30.0
  • Description: The business hours that apply to the milestone.

criteriaBooleanFilter 

  • Type: string
  • Required: No
  • Description: For milestones that apply only when criteria are met and for which filter logic is added, specifies that logic.

isAgentic 

  • Type: boolean
  • Required: No

isDisplayedOnLinkedEntity 

  • Type: boolean
  • Required: No

milestoneCompletionCriteria 

milestoneCriteriaFilterItems 

  • Type: FilterItem[]
  • Required: No
  • Description: For milestones that apply only when criteria are met, specifies those criteria.

milestoneCriteriaFormula 

  • Type: string
  • Required: No
  • Description: For milestones that apply only when a formula evaluates to true, specifies that formula.

milestoneName 

  • Type: string
  • Required: No
  • Description: The name of the milestone.

milestonePauseCriteria 

minutesCustomClass 

  • Type: string
  • Required: No
  • Introduced: API version 30.0
  • Description: The name of the Apex class that is used to calculate the trigger time.

minutesToComplete 

  • Type: int
  • Required: No
  • Description: The number of minutes from when the case enters the entitlement process that the milestone occurs.

successActions 

timeTriggers 

useCriteriaStartTime 

  • Type: boolean
  • Required: No
  • Description: When the milestone starts: when the milestone criteria are met (true) or when the case enters the entitlement process (false).

EntitlementProcessMilestoneTimeTrigger Type 

Represents the time trigger on an entitlement process milestone.

Fields 

actions 

  • Type: WorkflowActionReference[]
  • Required: No
  • Description: The actions to take when the time trigger is reached, if, at that time, the milestone isn’t completed.

timeLength 

  • Type: int
  • Required: No
  • Description: The length of time between the time trigger activation and the milestone target completion date. This length of time can be a negative or positive value. Negative values indicate that the target completion date hasn’t yet arrived and correspond to warning time triggers. Positive values indicate that the target completion date has passed and correspond to violation time triggers.

workflowTimeTriggerUnit 

  • Type: MilestoneTimeUnits (enumeration of type string)
  • Required: Yes
  • Description: Specifies the type of unit used to determine when a workflow is triggered.
  • Possible values:
    • Minutes
    • Hours
    • Days

EntitlementRule Type 

Fields 

criteriaBooleanFilter 

  • Type: string
  • Required: No

criteriaFilterItems 

entitlementName 

  • Type: string
  • Required: No

order 

  • Type: int
  • Required: No

MilestoneCompletionCriteria Type 

Fields 

criteriaBooleanFilter 

  • Type: string
  • Required: No

criteriaObjectName 

  • Type: string
  • Required: No

criteriaObjectType 

  • Type: string
  • Required: No

milestoneCriteriaFilterItems 

milestoneCriteriaFormula 

  • Type: string
  • Required: No

MilestonePauseCriteria Type 

Fields 

criteriaBooleanFilter 

  • Type: string
  • Required: No

milestoneCriteriaFilterItems 

milestoneCriteriaFormula 

  • Type: string
  • Required: No

Declarative Metadata Sample Definition 

Here’s a sample entitlement process.

1<?xml version="1.0" encoding="UTF-8"?>
2<EntitlementProcess xmlns="http://soap.sforce.com/2006/04/metadata">
3    <active>true</active>
4    <description>eppersone</description>
5    <entryStartDateField>SlaStartDate</entryStartDateField>
6    <exitCriteriaBooleanFilter>1 OR 2</exitCriteriaBooleanFilter>
7    <exitCriteriaFilterItems>
8        <field>Case.IsClosed</field>
9        <operation>equals</operation>
10        <value>true</value>
11    </exitCriteriaFilterItems>
12    <exitCriteriaFilterItems>
13        <field>Case.Description</field>
14        <operation>startsWith</operation>
15        <value>foo</value>
16    </exitCriteriaFilterItems>
17    <milestones>
18        <milestoneName>m1</milestoneName>
19        <minutesToComplete>1</minutesToComplete>
20        <successActions>
21            <name>emailBob</name>
22            <type>Alert</type>
23        </successActions>
24        <timeTriggers>
25            <actions>
26                <name>emailAlice</name>
27                <type>Alert</type>
28            </actions>
29            <actions>
30                <name>setEscalateToTrue</name>
31                <type>FieldUpdate</type>
32            </actions>
33            <timeLength>1</timeLength>
34            <workflowTimeTriggerUnit>Minutes</workflowTimeTriggerUnit>
35        </timeTriggers>
36        <timeTriggers>
37            <actions>
38                <name>setStopToTrue</name>
39                <type>FieldUpdate</type>
40            </actions>
41            <timeLength>2</timeLength>
42            <workflowTimeTriggerUnit>Minutes</workflowTimeTriggerUnit>
43        </timeTriggers>
44        <useCriteriaStartTime>false</useCriteriaStartTime>
45    </milestones>
46    <milestones>
47        <milestoneCriteriaFilterItems>
48            <field>Case.Priority</field>
49            <operation>equals</operation>
50            <value>High</value>
51        </milestoneCriteriaFilterItems>
52        <milestoneName>m2</milestoneName>
53        <minutesToComplete>120</minutesToComplete>
54        <useCriteriaStartTime>true</useCriteriaStartTime>
55        <successActions>
56            <name>emailBob</name>
57            <type>Alert</type>
58        </successActions>
59    </milestones>
60</EntitlementProcess>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.