Newer Version Available
CaseSettings
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See Settings for more details.
File Suffix and Directory Location
CaseSettings values are stored in the Case.settings file in the settings directory. The .settings files are different from other named components because there is only one settings file for each settings component.
Version
CaseSettings is available in API version 27.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| caseAssignNotificationTemplate | string | Specifies the email template used for case assignment
notifications. The format must be
folderName/emailTemplateName. Lightning email templates aren’t packageable. We recommend using a Classic email template. |
| caseCloseNotificationTemplate | string | Specifies the email template used for case close notifications.
The format must be
folderName/emailTemplateName. Lightning email templates aren’t packageable. We recommend using a Classic email template. |
| caseCommentNotificationTemplate | string | Specifies the email template used for case comment notifications.
The format must be
folderName/emailTemplateName. Lightning email templates aren’t packageable. We recommend using a Classic email template. |
| caseCreateNotificationTemplate | string | Specifies the email template used for case create notifications.
The format must be
folderName/emailTemplateName. Lightning email templates aren’t packageable. We recommend using a Classic email template. |
| caseFeedItemSettings | FeedItemSettings[] | Specifies the settings for feed items in feed-based case page layouts. This field is available in API version 32.0 and later. |
| closeCaseThroughStatusChange | boolean | Indicates whether Closed is included in the Case Status field on case edit pages (true) or not (false). |
| defaultCaseOwner | string | Specifies the default owner of a case when assignment rules fail to locate an owner. |
| defaultCaseOwnerType | string | Specifies whether the default case owner is a user or a queue. |
| defaultCaseUser | string | Specifies the user listed in the Case History related list for
automated case changes from:
|
| emailActionDefaultsHandlerClass | string | Use this Apex class name to provide default values for the email action. |
| emailToCase | EmailToCaseSettings | The organization’s Email-to-Case settings. |
| enableCaseFeed | boolean | Indicates whether Case Feed is enabled (true) or not (false). |
| enableDraftEmails | boolean | Indicates whether draft emails are enabled (true) or not (false). Enabling email drafts requires that Case Feed and Email-to-Case are also enabled. |
| enableEarlyEscalationRuleTriggers | boolean | Indicates whether early triggers on escalation rules are enabled (true) or not (false). |
| enableE2CSourceTracking | boolean | Indicates whether Set Case Source to Email is enabled (true) or not (false). After you enable this setting, the Case Source field is updated to Email for all cases that originate from Email-to-Case. Associated emails are marked as Read when the agent opens the case. |
| enableEmailActionDefaultsHandler | boolean | Indicates whether the Email Action Default Handler setting is enabled (true) or not (false). Use this setting to select an Apex class to load a default template or to specify the default target fields for the email action. |
| enableNewEmailDefaultTemplate | boolean | Indicates whether default email templates are enabled (true) or not (false). Default email templates are
available only if draft emails are enabled. Lightning email templates aren’t packageable. We recommend using a Classic email template. |
| enableSuggestedArticlesApplication | boolean | Indicates whether the Suggested Articles list appears on case pages. (true) or not (false). Is only valid if enableSuggestedSolutions=false. |
| enableSuggestedArticlesCustomerPortal | boolean | Indicates whether the Suggested Articles list appears on customer portal pages (true) or not (false). Is only valid if enableSuggestedSolutions=false. |
| enableSuggestedArticlesPartnerPortal | boolean | Indicates whether the Suggested Articles list appears on partner portal pages (true) or not (false). Is only valid if enableSuggestedSolutions=false. |
| enableSuggestedSolutions | boolean | Indicates whether the View Suggested Solutions or Find Articles button appears on case detail pages (true) or not (false). Is only valid if enableSuggestedArticlesApplication, enableSuggestedArticlesCustomerPortal, and enableSuggestedArticlesPartnerPortal=false. |
| keepRecordTypeOnAssignmentRule | boolean | Indicates whether, when applying assignment rules to manually created records, to keep the existing record type (true) or to override the existing record type with the assignee’s default record type (false). |
| newEmailDefaultTemplateClass | string | Specifies the Apex class that defines the default email template for new email messages in Case Feed. This field appears only when enableNewEmailDefaultTemplate=true.Lightning email templates aren’t packageable. We recommend using a Classic email template. |
| notifyContactOnCaseComment | boolean | Indicates whether contacts who are not members of your Self-Service portal can be notified when a new comment is added to a case.(true) or not (false). |
| notifyDefaultCaseOwner | boolean | Indicates whether the default case owner is notified when assigned a new case (true) or not (false). |
| notifyOwnerOnCaseComment | boolean | Indicates whether the case owner is notified when a comment is added to a case (true) or not (false). |
| notifyOwnerOnCaseOwnerChange | boolean | Indicates whether the Send Notification Email checkbox on cases is automatically selected when users change a case owner to another user (true). |
| showEmailAttachmentsInCaseAttachmentsRL | boolean | Indicates whether the case Attachments related list shows email
attachments. If true, the page
displays an email icon next to each attachment from an email in the
Attachments related list for cases. The related list’s list view
also includes a Source column that identifies the attachment’s
origin. If false, email
attachments aren’t displayed in the Attachments related list for
cases. This field is available in API version 40.0 and later. |
| showFewerCloseActions | boolean | Indicates whether the Save & Close button on case edit pages and the Cls link on Cases related lists are hidden (true) or shown (false). |
| systemUserEmail | string | Specifies the email address used when the default case user is the system user. |
| useSystemEmailAddress | boolean | Indicates whether case comment, case attachment, and case assignment email notifications are sent from a system address (true) or whether case notifications appear to be sent from the user or contact updating the case (false). |
| useSystemUserAsDefaultCaseUser | boolean | Indicates whether the system user is used as the automated case user (true) or not (false). If false, then you must specify a value for the defaultCaseUser field. |
| webToCase | WebToCaseSettings | The organization’s Web-to-Case settings. |
Fields
| Field Name | Field Type | Description |
|---|---|---|
| enableEmailToCase | boolean | Indicates whether Email-to-Case is enabled (true) or not (false). Note: once Email-to-Case is enabled, it can’t be disabled. |
| enableHtmlEmail | boolean | Indicates whether HTML email is enabled (true) or not (false). |
| enableOnDemandEmailToCase | boolean | Indicates whether On-Demand Email-to-Case is enabled (true) or not (false). |
| enableThreadIDInBody | boolean | Indicates whether the Thread ID for a case is inserted in the body of an email (true) or not (false). |
| enableThreadIDInSubject | boolean | Indicates whether the Thread ID for a case is inserted in the subject line of an email (true) or not (false). |
| notifyOwnerOnNewCaseEmail | boolean | Indicates whether the owner of a case receives a notification when a new email related to the case is received (true) or not (false). |
| overEmailLimitAction | EmailToCaseOnFailureActionType (enumeration of type string) | Specifies what happens to email messages received after an organization exceeds its daily Email-to-Case limits. Valid values are: |
| preQuoteSignature | boolean | Indicates whether the user signature is inserted after the reply but before the email thread in an outbound email (true) or at the end of the email (false). |
| routingAddresses | EmailToCaseRoutingAddress[] | The organization’s Email-to-Case routing address settings. |
| unauthorizedSenderAction | EmailToCaseOnFailureActionType (enumeration of type string) | Specifies what happens to email messages received from invalid
senders. Valid values are:
|
Fields
| Field Name | Field Type | Description |
|---|---|---|
| addressType | EmailToCaseRoutingAddressType (enumeration of type string) | Specifies the type of Email-to-Case routing address. Valid values are:
|
| authorizedSenders | string | Specifies the email addresses or domains from which On-Demand Email-to-Case can receive email. Include multiple entries in a comma-separated list. |
| caseOrigin | string | Specifies the default case origin for cases created through this routing address. |
| caseOwner | string |
Specifies the default owner of cases created through this routing address. The case owner can be either a user or a queue. Specify the case owner using a Salesforce username. Specifying a case owner here in the routing address settings value of defaultCaseOwner in CaseSettings. |
| caseOwnerType | string | Specifies whether the default case owner is a user or a queue. |
| casePriority | string | Specifies the default case priority for cases created through this routing address. |
| createTask | boolean | Indicates whether a task is automatically assigned to the case owner when a case is created through an email (true) or not (false). |
| emailAddress | string | Specifies the email address used to route email messages that are submitted as cases. |
| emailServicesAddress | string | Specifies the Salesforce-generated routing address used for setting up Email-to-Case forwarding. This field value is read-only and can't be modified. |
| isVerified | boolean | Indicates whether the customer has verified the routing address (typically by clicking a confirmation email). This field value is read-only and can't be modified. |
| routingName | string | Specifies the name of the Email-to-Case routing address. |
| saveEmailHeaders | boolean | Indicates whether email routing and envelope information are saved (true) or not (false). |
| taskStatus | string | Specifies the default status on tasks automatically assigned to the case owner when email is submitted as a case. Only applies if createTask is set to true. |
| Field Name | Field Type | Description |
|---|---|---|
| characterLimit | int | Specifies the maximum number of characters displayed for each feed item. |
| collapseThread | boolean | Indicates whether earlier messages in an email thread are removed from email feed items(true) or not (false). |
| displayFormat | FeedItemDisplayFormat (enumeration of type string) | Indicates how email feed items are displayed. Valid values are:
|
| feedItemType | FeedItemType (enumeration of type string) | The type of feed item to which the settings apply. For FeedItemSettings, the only valid feedItemType value is EmailMessageEvent. |
Fields
| Field Name | Field Type | Description |
|---|---|---|
| caseOrigin | string | Specifies the default case origin for cases created through this web form. Only applies if enableWebToCase is set to true. |
| defaultResponseTemplate | string | Specifies the default template used for email responses to cases
submitted through a Self-Service portal. Only applies if
enableWebToCase is set to true. Lightning email templates aren’t packageable. We recommend using a Classic email template. |
| enableWebToCase | boolean | Indicates whether Web-to-Case is enabled (true) or not (false). |
Declarative Metadata Sample Definition
This code sample is an example of a case settings file.
1<?xml version="1.0" encoding="UTF-8"?>
2<CaseSettings xmlns="http://soap.sforce.com/2006/04/metadata">
3 <caseAssignNotificationTemplate>
4 unfiled$public/SupportCaseAssignmentNotification
5 </caseAssignNotificationTemplate>
6 <caseCloseNotificationTemplate>
7 unfiled$public/SupportCaseCloseNotification
8 </caseCloseNotificationTemplate>
9 <caseCommentNotificationTemplate>
10 unfiled$public/SupportCaseCommentNotification
11 </caseCommentNotificationTemplate>
12 <caseCreateNotificationTemplate>
13 unfiled$public/SupportCaseCreateNotification
14 </caseCreateNotificationTemplate>
15 <closeCaseThroughStatusChange>true</closeCaseThroughStatusChange>
16 <defaultCaseOwner>admin@acme.com</defaultCaseOwner>
17 <defaultCaseOwnerType>User</defaultCaseOwnerType>
18 <defaultCaseUser>admin@acme.com</defaultCaseUser>
19 <emailToCase>
20 <enableEmailToCase>true</enableEmailToCase>
21 <enableHtmlEmail>false</enableHtmlEmail>
22 <enableOnDemandEmailToCase>true</enableOnDemandEmailToCase>
23 <enableThreadIDInBody>true</enableThreadIDInBody>
24 <enableThreadIDInSubject>true</enableThreadIDInSubject>
25 <notifyOwnerOnNewCaseEmail>false</notifyOwnerOnNewCaseEmail>
26 <overEmailLimitAction>Bounce</overEmailLimitAction>
27 <preQuoteSignature>true</preQuoteSignature>
28 <routingAddresses>
29 <addressType>EmailToCase</addressType>
30 <authorizedSenders>user@acme.com</authorizedSenders>
31 <caseOrigin>Email</caseOrigin>
32 <casePriority>Medium</casePriority>
33 <createTask>true</createTask>
34 <emailAddress>support@acme.com</emailAddress>
35 <routingName>EmailToCaseRoutingAddress1</routingName>
36 <saveEmailHeaders>true</saveEmailHeaders>
37 <taskStatus>Not Started</taskStatus>
38 </routingAddresses>
39 <routingAddresses>
40 <addressType>Outlook</addressType>
41 <authorizedSenders>user@acme.com</authorizedSenders>
42 <caseOrigin>Email</caseOrigin>
43 <caseOwner>admin@acme.com</caseOwner>
44 <caseOwnerType>User</caseOwnerType>
45 <casePriority>High</casePriority>
46 <routingName>OutlookRoutingAddress1</routingName>
47 </routingAddresses>
48 <unauthorizedSenderAction>Discard</unauthorizedSenderAction>
49 </emailToCase>
50 <enableCaseFeed>true</enableCaseFeed>
51 <enableDraftEmails>true</enableDraftEmails>
52 <enableEarlyEscalationRuleTriggers>true</enableEarlyEscalationRuleTriggers>
53 <enableNewEmailDefaultTemplate>true</enableNewEmailDefaultTemplate>
54 <enableSuggestedArticlesApplication>true</enableSuggestedArticlesApplication>
55 <enableSuggestedArticlesCustomerPortal>true</enableSuggestedArticlesCustomerPortal>
56 <enableSuggestedArticlesPartnerPortal>false</enableSuggestedArticlesPartnerPortal>
57 <enableSuggestedSolutions>false</enableSuggestedSolutions>
58 <keepRecordTypeOnAssignmentRule>true</keepRecordTypeOnAssignmentRule>
59 <newEmailDefaultTemplateClass>CaseTemplateController</newEmailDefaultTemplateClass>
60 <notifyContactOnCaseComment>true</notifyContactOnCaseComment>
61 <notifyDefaultCaseOwner>true</notifyDefaultCaseOwner>
62 <notifyOwnerOnCaseComment>true</notifyOwnerOnCaseComment>
63 <notifyOwnerOnCaseOwnerChange>false</notifyOwnerOnCaseOwnerChange>
64 <showFewerCloseActions>false</showFewerCloseActions>
65 <useSystemEmailAddress>true</useSystemEmailAddress>
66 <webToCase>
67 <caseOrigin>Web</caseOrigin>
68 <defaultResponseTemplate>unfiled$public/SupportCaseResponse</defaultResponseTemplate>
69 <enableWebToCase>true</enableWebToCase>
70 </webToCase>
71</CaseSettings>Wildcard Support in the Manifest File
The wildcard character * (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see Settings. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.