Auto-filling the "To" field and changing the default "From" email address - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Paul MPaul M 

Auto-filling the "To" field and changing the default "From" email address

The support team is using lightning view. The To field needs to be auto-populated with the customer's email address, and the From field should also auto-populate with our support address. Where do I make these changes?

User-added image

Paul MPaul M
I figured out the From address. I went to Object Manager, Case Action: Email and added a Predefined Field Value on the ValidatedFromAddress. There's another Predefined Field Value on the ToAddress where the value is Case.Contact Email, but this isn't working for some strange reason.
Erik SiewertErik Siewert
@Paul with Spring '18 something changed with our ToAddress default just reported to me by my business users. Now it sometimes works, but most of the time it is defaulting to Case Web Email (Case.SuppliedEmail) even though we have no reference of this in any rule. Not an answer to your question, but an agreement that it "isnt working for some strange reason". case.contact.email not working
Paul MPaul M

Looks like it could be a Lightning limitation, Erik.
https://success.salesforce.com/answers?id=9063A000000DnbCQAS

Erik SiewertErik Siewert
https://releasenotes.docs.salesforce.com/en-us/winter18/release-notes/rn_cases_predefined_ids.htm
Anna MikovariAnna Mikovari
Has anyone found out why the "ToAddress"= Case.ContactEmail wasn't working? I'm running into a similar issue now.  For me it's a little different.

A Case will be created via email-to-case and a Contact record is auto-associated to the Case (either by email matching or a new Contact record is created and associated).  At this point if I open the email action, the "To" will be populated by the sender of the email.  In this situation, the sender is both Case.suppliedemail AND Contact email so it's hard to tell which one it is really populating. 

The issue with my users is they almost always have to update the associated Contact record after the Case is created.  So, the email comes in, the Case is created, and the Contact is associated.  Then the user navigates to the Case and manually updates the Contact record (to someone other than the original email sender).  When they open the email action the "To" field is populated with the original sender's email (Case.suppliedemail or the original Contact email - again not sure which one it is pulling from).  It does NOT populate the CURRENT Contact email address. 

It would be great if we can get it to do this! 

Configuration:
  • "SendEmail" Action on Case Object and added to the Case Feed Publisher. Predefined value of "To Address" = Case.ContactEmail (Text)User-added image
  • I'm using Lightning Service Console
Dean Ezekiel SalazarDean Ezekiel Salazar
@Anna, I was having problems with cases that already has related Emails. I may be wrong, but I think you have the same problem as me... It turns out that the Predefined Field Values defined in an Action is only expected to populate on the first or initial email being sent. Try it with a new Case and you'll see that it is getting the correct value for To Address as defined in your Predefined Field Values.
I don't quite like this behavior as it is kind of misleading...

https://help.salesforce.com/articleView?id=000331325&type=1&language=en_US&mode=1 (https://help.salesforce.com/articleView?id=000331325&type=1&language=en_US&mode=1)
Says, "When using a Predefined setup in a custom Send Email action for the "To Recipient" the value is only expected to populate on initial email sent."