function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jcalfeejcalfee 

case tracking - cases are updated by non-salesforce users

We need to implement a simple case tracking system using Salesforce. The cases are updated by non-Salesforce users. There are several routes to accomplish this, however, in every case there is an important piece of the puzzle is missing.



In Setup - Case - Email-to-Case there is a column called "Email Services Address." You can send email to Salesforce using computer-assigned e-mail address in that column. So, instead of using the Email-to-Case agent to poll your own email accounts, you can send them directly to Salesforce now. This used in every scenario below.



For proper automation, there are to things to consider: routing and tracking



  1. Route the messages “from” Salesforce to the user will reply “to” Salesforce

  2. Track the case email and responses



When sending a new email from a case, Salesforce inserts a string that looks like [ ref:00DSDITt.500ShQ5G:ref ] in the subject and body. You can't see this, but this is the Case.Thread_Id value. It may not be documented but you can use this value in e-mail templates to provide tracking for responses. You can use this feature when sending emails other ways (from work flow for example. Just include the Case.Thread_Id in the e-mail template.



With the presents of the Thread_Id, all of the sudden, responses with this ID sent to email-to-case will get filed properly. You may have to look for the response though. Open the case, move down to activity history, click on the email, read the top where it says “Click here to view the associated Email Message”. With some basic training anyone can make this work.



Auto-Response (least complicated)

  1. Create an email template contain {!Case.Thread_Id}. In this case, is not added by default.

  2. Create a setup – case – auto-response rule setting the “from” with the Salesforce email address assigned in the email-to-case above. Assign the template you created above.

This almost solves both problems (routing and tracking). The problem is in the very beginning of the routing. The auto-response rule does not allow you to set the “To.” Only the user that created the case gets the email. There is no way to deliver the email to the intended recipients. The Case Support Settings are generic and will not solve the problem either. You can't simply forward the email either because the recipient will reply sending the message back to you and not the case.



Work-Flow (more steps)

In setup – create – work flow, setup the rule and email alert to send to an additional (up to 5) email address. Here you can use the Sandbox to put your own e-mail there. Again, use the e-mail template with the {!Case.Thread_Id} in it. Now the “To” can be set (forget about using CC until this is fixed except now “From” is a problem. The From is the case creator or even worse a no-reply address from Salesforce (see case support setting). This breaks the loop and email-to-case will not receive any replies.

Work flows are flexible, so Salesforce should add the ability to define CC and From fields here. That enhancement should give the biggest bang for the buck.

 

This is my post, it address the CC, BCC, and the From / Reply-To. Please comment and promote, but come back, I'm not through:

 

   http://ideas.salesforce.com/article/show/10092421 (new window)

APEX (even more steps)

The Sandbox allows the creation of a trigger. No need for external programs now to create and update the code ;-) ... This falls short in two way parts:

  1. You can only set reply-to, you can't set “from” .. Reply-to can be ignored by mail clients.

  2. Case.Thread_Id is not available

  3. Email templates tied to cases are not implemented

There is a nice editor now that allows you to create and update apex code without external programs. It is only available in the Sandbox. With this we can trigger and send an email in a new case trigger.

  1. You can set the reply-to but you can't set the from. It is still common that e-mail clients ignore the reply-to and sent the reply to the “from” address. This can break the loop at the worst possible time (when your not looking). I don't like this at all.

  2. Yes, we can set the TO – fantastic

  3. No, can not use a template with Case.Thread_Id because the required target object must be “Only Users, Contact or Lead allowed for targetObjectId”"

  4. Salesforce does not detect and replace the field in the message either:
    mail.setPlainTextBody('RxStrategies does not recognize this transaction. ' + '{!Case.Thread_Id}.');



AkaedingAkaeding

The only issue I am having with this is that when those non-salesforce users reply to the auto-response e-mail, that response is logged as a 'Task'...meaning you have to drill down to see the actual comment they made.  This also prevents that reponse from automatically being visible in the self-service portal.

 

Is there are way to direct those e-mail responses to add themselves as "Comments" to a case, rather than an activity?

Joe_IpsenJoe_Ipsen

Using standard configuration, I was unable to find any way to port emails into Case Comments.

 

Apex code can certainly do this and while researching this I found a third party AppExchange partner who has a package that does this among other things.  I have not implemented this solution myself, but I have reviewed their offering.

Email to Case Premium

http://sites.force.com/appexchange/listingDetail?listingId=a0N30000001R5cyEAC

hxnhxn

An alternative way to allow case updates by non-salesforce users is via hubcase, particular if you are dealing with a partner, vendor, provider using non-salesforce system.