Loading

Assignment rules do not send notification emails for Leads or Cases created via API

Date de publication: May 1, 2026
Description

When a Lead or Case is created by the API, and Assignment Rules are triggered, the record assigns as expected but no assignment notification email is sent. This happens because assignment rules are not configured to send email notifications by default when initiated via the API.


Example scenario:
A customer uses a third-party integration to create Cases automatically via the Salesforce SOAP API. The integration triggers the correct Assignment Rule and routes each Case to the appropriate queue. However, the queue owners never receive notification emails about the newly assigned Cases. This is because the API call does not include the required EmailHeader to trigger email notification.

Résolution

For SOAP API: Including EmailHeader and AssignmentRuleHeader:

When a Lead or Case is created via the API, the API call must include both of the following headers to trigger assignment rules and send notification emails:

  •  "AssignmentRuleHeader" to trigger the Assignment Rules.
  •  "EmailHeader" with "triggerUserEmail" set to 'true' to generate assignment notification emails.

If AssignmentRuleHeader is specified, and EmailHeader is not specified, then the records will be assigned but no assignment notifications will be sent to the assigned record owners.

Note: This is only applicable to SOAP API as 'EmailHeader' which is required to be called is not applicable in REST API.

REST API Limitation:

The EmailHeader described above is only applicable to the SOAP API. When using REST API, the email notification is not supported. If you are using the REST API and require email notifications when a Case is assigned to a queue or user, consider using a Salesforce Flow or Apex trigger to send an email when case ownership changes to a specific queue or user.


Ressources supplémentaires

Please refer to the following topics in the API Developer Guide for further information:

Numéro d’article de la base de connaissances

000384839

 
Chargement
Salesforce Help | Article