[SalesForce] Email-To-Case – Set Field Values based on the support email address

Need help with this.

Example:

We have several support email addresses. A case is created when a customer sends us an email to one of those email addresses. We are using only one case record type. When a case is created from Email-to-Case, we want to set a product family value based on what email address it is.

If the email address is supportApple@company.com, set the product family value to "Apple."

If the email address is supportOrange@company.com, set theproduct family value to "Orange."

How do I do this with a Case Trigger or Apex?

Thank you!!

Best Answer

You can do this with clicks instead of code. You can do a workflow eule based on the email message object on create where the "To Address" = your email2case address. enter image description here

Then have your action be a field update for the product family field.

You can also do a process, again based on the Email Messaged object on create to fire when the created date for the case = NOW() enter image description here

enter image description here

Related Topic