Newer Version Available
EntitlementProcess
This type extends the Metadata metadata type and inherits its fullName field.
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” might have the file name “gold_support_v2.entitlementProcess”). This file name corresponds to the slaProcess.NameNorm field exposed through the SOAP API. This file name is distinct from the name field, which represents what displays in the user interface and, if versioning is enabled, might 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
| Field Name | Field Type | Description |
|---|---|---|
| active | boolean | Indicates whether the entitlement process is active (true) or not (false). |
| businessHours | string |
The business hours
that apply to the entitlement process. This field is available in API version 30.0 and later. |
| description | string | The description of the entitlement process. |
| entryStartDateField | string | 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:
|
| exitCriteriaBooleanFilter | string | 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 | FilterItem[] | For milestone processes on which a case exits the process when custom criteria are met, specifies those criteria. |
| exitCriteriaFormula | string | For milestone processes on which a case exits the process when a custom formula evaluates to true, specifies that formula. |
| isVersionDefault | boolean | Indicates whether the entitlement process is the default version
(true) or not (false). This field is available in API version 28.0 and later. |
| milestones | EntitlementProcessMilestoneItem[] | Represents a milestone on the entitlement process. |
| name | string | The name of the entitlement process as it displays in the user interface. |
| SObjectType | string | Indicates the type of record that the entitlement process can run on. |
| versionMaster | string | Identifies the sequence of versions to which this entitlement
process belongs. This field’s contents can be any value as
long as it is identical among all versions of the entitlement
process. This field is available in API version 28.0 and later. |
| versionNotes | string | The description of the entitlement process version. This field is available in API version 28.0 and later. |
| versionNumber | int | The version number of the entitlement process. Must be 1 or
greater. This field is available in API version 28.0 and later. |
Fields
| Field Name | Field Type | Description |
|---|---|---|
| businessHours | string |
The
business hours that apply to the milestone. This field is available in API version 30.0 and later. |
| criteriaBooleanFilter | string | For milestones that apply only when criteria are met and for which filter logic is added, specifies that logic. |
| milestoneCriteriaFilterItems | FilterItem[] | For milestones that apply only when criteria are met, specifies those criteria. |
| milestoneCriteriaFormula | string | For milestones that apply only when a formula evaluates to true, specifies that formula. |
| milestoneName | string | The name of the milestone. |
| minutesCustomClass | string | The name of the Apex class that is used to calculate the trigger time. This field is available in API version 30.0 and later. |
| minutesToComplete | int | The number of minutes from when the case enters the entitlement process that the milestone occurs. |
| successActions | WorkflowActionReference[] | The actions triggered when the milestone is completed. |
| timeTriggers | EntitlementProcessMilestoneTimeTrigger[] | The time triggers on an entitlement process milestone. |
| useCriteriaStartTime | boolean | When the milestone starts: when the milestone criteria are met (true) or when the case enters the entitlement process (false). |
Fields
| Field Name | Field Type | Description |
|---|---|---|
| actions | WorkflowActionReference[] | The actions to take when the time trigger is reached, if, at that time, the milestone is not completed. |
| timeLength | int | The length of time between the time trigger activation and the milestone target completion date. This may be a negative or positive value. Negative values indicate that the target completion date has not 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 | MilestoneTimeUnits (enumeration of type string) | Specifies the type of unit used to determine when a workflow
should be triggered. Valid values are:
|
Declarative Metadata Sample Definition
This is 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.