
Introduction
Have you ever faced a situation where your sales team accidentally worked on a sanctioned account? Or maybe they didn’t notice that a customer account was on credit hold or any other criterea.
These problems happen because Salesforce doesn’t show important warnings on record pages by default. Yes, the information is there in the fields, but users often miss it.
In this article, I’ll show you how to build a configurable notification banner system that displays alerts on any record page. The best part? No code changes needed to create new alerts!

What Problems Does This Solution Solve?
Let me share some real situations where this solution helps:
Problem 1: Users Miss Critical Information
The Situation: Your Account has a field called IsSanctioned__c set to true. But your sales rep doesn’t notice it because they’re focused on the Opportunity.
The Risk: The rep might quote a deal or send a proposal to a sanctioned entity — a serious compliance violation.
Our Solution: A bright red banner appears at the bottom of the page saying “This account is under sanctions. Contact Compliance Team before proceeding.”
The above scenario is just an example there can be other scenario where you need to show the notification message.
Problem 2: Child Records Don’t Show Parent Warnings
The Situation: You’re viewing a Contact or Opportunity, but you don’t see that the parent Account is on credit hold.
The Risk: Users make decisions without knowing the full picture.
Our Solution: When you enable “Show On Children”, the notification automatically appears on all related records — Contacts, Opportunities, Cases, and more.
Problem 3: Creating Alerts Requires Developers
The Situation: The business team wants to add a new warning for high-value opportunities over $1 million.
The Traditional Way: Create a ticket, wait for developer, write LWC code, test, deploy. This takes days or weeks.
Our Solution: An admin creates a new Custom Metadata record in 2 minutes. No code. No deployment. Instant alert.
Problem 4: No Standard Way to Show Temporary Announcements
The Situation: There’s a system maintenance scheduled for next week. You want to warn everyone, but only for 3 days.
Our Solution: Set a Start Date and End Date on your notification rule. The alert automatically appears and disappears on schedule.
How the Solution Works
The AlertFlow system has three main parts:
1. Custom Metadata Types (Configuration)
We use two Custom Metadata Types to store all the configuration:
- Notification Rule — Defines WHAT message to show and WHEN to show it
- Object Config — Defines parent-child relationships between objects

2. Apex Service Layer
The <strong>NotificationService</strong> class does the heavy lifting:
- Fetches active rules
- Evaluates conditions (field equals value, greater than, contains, etc.)
- Handles hierarchical lookups (Account → Contact)
- Processes merge fields like
{!Account.Name}
3. Lightning Web Component
The <strong>notificationBanner</strong> component:
- Lives in the Utility Bar
- Injects banners into the page DOM
- Supports SLDS icons
- Allows users to dismiss notifications
Features at a Glance
| Feature Description |
| 🔔 Configurable Rules | Create alerts using point-and-click configuration |
| 🏗️ Hierarchical Notifications | Parent alerts show on child records automatically |
| 🎨 Severity-Based Styling | Error (red), Warning (orange), Info (blue), Success (green) |
| 🔗 Action Links | Add “Learn More” or policy URLs to notifications |
| ⏰ Date-Based Scheduling | Set start and end dates for temporary alerts |
| ❌ Dismissible | Users can close notifications for the current session |
| 📝 Merge Fields | Dynamic messages using {!Account.Name} syntax |
| 🎯 Record-Specific | Target a specific record ID instead of field conditions |
Install the Package
Installing AlertFlow takes less than 5 minutes.
Step 1: Click Install Link
Production/Developer Edition:
https://login.salesforce.com/packaging/installPackage.apexp?p0=04tJ4000000Pce6
Sandbox:
https://test.salesforce.com/packaging/installPackage.apexp?p0=04tJ4000000Pce6
Step 2: Select Install Options
- Choose Install for All Users (recommended)
- Click Install
- Wait for the confirmation email
Step 3: Add to Utility Bar
- Go to Setup → App Manager
- Edit your Lightning App (e.g., Sales)
- Click Utility Items (Desktop Only) on the left
- Click Add Utility Item → Select Notification Banner
- Set Panel Height = 1
- Check ✅ Start automatically
- Click Save


That’s it! The component is now active.
Result
Org-Wide Notification

Sanctioned Account Scenario

Related child record (Opportunity)

Configuration Guide
Understanding Notification Types
| Type When to Use Example |
| Hierarchical | Show on parent AND child records | Sanctioned Account alert on Account, Contact, Opportunity |
| Record_Condition | Show only on matching records | High-value Opportunity alert when Amount > $1M |
| Org_Wide | Show everywhere | System maintenance announcement |
Creating Your First Rule
Let’s create an alert for sanctioned accounts.
- Go to Setup → Custom Metadata Types
- Click Notification Rule → Manage Records
- Click New
- Fill in:
| Field Value |
| Label | Sanctioned Account Alert |
| Message Title | ⚠️ Sanctioned Account |
| Message Body | {!Account.Name} is under sanctions. Contact Compliance Team. |
| Severity | Error |
| Icon | utility:ban |
| Notification Type | Hierarchical |
| Target Object | Account |
| Condition Field | IsSanctioned__c |
| Condition Operator | Equals |
| Condition Value | true |
| Show On Children | ✅ |
| Dismissible | ✅ |
| Active | ✅ |
- Click Save

Testing Your Rule
- Open an Account record where
IsSanctioned__c = true - You should see a red banner at the bottom of the page
- Open a related Contact — the same banner should appear!
Advanced Configuration
Targeting a Specific Record
Sometimes you want to show an alert for just one specific account — not based on a field value.
Use the Target Record ID field:
| Field Value |
| Target Record ID | 001xx00001234ABC |
| Condition Field | (leave blank) |
Now the notification shows only for that one account.
Using Merge Fields
Make your messages dynamic using merge field syntax:
| Syntax What It Shows |
{!Account.Name} | The Account’s Name |
{!Account.Owner.Name} | The Account Owner’s Name |
{!Opportunity.Amount} | The Opportunity Amount |
Example Message:
{!Account.Name} has been flagged for review. Contact {!Account.Owner.Name} for details.
Adding Action Links
Add a URL that users can click:
| Field Value |
| Link URL | https://company.sharepoint.com/policies/sanctions |
| Link Label | View Policy |
This adds a clickable “View Policy” link to your notification.
Using SLDS Icons
The Icon field accepts Salesforce Lightning Design System icon names.
Format: category:name
Popular icons:
utility:warning— Warning triangleutility:error— Error/stop signutility:info— Information circleutility:ban— Prohibited/bannedutility:priority— Priority flagaction:announcement— Announcement
Browse all icons at: Lightning Design System Icons
Object Configuration
For hierarchical notifications to work on child objects, you need Object Config records.
Pre-Configured Objects
The package includes these configurations:
| Object Parent Object Lookup Field |
| Contact | Account | AccountId |
| Opportunity | Account | AccountId |
| Case | Account | AccountId |
| Lead | (none) | (none) |
Adding a Custom Object
If you have a custom object related to Account:
- Go to Custom Metadata Types → Notification Object Config → Manage Records
- Click New
- Fill in:
| Field Value |
| Label | Custom Object Name |
| Object API Name | CustomObject__c |
| Is Parent Object | (unchecked) |
| Parent Object API Name | Account |
| Parent Lookup Field | Account__c |
| Is Active | ✅ |
Now Account notifications will appear on your custom object records!
Custom Metadata Field Reference
Notification Rule Fields
| Field Type Description |
| Message_Title__c | Text (255) | Banner title. Supports merge fields. |
| Message_Body__c | Long Text | Banner message. Supports merge fields. |
| Severity__c | Picklist | Info, Warning, Error, Success |
| Icon__c | Text (50) | SLDS icon name (e.g., utility:warning) |
| Notification_Type__c | Picklist | Org_Wide, Record_Condition, Hierarchical |
| Target_Object__c | Text (80) | Object API name (e.g., Account) |
| Target_Record_Id__c | Text (18) | Specific record ID (optional) |
| Condition_Field__c | Text (80) | Field to evaluate |
| Condition_Operator__c | Picklist | Equals, Not_Equals, Contains, etc. |
| Condition_Value__c | Text (255) | Value to compare |
| Show_On_Children__c | Checkbox | Show on related child records |
| Link_URL__c | URL | Action link URL |
| Link_Label__c | Text (80) | Action link text |
| Priority__c | Number | Display order (lower = higher) |
| Dismissible__c | Checkbox | Allow users to dismiss |
| Start_Date__c | DateTime | When rule becomes active |
| End_Date__c | DateTime | When rule expires |
| Active__c | Checkbox | Enable/disable rule |
Object Config Fields
| Field Type Description |
| Object_API_Name__c | Text (80) | Object API name |
| Is_Parent_Object__c | Checkbox | Is this a parent object? |
| Parent_Object_API_Name__c | Text (80) | Parent object API name |
| Parent_Lookup_Field__c | Text (80) | Lookup field to parent |
| Is_Active__c | Checkbox | Enable/disable config |
Troubleshooting
Notification Not Showing?
| Check This How to Fix |
| Active = false | Enable the rule by checking Active__c |
| Start/End Date | Make sure current date is within range |
| Condition doesn’t match | Verify the field value matches |
| Utility Bar not set up | Add component to Utility Bar and enable “Start automatically” |
Icon Not Displaying?
Use the SLDS format: utility:warning (not emoji like ⚠️)
Browse valid icons at: lightningdesignsystem.com/icons
Not Showing on Child Records?
- Check Show On Children is enabled on the rule
- Check Object Config exists for the child object
- Verify the lookup field is correct
Conclusion
The AlertFlow notification system gives you a powerful, flexible way to display contextual alerts in Salesforce — without writing code for each new scenario.
Key Benefits:
- ⚡ Create new alerts in minutes using Custom Metadata
- 🔒 Improve compliance by ensuring users see critical warnings
- 📊 Admins control everything — no developer required
- 🎨 Beautiful SLDS-styled banners that match Salesforce UI
Install Now:
🚀 Get AlertFlow on GumroadAbout the Author
This package was built by Arun Kumar to help Salesforce teams improve their user experience and compliance workflows.
Have questions? Leave a comment below or reach out on LinkedIn / Twitter.
Did you find this article helpful? Share it with your Salesforce community!
