Salesforce Admin Hack Series: Case Object

November 5, 2013 Jarrod Kingston

jarrodA couple of weeks ago I was very fortunate to co-host another Salesforce Admin Hack webinar with the one and only Michael Farrington.  For this webinar we turned our focus to the Case object.  In case you missed it, the full recording of the webinar can be seen below. Before I share all the hacks with you, I should let you know that you can come see us live at Dreamforce 2013 for the Top 10 Salesforce Admin Hacks.  We’d love to meet you in person!  Now, without further adieu lets get to the Case hacks.

 

  1. Case Comment & Email Message Tracking Fields

    1. Shout out goes to Salesforce MVP Jason Paquette (@PaquetteJason)

    2. Hack Objective:  store important dates such as “First Comment Date” and “Last Comment Date”

    3. Hack Setup

      1. Custom DateTime Field: Last Comment Date

      2. Workflow Rule

        1. Object: Case Comment

        2. Evaluation Criteria: when a record is created

        3. Rule Criteria: “true”

      3. Workflow Field Update

        1. Field to Update: Last Comment Date

        2. Formula Value: “Now()”

  2. Neglect Flag

    1. Shout out goes to Salesforce MVP Amber Neil Boaz (@amber9904)

    2. Hack Objective:  an image field to flag cases that have set without a comment for too long.

    3. Hack Setup

      1. Custom Formula Field: Neglect

        1. Type: Text

        2. Formula: IMAGE( if(OR(Last_Comment__c < NOW()-2,ISNULL(Last_Comment__c)),”/img/samples/flag_red.gif”,if(Last_Comment__c < NOW()-1, “/img/samples/flag_yellow.gif”, “/s.gif”)),”Neglect Flag”)

  3. Send Email to Foreign Web Submitter

    1. Hack Objective:  case is submitted via Web-to-Case from person not in your Contacts, you want to send them email from within Salesforce.

    2. Hack Setup

      1. Link:  /_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&retURL=%2F{!Case.Id}&p2_lkid={!Case.ContactId}&p2_lktp=003&p24={!if(ISNULL(Case.ContactId),Case.SuppliedEmail,”)}

  4. Quick Email Links

    1. Shout out goes to Salesforce MVP Bill Greenhaw (@Bill_Greenhaw)

    2. Hack Objective:  give service agent ability to quickly send a commonly used email response to case contact.

    3. Hack Setup

      1. Link with one template: /_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&retURL=%2F{!Case.Id}&template_id=(TEMPLATE ID HERE)&p2_lkid={!Case.ContactId}&p2_lktp=003&p24={!if(ISNULL(Case.ContactId),Case.SuppliedEmail,”)}

      2. Dynamic link using picklist to choose template:  /_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&retURL=%2F{!Case.Id}&template_id={! CASE(PICKLIST FIELD HERE, “VALUE 1 HERE”, “TEMPLATE ID HERE”, “VALUE 2 HERE”, “TEMPLATE ID HERE”,””)}&p2_lkid={!Case.ContactId}&p2_lktp=003&p24={!if(ISNULL(Case.ContactId),Case.SuppliedEmail,”)}

  5. Case Re-Open Count

    1. Shout out goes to fellow Appirian Joshua Titus (@aviao008)

    2. Hack Objective:  track how many times a Case has been reopened by the customer.  Helps track service team efficiency.

    3. Hack Setup

    4. Custom Number Field: Re-Open Count (set default value to 0)

    5. Workflow Rule

      1. Object:  Case

      2. Evaluation Criteria:  Evaluate the rule when a record is created, and every time it’s edited

      3. Rule Criteria (formula):

AND(

OR(

ISPICKVAL(Status,”Working”),

ISPICKVAL(Status, “New”),

ISPICKVAL(Status, “Escalated”)),

PRIORVALUE(IsClosed)=True)

    1. Workflow Field Update

      1. Field to Update:  Re-Open Count

      2. Formula Value:  PRIORVALUE( Re_Open_Count__c ) +1

  1. Take Ownership Button

    1. Shout out goes to Salesforce MVP Jason Paquette (@PaquetteJason)

    2. Hack Objective:  give service agent easy way to take ownership of a Case.

    3. Hack Setup

    4. Simple button (for new orgs you need to contact salesforce support to have save behavior enabled)

      1. Display Type:  Detail Page Button

      2. Behavior:  Display in existing window without sidebar or header

      3. Button Code: /{!Case.Id}/a?retURL=%2F{!Case.Id}&newOwn_lkid={!$User.Id}&newOwn={!$User.FirstName} {!$User.LastName}&saveURL={!Case.Id}&save=1

    5. JavaScript Button

      1. Display Type:  Detail Page Button

      2. Behavior:  Execute JavaScript

      3. Button Code:

{!REQUIRESCRIPT(“/soap/ajax/13.0/connection.js”)}

var caseObj = new sforce.SObject(“Case”);

caseObj.Id = ‘{!Case.Id}’;

caseObj.OwnerId = ‘{!$User.Id}’;

var result = sforce.connection.update([caseObj]);

if (result[0].success==’false’) {

alert(result[0].errors.message);

} else {

location.reload(true);

}

  1. Validation to prevent users from taking other users cases

    1. Custom Formula Field (Text):  Ownership Type

      1. IF(LEFT(OwnerId, 3) = “005”, “User”, “Queue”)

    2. Validation Rule

AND(

ISCHANGED(OwnerId ),

PRIORVALUE(Ownership_Type__c) = “User”,

OR(OwnerId = $User.Id, CONTAINS($Profile.Name,”administrator”))

)

 

Previous Article
Salesforce Communities: There’s no place like /home/home…or is there?
Salesforce Communities: There’s no place like /home/home…or is there?

By Isaac Lehr  So you’ve set up  Salesforce Communities and you want to direct your external users to the a...

Next Article
How To Create a Custom Salesforce Communities Login and Landing Page
How To Create a Custom Salesforce Communities Login and Landing Page

By Bryan Leboff Intro to Salesforce Communities The new Salesforce communities feature offers many advantag...