The problem
When a customer gets in touch with an issue, the first thing your service department do is view the account record to check the SLA.
The SLA information is right down the bottom of the page so users are asking for a quicker way to identify VIP customers, in this case, those with a platinum SLA.
Since this information is only relevant to the service department, it would be even more useful if it was only displayed for users with a Service profile.
Prerequisites
1. Create a picklist field:
- Type = Picklist
- Field Label = SLA
- Picklist values:
- Bronze
- Silver
- Gold
- Platinum
- Select ‘Restrict picklist to the values defined in the value set’
- Visible to all profiles
- Add to the account page layout
2. Upload an image that you want to use to visually display your VIP customers – check out the resources section at the bottom for the image I’ve used!
You can upload and save your image as a static resource, a document in Classic or a file in Lightning. Copy and put aside your image location. Not sure how? Check out this guide on how to identify your image location (you’ll need this info later).
The solution
We can achieve this using an object specific quick action that displays a visual aid, added to a component on the Lightning record page. We’ll then set our component attributes so it displays conditionally based on the SLA and the user viewing the record.
Sound complicated? It isn’t.
- Make sure you’ve completed the prerequisites above!
- Navigate to Setup > Object Manager > {Object Name} > Fields & Relationships
- Click ‘New’
- Create a formula field
- Data Type = Formula
- Field Label = VIP
- Formula Return Type = Text
- Enter a description and help text
- Enter the following formula but replace the image location (in red below) with your unique location (hint – check the prerequisites section for where to find it!)
IF(
ISPICKVAL( SLA__c , "Platinum"),
IMAGE("/servlet/servlet.FileDownload?file=0151o000005dxfW", "VIP"),
"")
- Your field should look something like this:
- Click ‘Save’
- On the next page make the field visible to all profiles
- On the following page do not add to the page layout!
- Once your new field is created, navigate to Setup > Object Manager > {Object Name} > Buttons, Links, and Actions > New Action
- Choose action type ‘Update a Record’, give it a name, a description and save
- Remove any fields you do not want to display (don’t worry about the record name i.e. Account Name having a red asterix)
- Add the VIP field, then save
- A warning message will appear – select ‘Yes’

- Navigate to your Lightning record page (Setup > Object Manager > {Object Name} > Lightning Record Pages) and select ‘Edit’
- From the list of components (left) drag and drop a Related Record component somewhere highly visible on the canvas
- Select the component by clicking on it and set the component attributes:
- Header Label = VIP Customer (or similar)
- Lookup Field = Use This Account
- Update Action = VIP Customer (select the quick action you just created)
- Scroll down to the bottom of the component attributes column and select ‘Add Filter’
- Field = SLA
- Operator = Equal
- Value = Platinum
- Click ‘Done’
- Click ‘Add Filter’ again
- Change the Filter Type to Advanced
- Field = User > Profile > Name
- Operator = Contains
- Value = Service
- Click ‘Done’
- Save, and if required, activate the page
- To test, you’ll want to login as a user with a service profile
The result
A shiny prompt your service users won’t be able to miss!
Gotchas & hints
*If you test this as yourself and you have the System Administrator profile, you won’t see the component! Login as a user with a service profile to test.
*You could use several images and extend the formula to display a different image for each SLA level!
Useful links
Salesforce Help – Create a Custom Picklist Field
Trailhead – Get Started with Picklists
Salesforce Help – Dynamic Lightning Pages
Knowledge Article – Use images in Formula Fields
Salesforce Ben – Use Images in Salesforce Formula Fields to Spice up Your Org
Shell Black – Using Image Formula Fields
Resources
Image:
Image formula field:
IF(
ISPICKVAL( SLA__c , "Platinum"),
IMAGE("/servlet/servlet.FileDownload?file=0151o000005dxfW", "VIP"),
"")
Replace “/servlet/servlet.FileDownload?file=0151o000005dxfW“ with the location of your image.
One thought on “Highlight your VIP customers based on SLA”