1

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.

tagCincy
  • 1,589
  • 10
  • 20

1 Answers1

0

According to these links:

Lead assignment is always on for REST API calls and you can't set them.

If an assignment doesn't trigger, be sure to check if your default assignment rule is active.

Marc Seeger
  • 2,717
  • 4
  • 28
  • 32
  • The funny thing is the Assignment Rule DOES trigger. The Lead ownership does changed correctly based on the record type. The issue is that the email that should be sent out as part of that rule does not occur. – tagCincy Mar 21 '13 at 14:12