Tag Archives: Salesforce Development

Create a Salesforce Support Request Process For Your Users

Are you using emails to manage requests from your users? 

Dodge Emails

 

The problems with using email for issues & requests are many, such as:

  • Users favoriting certain Admins, causing uneven workload on the team
  • Emails getting buried & forgotten
  • Accidental deletion
  • If you’re in the habit of constantly checking email, it’s distracting
  • No prioritization
  • No reporting
  • Stressful for you: Some users are impatient.  Aside from too many emails marked as high importance, they’re following up too soon
  • Stressful for users:  They have no ability to confirm you got their request or make corrections to it.

Around 3 years ago we rolled out a Salesforce Support Case process to our users.  My work life drastically changed for the better that day.  Just in my team, we currently receive around 300 Cases per month.  I shudder at the thought of those being emails.

How my org uses Cases to manage support requests:

  1. User clicks “Salesforce Support Request” link on the home page.
  2. Some information is auto-filled, so they enter a few other fields & save
  3. The case is sent to a queue
  4. User receives email when case is opened & closed.
  5. A Dashboard is used to monitor these cases, much like a sales team would monitor open & closed Opportunities.

Here’s how to do it:

A Case record type, support process, and page layouts are created.

Regarding fields, your primary goal is speed.  Users should not to spend 5 minutes filling out fields. Here’s the fields we use:

Contact Name

This is the internal Contact, the user.  To make this work, create a process that creates a contact record for each Salesforce user.  The Contact would be related to their user profile via lookup field.

Region
This is auto-populated. If you’re in a global org, this will come in handy later)

Category & Sub-Category
Dependent picklists. Here’s just a couple examples.

  • Users
    • New User – Salesforce
    • User Permissions
  • Data Management
    • Mass Update/Create Records
    • Merge Records

Subject

Description

Status

  • Open
  • Need More Information
  • Resolved (Closed)
  • No Change Required (Closed)

Notes
For use on the close case layout.  This can be used on the email notification when the case is closed.

 

Give your users an easy way to create the Case:

  • Under Home, create a custom link.  This link can be added to it’s own component or existing. We have a Useful Links component, so we put it there.
  • The link will be OnClick Javascript.  Calm down and stay with me.  I’m going to show you how. 

First, you need this:

{!REQUIRESCRIT("/soap/ajax/23.0/connection.js")}
 {!REQUIRESCRIPT("/soap/ajax/23.0/apex.js")}

Remember how I told you to create a Contact for each of your users?  This code is going to find and populate it on the case automatically.

sforce.connection.getUserInfo().userId;
 var result = sforce.connection.query("Select Id, Name From Contact Where User__c = '{!$User.Id}'");
 var records = result.getArray("records");
 var ContactName = records[0].Name;
 var ContactID = records[0].Id;

Now you need to specify the Case record type, the region, and anything else.  In my org, we use a Region picklist on the user profile.  I can use that in my code to populate the Region field on the case.

Here’s how to use IF – ELSE based on user attributes.   IF – ELSE can be much more complex than this if you want, keeping it simple for this example:

if('{!User.Region__c}' == 'NA'){
window.open("/500/e?retURL=%2F500%2Fo&ent=Case&cas3="+ContactName+"&cas3_lkid="+ContactID+"&00N80000003E5yO=North America&RecordType=012800000003wSZ&cas7=Open","_top");
}else if('{!User.Region__c}' == 'EU'){
window.open("/500/e?retURL=%2F500%2Fo&ent=Case&cas3="+ContactName+"&cas3_lkid="+ContactID+"&00N80000003E5yO=Europe&RecordType=012800000003wSZ&cas7=Open","_top");

If for some reason, one of those attributes doesn’t apply to a user, you need to plan for that with an Alert at the end.

}else{
alert('Unable to create the Case.');
}

You may be wondering, great… but what is that “Window.Open” junk in the middle?   That’s where you specify the case record type & fields.

  • 500  – the Case Object Id
  • e  – edit mode
  • cas3 – the standard field ID for Contact Name
  • Cas3_lkid  – You need this for the Contact ID.  lkid is lookup ID
  • 00N80000003E5yO –  the custom field ID for Region
  • cas7 – the standard field ID for Status.

Queue, Case Assignment, & Email Notifications

Create case assignment rules to send requests to the appropriate queue.  Maybe you have different queues for region or category.

So your users know the case was received, you can create auto response or workflow rules for that.  Pro Tip: Within that email, you can include instructions for your users on how to grant log in access to company administrators.

When a Case is closed, an email should be sent to the Contact on the Case.  I like to include the Case Status & Notes field.

 

Sharing & Validation

If your Case object is Private, you’ll need a sharing rule to grant Read/Write access to the cases that are owned by the queue.  This is needed as your users may need to attach a file/screenshot or update the description.

It would be wise to create a validation rule that prevents a non System Admin from editing a support case once it’s been closed.  You don’t want them to reopen it or change the details of the request after it’s been carried out.

 

Bringing it all together with reports & dashboards

Now that you’re able to report on the requests you’ve received, you can create a dashboard to show a lot of different metrics, such as case volume by month, ranking of closed cases by owner, cases opened per region last month, cases opened by category year to date, etc…

 

 

 

Lightning Containers: Definitions & Environments You Can Use Them

Here’s a list of Lightning containers, what they are, and where you can use them.

  • Lightning Components – UI framework for developing dynamic web apps for mobile and desktop devices.
    • Environments:
      1. Lightning Experience
      2. Salesforce1 Mobile
      3. Mobile SDK Hybrid Apps
      4. Communities
      5. Standalone Lightning Apps
  • Lightning Component Tabs – Create a Tab to display a Lightning Component
    • Environments:
      1. Lightning Experience
      2. Salesforce1 Mobile
  • Lightning Components For Visualforce  Integrate Lightning components into Visualforce pages for a dynamic development experience.
    • Environments:
      1. Lightning Experience
      2. Salesforce1 Mobile
      3. Salesforce Classic
      4. Mobile SDK Hybrid Apps
      5. Communities
  • Lightning Apps – An App consisting of Lightning Components.
    • Environments:
      1. Lightning Experience
      2. Salesforce1 Mobile
      3. Mobile SDK Hybrid Apps
      4. External Sites
  • Lightning Out – Directly embed lightning components cross domain 
    • Environments:
      1. Mobile SDK Hybrid Apps
      2. External Sites
  • Lightning Extensions – A mechanism for using custom-built components to replace existing components in the Salesforce1 Mobile App.
    • Environments:
      1. Lightning Experience
      2. Salesforce1 Mobile

 

Lightning Containers and Environments Chart
Credit: Skip Sauls [@SkipSauls] Salesforce Director of Product Management – Lightning Components & Customizations Special thanks to Samantha Ready [@Samantha_Ready] for sharing on Twitter.

“What The Heck Does This Error Mean?” Simple Explanations of Common Errors

Apex Error

If you know how to troubleshoot a few common Apex errors, you can resolve issues faster.  Technical Architects and Developers will love you for not asking them as much.

Furthermore, If you can teach your users what some of the Apex and other common errors mean, they might be able to resolve something on their own without coming to you.  

Here are some phrases to look for.

 “Attempt to de-reference a null object”

  • Most often, this means that a record involved in the process is missing a key piece of data referenced in the code.

  • It could also mean the user who triggered this process doesn’t have access to a field, object, or record type.

 

“FIELD_CUSTOM_VALIDATION_EXCEPTION”

  • There is a validation rule preventing the record from being updated.

 

“System.LimitException: Too many query rows: 50001

  • You get this error when when Apex Code tries to query more than 50,000 records, which is the Salesforce limit for Apex.
  • Solution:  Try to use more filters in the search. A code update may also be needed

 

Other “Exceptions”

 

“Insufficient Privileges”  

  • The user doesn’t have access to edit or view a record.
  • Could also happen due to a lack of user permissions

 

“Insufficient access rights”  -or-  “Invalid access rights on cross reference ID”

  • Basically, this is the Data Loader version of Insufficient Privileges.

 

“ID value of incorrect record type”

  • Another Data Loader error, caused by a funky ID on your source file.
    • Check your ID’s, are they valid?
    • Could also be that you mapped a text column to the Salesforce ID column.

 

“Your account has been disabled”  (The dumbest error)

  • It happens on Approval Processes and has nothing to do with the user who received the error, but they’ll think it does and come to you quite concerned.

  • What it actually means is that one (or more) of the steps on an Approval Process contains an inactive user on the approver list.

 

Did I leave any out? Any other tips for troubleshooting errors?  Comment below.