Loading

Auto-Response Rules Do Not Fire for Cases or Leads Created via API — How to Enable triggerAutoResponseEmail

Fecha de publicación: May 21, 2026
Descripción

When Cases or Leads are created in Salesforce using a custom API integration (such as a custom web-to-case or web-to-lead implementation), the configured auto-response email rule does not trigger automatically. The Case or Lead record is created successfully, but the auto-response email is not sent to the person who submitted it — even when the Auto-Response Rule is active and correctly configured.

This is a common issue for organizations that have replaced the standard Salesforce Web-to-Case or Web-to-Lead form submission with a custom API-based integration. The standard Web-to-Case and Web-to-Lead forms automatically trigger auto-response rules. Custom API calls do not trigger them by default.

Example Scenario
Your organization has an auto-response rule that sends a confirmation email to all new case submitters. Cases are being created via a custom API integration connected to your company's website. Even though the rule is enabled and the submitter's email is populated on the Case, no confirmation email is sent. The auto-response rule never fires.

Solución

Why Auto-Response Rules Do Not Fire with API-Created Records

When Salesforce records are created via the API, auto-response email rules are not triggered by default. This is controlled by the triggerAutoResponseEmail field in the API request's EmailHeader. By default, this field is set to false for API calls, which is why auto-responses do not fire even when rules are configured and active.

How to Enable Auto-Response Rules for API-Created Cases and Leads

To enable auto-response emails when creating Cases or Leads via the Salesforce API, set the triggerAutoResponseEmail field to true in the EmailHeader of your API call.

  • For SOAP API integrations: Set triggerAutoResponseEmail = true in the EmailHeader of the API request.
  • For Apex-based integrations: Set triggerAutoResponseEmail = true in the DmlOptions EmailHeader when performing the DML insert operation.

Once this field is set to true, Salesforce evaluates the active auto-response rules for the created record and sends the appropriate email to the submitter, exactly as it would for a Web-to-Case or Web-to-Lead form submission.

Número del artículo de conocimiento

000385323

 
Cargando
Salesforce Help | Article