function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bakasanbakasan 

Triggered email for lead assignment rule

Hi,

I'm trying to build out web to lead like functionality without using the actual web to lead process but am running into some difficulty. (We'd considered web to lead, after some inspection, we weren't happy with certain privacy issues and the ability to filter web to lead submissions from a specific URL or domain).

More specifically, I can't seem to get emails on my lead assignment rules to fire.  High level, we have 3 core requirements:

1) create lead (check)
2) assign lead to proper queue based on lead source (check)
3) shoot out email to the queue's email address (no go)

After some research, we'd learned that we had to specify our WSDL binding's assignment rule header and email headers.  We're apparently using the assignment rule header correctly as we're properly seeing our assignment rule fire and attach the newly created lead to the proper queue.  We're apparently doing something wrong w/ our email header OR we've got our lead assignment rule set up wrong (simply specified an email template, queue is set w/ an email address but not marked to email members of the queue).

Snippet of code on our proxy to Salesforce below:

                    //assignment rule header
                    _binding.AssignmentRuleHeaderValue = new AssignmentRuleHeader();
                    _binding.AssignmentRuleHeaderValue.useDefaultRule = true;

                    //email header
                    _binding.EmailHeaderValue = new EmailHeader();
                    _binding.EmailHeaderValue.triggerAutoResponseEmail = true;


The official API docs are a bit sparse on the EmailHeader object (comes in at basically a paragraph) and none of the searches on the dev forums about the header seem to quite match what I'm trying to do.  For example I'm not sure I truly understand the delineation between an Auto Response Email, Other Email or User Email when it pertains to the Email Header.

Any one have any pointers that might be able to nudge me in the right direction?

Message Edited by bakasan on 07-25-2007 12:15 PM

Message Edited by bakasan on 07-25-2007 12:16 PM

SuperfellSuperfell
You need to set the EmailHeader to trigger a user email, not an auto-response email.
_binding.EmailHeaderValue.triggerUserEmail = true;
bakasanbakasan
Hmm,

I'd feared that triggerUserEmail() would email the members of the queue and not the queue's email itself.  Or does it do both?

Just trying to get a good grasp of how things work to supplement the details in the API doc.
SuperfellSuperfell
Whatever it does if you create a lead that triggers the same rule in the UI. I think it only sends email to the queue's email address, but you'd have to try it to be sure.
bakasanbakasan
Cool, that did the trick.

Thanks!