In any fast-moving sales environment, it’s crucial to spot high-value deals early. Sales managers, operations teams, and executive stakeholders all need real-time visibility into which Opportunities are most promising—and which ones deserve immediate follow-up. But relying on users to manually flag those Opportunities can lead to inconsistency and missed chances.
That’s where automation comes in.
In this blog, you’ll learn how to use a before-insert Apex trigger to automatically update the Description
field on an Opportunity if the Amount
exceeds 100,000, tagging it as a “Hot Opportunity.” This simple yet effective logic gives your team an instant indicator of which deals are worth prioritizing—without relying on reps to take action manually.
🧠 Why Tagging Hot Opportunities Makes Sense
Salesforce is built to track deals across various stages, values, and owners—but unless your team has a clear way to identify high-stakes deals, it’s easy for top Opportunities to get buried in long lists. By automating the identification of “hot” Opportunities based on value, you:
-
Enable managers to focus on high-potential deals
-
Prompt faster internal collaboration and resource allocation
-
Improve pipeline visibility and forecasting accuracy
-
Ensure consistent tagging without relying on manual updates
This is especially valuable in high-volume sales orgs where reps are juggling dozens of Opportunities, and leadership needs at-a-glance insights to act fast.
🔍 What You’ll Learn in This Blog
-
How to build a before insert Apex trigger to update fields based on conditions
-
The value of tagging records dynamically to improve team response
-
How to use simple business logic to improve sales prioritization
-
How to create clean, modular Apex code using a trigger handler class
-
How to enhance your Opportunity tracking without user intervention
-
Why this pattern is scalable and adaptable across any industry or sales model
This automation is ideal for companies that want to highlight key deals in real time, improve communication between reps and managers, and enhance the overall visibility of important sales records.
🎯 Use Cases Where This Pattern Shines
-
Enterprise Sales where deal size varies significantly and top deals require urgent attention
-
Inside Sales teams that use dashboards or list views to track priority Opportunities
-
Sales Ops teams building workflows that kick off based on deal size
-
Startups and SMBs wanting to keep large deals from slipping through the cracks
-
Service-based businesses where large deals trigger resource planning or special pricing approvals
This approach also aligns well with any existing Salesforce customization you already have, like custom fields, approval processes, or notifications—because you can use the updated Description
value as a trigger point for further automation.
👨💻 Developer & Admin Tips
You can make the “Hot Opportunity” value configurable by storing it in a Custom Metadata Type or Custom Setting, allowing sales ops teams to change the threshold without updating code.
Also consider using this logic in combination with:
-
Email alerts to managers
-
Task creation for reps
-
Custom dashboard filters for “Hot” deals
-
Notification banners on record pages using Dynamic Forms
Always ensure the trigger is bulk-safe and respects governor limits—especially if your org processes large Opportunity imports or integrations.
🎥 Visual Learner? Watch the Trigger in Action
To help you bring this logic to life, we’ve included a YouTube playlist with hands-on implementation demos. You’ll see how the trigger works in a real Salesforce org, how to test it, and how to expand it for even more automation.
Solution:
trigger OpportunityTrigger on Opportunity (before insert) {
if(Trigger.isInsert){
if(Trigger.isBefore){
OpportunityTriggerHandler.updateDesc(Trigger.New);
}
}
}
public class OpportunityTriggerHandler {
public static void updateDesc(List<Opportunity> oppList){ for(Opportunity
opp:oppList){ if(opp.Amount!=null
&& opp.Amount>100000){ opp.Description=’Hot Opportunity’;
}
}
}
}