I am using web-to-case, where the user submits the application form and it creates a case in my org.(When the case gets created in my org, I have set an workflow rule which sends an auto response mail to user's mail from let's suppose abc@test.com)

Now if the user replies to that auto response, it will go to the inbox of abc@test.com

Now whatever reply user is sending to abc@test.com, it needs to be tracked in activity history of the case generated through web-to-case functionality in the beginning.

Can someone please help me achieve this as I am new to Salesforce.

Thanks in Advance!!


There is no way for Salesforce to know what is sent to or sent from abc@test.com.

Email-to-case creates an email address that SF has access to. When emails are sent to this address SFDC processes them, attempts to find existing cases and creates a new case if needed. You can develop custom handler to process the emails and add extra features.

In your case you could also develop a trigger on the Email Message object (which is were the emails are stored) that can parse the email and update the case as well. This is a slightly simpler solution to a custom handler but will provide far fewer features.

  • Thanks for the response gNerb, Can you please provide more insights on how this trigger can be built ? – Chinmai Nuthikattu Aug 28 '18 at 10:25
  • You'd have to enable email-to-case for the trigger idea to work. And unfortunately it's against the sites policy to answer "do it for me" type questions. If you use the documentation I provided and take a shot at developing a solution you can open a new question to ask for help on those specific issues. – gNerb Aug 28 '18 at 16:07

This is pretty old now, but putting this idea for people that may have the same issue.

Salesforce does not allow to track opens in Email-to-Case functionality. With this said, there are still things you can do in order to make it happen.

All those things will require coding.

My Approach

Every email is tracked with the usage of a pixel. If you open an email sent from Opportunity object as an example, you will see something like this:

<!DOCTYPE html><html><style>p{margin-top:0px; margin-bottom:0px;}</style><body bgcolor="#FFFFFF" marginwidth="2" marginheight="2" style="font-family:Arial;font-size:10pt;color:000000"><html><body>This is a BODY</body></html><br><br><img src="https://YOUR-ORG-INSTANCE.salesforce.com/servlet/servlet.ImageServer?oid=ORGID&esid=EMAILSTATUSID&from=int"></body></html>

**Of course that the email has to be HTML email, not just TEXT.

The important part for tracking the email is the img tag. When the user opens the email in his inbox, lets say Gmail, Gmail recognizes that there is an image and makes a GET Request to get it. But actually that src url is not an image, it is a servlet that will update the EmailStatus related to the Email Message.

So, why not to build something like this on your own to make it happen? You will need to:

  1. Modify the EmailMessage trigger so that you add an image tag that has the url that you want
  2. Create an endpoint on your org that will do the trick

If you want to know more about this approach, please refer to this link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.