AutoResponseRules

Represents an auto-response rule that sets conditions for sending automatic email responses to lead or case submissions based on the attributes of the submitted record. You can access rules metadata for all applicable objects, for a specific object, or for a specific rule on a specific object.

The package.xml syntax for accessing all auto-response rules for all objects is:

1<types>
2 <members>*</members>
3 <name>AutoResponseRules</name>
4 </types>

All rules for a specific object use a similar syntax without the wildcard. For example, all auto-response rules for the Case object would use this syntax:

1<types>
2 <members>Case</members>
3 <name>AutoResponseRules</name>
4 </types>

You can also access specific auto-response rules for an object. The following example only accesses the “samplerule” and “newrule” auto-response rules on the Case object. Notice that for this example the type name syntax is AutoResponseRule and not AutoResponseRules.

1<types>
2 <members>Case.samplerule</members>
3 <members>Case.newrule</members>
4 <name>AutoResponseRule</name>
5 </types>

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

AutoResponseRules for an object have the suffix .autoResponseRules and are stored in the autoResponseRules folder. For example, all Case auto-response rules are stored in the Case.autoResponseRules file.

Version 

Introduced in API version 27.0.

Fields 

autoResponseRule 

  • Type: AutoResponseRule[]
  • Required: No
  • Description: Represents the definitions of the named auto-response rules.

AutoResponseRule Type 

Represents whether a rule is active or not and the order in which the entry is processed in the rule.

Parent Type 

This type extends Metadata and inherits its fields.

Fields 

active 

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

fullName 

  • Type: string

  • Required: No

  • Description: Inherited from Metadata, this field is defined in the WSDL for this metadata type. It must be specified when creating, updating, or deleting. See createMetadata() to see an example of this field specified for a call.

    This value can’t be null.

ruleEntry 

  • Type: RuleEntry[]
  • Required: No
  • Description: Represents the type and description for the auto-response rule.

RuleEntry Type 

Represents the fields used by the rule.

Fields 

assignedTo 

  • Type: string
  • Required: No

assignedToType 

  • Type: AssignToLookupValueType (enumeration of type string)
  • Required: No

booleanFilter 

  • Type: string
  • Required: No
  • Description: Advanced filter conditions that were specified for the rule.

businessHours 

  • Type: string
  • Required: No

businessHoursSource 

  • Type: BusinessHoursSourceType (enumeration of type string)
  • Required: No

criteriaItems 

  • Type: FilterItem[]
  • Required: No
  • Description: The items in the list that define the assignment criteria.

disableEscalationWhenModified 

  • Type: boolean
  • Required: No

escalationAction 

escalationStartTime 

  • Type: EscalationStartTimeType (enumeration of type string)
  • Required: No

formula 

  • Type: string

  • Required: No

  • Description: The validation formula.

    Specify either formula or criteriaItems, but not both fields.

notifyCcRecipients 

  • Type: boolean
  • Required: No

overrideExistingTeams 

  • Type: boolean
  • Required: No

replyToEmail 

  • Type: string
  • Required: No
  • Description: The email address that appears in the reply-to header.

senderEmail 

  • Type: string
  • Required: No
  • Description: The email address of the person or queue sending the email notification.

senderName 

  • Type: string
  • Required: No
  • Description: The name of the person or queue sending the email notification.

team 

  • Type: string[]
  • Required: No

template 

  • Type: string

  • Required: No

  • Description: Specifies the template to use for the email that is automatically sent to the designated recipient.

    Lightning email templates aren’t packageable. We recommend using a Classic email template.

Declarative Metadata Sample Definition 

The following is an example AutoResponseRules component:

1<AutoResponseRules xmlns="http://soap.sforce.com/2006/04/metadata">
2    <autoResponseRule>
3        <fullName>ajbdeploytest2</fullName>
4        <active>false</active>
5        <ruleEntry>
6            <criteriaItems>
7                <field>Case.Description</field>
8                <operation>contains</operation>
9                <value>testing</value>
10            </criteriaItems>
11            <senderEmail>test@test.org</senderEmail>
12            <senderName>tester name j</senderName>
13            <replyToEmail>test@@test.org</replyToEmail>
14            <template>emailtemplate</template>
15        </ruleEntry>
16    </autoResponseRule>
17</AutoResponseRules>

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.