You need to sign in to do that
Don't have an account?
Dan Dodd 3
Replace the "From" of Email-to-Case in the Case so it gets attached to the correct Contact
Hi,
I am using a third party software that collects my Issue reports from the original party (OP) and emails them to Salesforce Email-to-Case.
It uses the OPs email address as the "FROM" address and Salesforce uses that email to connect it to the Contact. I get good matching when the Contact exists.
The problem comes in is that we should use our email NOT the OP's email as the "From" when sending email.
Now when we send the email we need to replace the "From" of Email-to-Case in the Case so it gets attached to the correct Contact.
I can put the "from" email anywhere in the body and was thinking of putting it at the start of the body:
Will this work with the the Email-To Case flow?
I am using a third party software that collects my Issue reports from the original party (OP) and emails them to Salesforce Email-to-Case.
It uses the OPs email address as the "FROM" address and Salesforce uses that email to connect it to the Contact. I get good matching when the Contact exists.
The problem comes in is that we should use our email NOT the OP's email as the "From" when sending email.
Now when we send the email we need to replace the "From" of Email-to-Case in the Case so it gets attached to the correct Contact.
I can put the "from" email anywhere in the body and was thinking of putting it at the start of the body:
'Email: ' + email + ' EndEmail'so I could use the string operator:
fromEmail = str1.substringBetween('Email: ' , ' EndEmail');and put it in the Case from field in a before insert trigger.
Will this work with the the Email-To Case flow?
Here is the Trigger: