Newer Version Available

This content describes an older version of this product. View Latest

CaseSettings

Represents an organization’s case settings, such as the default case owner, which case-related features are enabled, and which email templates are used for various case activities.

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.
caseCloseNotificationTemplate string Specifies the email template used for case close notifications.The format must be folderName/emailTemplateName.
caseCommentNotificationTemplate string Specifies the email template used for case comment notifications. The format must be folderName/emailTemplateName.
caseCreateNotificationTemplate string Specifies the email template used for case create notifications. The format must be folderName/emailTemplateName.
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:
  • Assignment rules
  • Escalation rules
  • On-Demand Email-to-Case
  • Cases logged in the Self-Service portal
 
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).
enableNewEmailDefaultTemplate boolean Indicates whether default email templates are enabled (true) or not (false). Default email templates are available only if draft emails are enabled.
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.
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).
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).
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).
webToCase WebToCaseSettings The organization’s Web-to-Case settings.

EmailToCaseSettings

Represents an organization’s Email-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:
  • Bounce
  • Discard
  • Requeue
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:
  • Bounce
  • Discard

EmailToCaseRoutingAddress

Represents an organization’s Email-to-Case routing address.

Fields

Field Name Field Type Description
addressType EmailToCaseRoutingAddressType (enumeration of type string) Specifies the type of Email-to-Case routing address. Valid values are:
  • EmailToCase—A routing address used with Email-to-Case or On-Demand Email-to-Case.
  • Outlook—A routing address used with Salesforce for Outlook to create cases from Outlook. Requires that On-Demand Email-to-Case is enabled.
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 owner is specified by Salesforce username.
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.
routingName string Specifies the name of the Email-to-Case routing address.
saveEmailHeaders boolean Indicates whether email routing and envelope information is 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.

FeedItemSettings

Represents an organization’s feed item settings. Available in API version 32.0 and later.

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:
  • Default—Blank lines in email feed items are displayed.
  • HideBlankLines—Blank lines in email feed items are not displayed.
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.

WebToCaseSettings

Represents an organization’s Web-to-Case settings.

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.
enableWebToCase boolean Indicates whether Web-to-Case is enabled (true) or not (false).

Declarative Metadata Sample Definition

This is a sample 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>