14 July 2016

Re-Open a closed case when an email is received

Re-Open a closed case when an email is received


Knowledge Article Number000220076
DescriptionSometimes a case is closed, and then the customer replies with new information or a new issue. The email gets attached to the original case, however, since the case is closed, there's no notification that the customer is waiting on a response. We'll show you how you can use a simple workflow rule/field update to reopen such cases.
Resolution
  1. Go to Setup.
  2. Under "App Setup" or "Build" click Create | Workflow & Approvals | then Workflow Rules. 
  3. Click New Rule
  4. Select Email Message as the Object the workflow rule applies to.
  5. Click Next
  6. Enter a name for the workflow rule and select when it should be evaluated. 
  7. Enter the following criteria to enable the workflow rule to fire when an email is inbound and the case is closed: 
  • Email Message: Is Incoming' equals 'True.
  • Case: Closed equals True.
  • Please note that you can add more to the rule, but these are the only steps truly required
        5. Click Save & Next.
        6. Click Add Workflow Action.
       
 7. Enter a name for the Field Update and then set the Status case field to update.
        8. Select the value you would like the re-opened case to be set to, and then Save (please note, you might want to add a new Case Status value for "Case Reopened", to signify when one is reopened via email - you'll need to have that value created before you can select it.) 
                     9. Activate the rule, and you should be able to make it working. 

Putting this in now. 

Added the Case REOPENED item too.  Needed to update list views to add reopened cases to them. 

This gets me half-way there. 
If the customer emails back to an open or closed case we want the case to go back through the Assignment rules. (in case rep is out of the office or something)

came across this
I'll admit.  I have no idea what this code means but I've created an email Trigger (setup - email - triggers) and pasted the code in there. 
Posting the trigger here just to get it out there. 

trigger EmailMessage on EmailMessage (after insert) {
    List<Case> casesToAssign = new List<Case>();
    AssignmentRule ar = [SELECT Id FROM AssignmentRule WHERE SObjectType = 'Case' AND Active = true LIMIT 1];
    Database.DMLOptions dmlOpts = new Database.DMLOptions();
    dmlOpts.AssignmentRuleHeader.AssignmentRuleId = ar.Id;
    for(EmailMessage e : Trigger.new) {
        if(e.Incoming) {
            Case c = new Case(Id = e.ParentId);
            c.setOptions(dmlOpts);
            casesToAssign.add(c);
        }
    }
    update casesToAssign;
}

Created by frontendloader



When I was speaking with one of the support reps a few months ago, they were showing me what they did with emails from customers.  The rep who was going to handle a particular email notified the rest of the team that she was taking that email.   So, in order to eliminate this ambiguous case assignment I'm enabling Omni-Channel routing with the ability to push cases to reps.

No comments:

Post a Comment