AutoResponseRules is the object-level container for named auto-response rules on Lead or Case. These rules define conditions for sending automatic email responses to submissions based on the submitted record's attributes. The container's autoResponseRule array holds the individual rule definitions, each with its own name, activation setting, and entries.
Do not confuse the plural container type, AutoResponseRules, with the singular type, AutoResponseRule, used to select an individual named rule. Activation belongs to each named rule, not to the container. Auto-response rules control response conditions and email settings; the presence of assignment or escalation fields in the shared entry structure does not establish that these rules assign ownership or perform escalation actions.
Key Elements
Except for autoResponseRule itself, the elements below belong to a named rule or one of its ruleEntry entries.
| Element | What the Element Controls |
|---|---|
autoResponseRule |
The array of named auto-response rules for the object's container. |
fullName |
The named child rule's identity within the container. It is required when creating, updating, or deleting the rule and cannot be null. |
active |
Whether the named rule is active: true or false. A stored rule definition is not necessarily enabled. |
ruleEntry |
The named rule's collection of entries. Each entry combines response conditions with email settings. |
criteriaItems |
Field-based conditions for an entry. Each item contains a field, an operation, and a comparison value. Do not combine this collection with formula in the same entry. |
criteriaItems.field |
The field evaluated by a condition. It can reference a custom field; the documented example uses Case.Description. |
criteriaItems.operation |
The comparison operation. Exposed values are contains, equals, excludes, greaterOrEqual, greaterThan, includes, lessOrEqual, lessThan, notContain, notEqual, startsWith, and within. |
formula |
A formula expressing the entry's conditions. Use it instead of criteriaItems, not alongside that collection. |
booleanFilter |
Advanced filter logic for the entry's criteriaItems. |
template |
The EmailTemplate used for the automatic response. Lightning email templates are not packageable; Classic email templates are recommended for this use. |
senderEmail |
The sender email address for this entry's response. |
senderName |
The sender name for this entry's response. |
replyToEmail |
The address placed in the response's Reply-To header. |
notifyCcRecipients |
For incoming Email-to-Case messages, whether incoming CC recipients are included on the auto-response CC line: true includes them; false does not. |
Behavior and Constraints
Check activation on the named rule. The relevant setting is autoResponseRule.active. Retrieving or deploying a rule definition does not, by itself, mean that the rule is active.
Choose one condition format per entry. Use either formula or criteriaItems. When using field-based criteria, booleanFilter supplies advanced logic for those criteria. For example, an entry can test whether Case.Description contains a particular value; that example does not establish a default condition.
Email settings are entry-specific. Changing senderEmail, senderName, or replyToEmail on one entry does not change the other entries. A rule-wide sender change therefore requires updating every affected entry. The response template is also selected on each entry.
CC handling changes the response audience. For Email-to-Case, notifyCcRecipients determines whether addresses copied on the incoming message also receive a copy of the automatic response.
The exposed RuleEntry structure also includes assignment, case-team, business-hours, and escalation members, such as assignedTo, team, businessHours, and escalationAction. These shared members are not evidence that an auto-response rule assigns records or runs escalation actions.
Deployment and Retrieval
In Metadata API file format, object-level components use the .autoResponseRules suffix and reside in the autoResponseRules folder. For example, the Case container is autoResponseRules/Case.autoResponseRules.
The type name and member in package.xml, the manifest that selects metadata components, determine the selection scope:
-
All applicable objects: use type
AutoResponseRuleswith member*. The plural type supports this wildcard. -
All rules for one object: use type
AutoResponseRuleswith an object member such asCase. -
One named rule: use type
AutoResponseRulewith a member in the form<objectName>.<ruleName>, such asCase.samplerule. Multiple named members, such asCase.sampleruleandCase.newrule, can select specific rules.
An object-level selection and an individual-rule selection do not identify the same unit. Use the singular type and qualified rule name when the intended retrieval or change is limited to a named rule. Within the container XML, autoResponseRule.fullName identifies the child rule.
For a bulk sender-address change, retrieve the intended scope, update senderEmail on each affected ruleEntry, and deploy the updated metadata. Changing one entry does not propagate the address to the rest of the rule.
Each entry's template identifies its email template. Lightning email templates are not packageable, so Classic email templates are recommended for this use. Referenced custom fields and templates can affect response selection or content; dependency scope follows the references actually populated in the component.
Do not treat deletion of an object-level container as interchangeable with deletion of a named rule. A reported destructive-deployment rejection for the Lead container is described below. That report concerns AutoResponseRules for Lead, not deletion of an individual AutoResponseRule.
Relationships
The main response dependencies are fields used in conditions and the template used to compose the email. The shared entry structure exposes additional possible references, but these are not automatically dependencies of every container.
Name-based association: CustomObject is associated through the entire component file base, following <objectName>. For example, Case.autoResponseRules associates with the standard Case object. This is not an XML reference element. It does not imply that the object is custom, that an associated component exists in every org, or that the object must be deployed with the rules. The association alone establishes neither deployment order nor permission to delete either component.
References
-
CustomField:fieldwithincriteriaItems, and embedded field references withinformula. -
EmailTemplate:templatefor the response; the sharedescalationActionstructure also exposesassignedToTemplateandnotifyToTemplate. Those shared members are not automatically response-template dependencies. -
Group:assignedToin the shared entry structure. This possible schema connection does not establish an ownership-assignment action or a dependency in every auto-response rule.
Reported Issues
-
Deleting the Lead container can be rejected as deletion of a standard component. An org-cleanup answer, first posted in 2014 and updated in 2022, reports a destructive deployment rejecting
Lead.autoResponseRulesbecause theAutoResponseRulescontainer namedLeadis standard and cannot be deleted. This report does not establish the result of deleting an individual named rule. See the container-deletion report. - Bulk sender-address edits can be handled through metadata, according to a community answer. In a 2017 discussion about changing the sender email across more than 400 Case rule entries, the answer recommended metadata retrieval and deployment, with wildcard, object-level, or individual-rule manifest selection. See the bulk rule-entry update discussion.
Common Questions
What is the difference between AutoResponseRules and AutoResponseRule?
AutoResponseRules selects an object-level container, such as Case, or all applicable containers with *. AutoResponseRule selects a named child rule using a qualified member such as Case.samplerule.
Why is my deployed auto-response rule not active?
A rule definition can exist without being enabled. Check active on the named autoResponseRule; activation is not a container-level setting.
How do I change the sender email for all auto-response rule entries?
Retrieve the intended rules, update senderEmail on every affected ruleEntry, and deploy the updated metadata. Sender settings belong to individual entries, so changing one entry does not update the others.
Can I use both formula and criteriaItems in one rule entry?
No. Specify either formula or criteriaItems. Use booleanFilter for advanced logic when conditions are expressed through criteriaItems.
Why does deleting Lead AutoResponseRules fail?
A community report describes a destructive deployment rejecting the Lead object-level container because it is standard. Container deletion and deletion of an individual named AutoResponseRule are different operations; that report concerns only the container.