You need to sign in to do that
Don't have an account?
Case email auto-response
I have
an auto response rule set up when a case is opened in salesforce. We
are generating these through the API but it doesn't seem to work. It
also doesnt work when adding a case through the salesforce UI. I added
a debug log and it appears to be running the rule and sending the email
but nothing actually happens:
*** Beginning Workflow Evaluation
User: ******* support
Start Time: 20090720104959.261
Starting All Rules Evaluation
Starting evaluation of rule type Assignment
Starting evaluation of rule type Response
[Case: #SL0609-000111 50020000006fnVH]
Rule Name: Ticket Responder
Evaluating Workflow Entry Criteria:
Rule entry order: 1
[Case : Status equals Opened]
Value found: Opened
Criteria evaluates to true
Spooling All Immediate Actions
[Case: #SL0609-000111 50020000006fnVH]
Response notify: ******* support, Email: support@******.com
Template: 00X200000016TbS
Ending All Rules Evaluation
Bulk Execute all Immediate Actions
Starting evaluation of rule type Workflow
Starting evaluation of rule type Escalation
End Time: 20090720104959.323
*** Ending Workflow Evaluation
Is there a setting that I have missed that will allow this to work? I haven't had any error messages for this (and yes, I edited the error message with asterisks for data security reasons).
If I remember correctly from the last time I went down this path, the debug log will show as if it send the auto-response, even when it didn't.
I ran into this issue recently myself. I was trying to create a Case from within an Apex trigger and have an auto-response rule send out an email. I saw the same behavior, in that the debug log seemed to indicate that all was well (my rule evaluated to true, and it correctly resolved the email template for the auto-response email), yet no emails were sent. I found a posting that suggested turning on the EmailHeader for auto response rules: http://community.salesforce.com/sforce/board/message?board.id=general_development&message.id=18250. So, in my trigger, I added this code:
Database.DMLOptions opts = new Database.DMLOptions(); opts.EmailHeader.triggerAutoResponseEmail = true; Case checkInCase = new Case(); checkInCase.OwnerId = u.Id; checkInCase.ContactId = primaryContact.Id; checkInCase.AccountId = opp.AccountId;
.
.
.
insert checkInCase;
This did the trick for me. Now my Case is generating the auto-response email I'm expecting. Hope this saves someone some time.
Oops! I forgot an important line in my code snippet (the line that sets the DMLOptions!):
Database.DMLOptions opts = new Database.DMLOptions(); opts.EmailHeader.triggerAutoResponseEmail = true; Case checkInCase = new Case(); checkInCase.OwnerId = u.Id; checkInCase.ContactId = primaryContact.Id; . . . checkInCase.setOptions(opts); insert checkInCase;