9

I feel defeated asking this but I am stumped.....

Ok so I am trying to figure out how to route or in any way affect the Lead Assignment notification when the lead is created by the LAM (License Management App). I have been unsuccessful is stoping the emails or sending them to a specific user or queue.

The emails seem to be the default lead assignment notification

Lead: xx xx, The xx of Companies has been assigned to you.

To view the details of this lead in salesforce.com click on the following link: https://xyz.my.salesforce.com/xxxxxxx

The email address that these email are being sent to is [email protected]

Known facts:

  1. Only one auto response rule with 13 steps is active.
  2. ALL steps have the Email template blank
  3. The leads in question only match the the last step which assigns it to the owner who DOES NOT have the email receiving the notification. The original owner of the lead and the newly assigned owner of the lead (due to the rule) are NOT the [email protected] email
  4. The Default Lead owner is NOT [email protected]
  5. Basically there is no path that I can see where an email is sent to [email protected]
  6. There is no email template in the org that sends an email as outlined above

At first I thought it was because the LMA was not setting the DMLOptions Header and thus assignment rules were being followed but I have ruled that out because there is no path that it can end up going to the email address it is going to.

There is no instance of the [email protected] in the code nor any instance of the OWD Email Address Name or ID in any code within the org.

Can anyone tell me how the Default Lead Assignment Notification is being sent when a lead is created by the LMA (License Management App). More importantly, how does one turn it off or specify where the email goes???

Testing Update

  • I just did a test by changing the assignment rule to send to me.
  • The lead came in and the [email protected] got the email and the owner was the queue. (it should not have been if the assignment rules were used)
  • I clicked edit on the lead then checked the assign using assignment rules. It was assigned to me and I got the email.

I also update the default owner on the web to lead to be me with the same results

Think that proves that the assignment and email is being done by the LMA somehow and not the assignment rules.

Update 8-28-2017

Found this: https://help.salesforce.com/articleView?id=000188074&type=1

Looks like there is not much that can be done RE the assignment but still not sure if that means I am SOL for the notification email as well but I believe it may indicate that

9
  • Can you have an active TraceFlag to capture the debug log when the lead is created? Aug 23, 2017 at 20:43
  • @DanielBallinger - unfortunately I do not think so. The lead is being inserted from the License Management App User (created by) and there are no users of that name to attach a trace to.
    – Eric
    Aug 23, 2017 at 23:19
  • I'll ask around to see if I can find any more clues. I assume any similar leads that you create manually don't trigger the same lead assignment notification email? Aug 23, 2017 at 23:43
  • @DanielBallinger - Correct. I changed every recipient email address I could find in Assignment rules, Default rules, etc to a different email address and they kept coming to the [email protected] email address. I had no email in the system anywhere that I could find that had that address so I am stumped. We need the emails to stop or be able to actually route them to a different email address as we have a lot of clients that refresh sandbox daily and weekly and it is email overload.....It also appears that the Assignment rules do not process with these leads prior to the emails going out.
    – Eric
    Aug 23, 2017 at 23:46
  • 1
    @DanielBallinger - I saw this "When you set up the LMA, you designate a lead manager in your org to receive the new leads" in the guide. Any ideas how to check it and possibly changes it. - Never mind, I see it is set on the packages but it is not set to a user with the email addresses receiving the email in my case
    – Eric
    Aug 24, 2017 at 5:21

2 Answers 2

0

After you login to your Salesforce instance, navigate to Setup and in local search text area. You should search for web-to-lead and check the web-to-lead setting by which you can figure out how default the LMA trigger the notifications to the set contact.

1
  • Unfortunately that is not the case. I modified that web-to-lead notification queue and the emails from the LMA still went to the [email protected] email address. I modified all Assignment rules to also goto a different email just to test and all LMA Lead Assignment notification emails went to [email protected].
    – Eric
    Aug 22, 2017 at 14:55
0

I have ran into issues with Lead Assignment like this before, and I have found the best way to diagnose is by modifying assignmentRuleHeader in after insert. This allows you to always view/edit the email because triggers run before assignment.

Try

trigger LeadTrigger on Lead (after insert) {

List<Lead> ls = new List<Lead>();

for (Lead l : Trigger.new) {
    ls.add(new Lead(id = l.id));
}

Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.assignmentRuleID = <your id>;
//or could try setting dmo.assignmentRuleHeader.useDefaultRule=false;
Database.update(ls, dmo);
}
4
  • So you end up with an insert and an update with different DMLOptions. What happens to the insert transaction? Do the assignment options simply get ignored and the update trumps it? Or does whatever happens on insert still happen? Also, none of our assignment rule are set to send an email and we have no template that looks like the email received so I am not sure if this will help. I do not think this will help in this case because the emails seem to be sent on an update right after insert anyway, not on insert. but I will keep the thought in mind
    – Eric
    Aug 24, 2017 at 15:42
  • Just like any other trigger, the update runs within the insert context, but both trigger contexts finish before assignment rules. I understand that none of your logic sends emails. My diagnostic would identify if the LMA is setting them as a default in code. Aug 24, 2017 at 15:46
  • So to test this if I add the logic and the email does not come to [email protected] then it proves the LMA is sending it?
    – Eric
    Aug 24, 2017 at 15:48
  • I just did a test by changing the assignment rule to send to me. The lead came in and the [email protected] got the email and the owner was the queue. I clicked edit on the lead then check the assign using assignment rules. It was assigned to me and I got the email. Think that proves that the assignment is being done by the LMA somehow and not the assignment rules.
    – Eric
    Aug 24, 2017 at 16:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .