I am using the databasedotcom gem to generate Salesforce Leads on our web app.
The issue I am having is when the Lead is created in this way, the Assignment Rule fires correctly and assigns the Lead to the desired users, however, no email is sent to the assigned user.
I have found a comment by Salesforce on this issue here.
When a Lead or Case is created via the API, the API call would need to include:
"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.
I was wondering if there is any way to set the AssignmentRulesHeader and/or the EmailHeader via the databasedotcom gem or using the REST api in Rails.