Real-time Salesforce user status monitoring for Talabat support teams
Installation β’ Features β’ Usage β’ Documentation
The Salesforce Status Monitor is a sophisticated Chrome extension designed specifically for Talabat support team members. It provides real-time monitoring of Salesforce user status using advanced network analysis techniques, eliminating the need for unreliable DOM-based detection methods.
- π Real-time Status Detection - Network-based monitoring using Performance Observer API
- π Secure Authentication - @talabat.com email restriction with encrypted backend
- π Comprehensive Tracking - Status history and team analytics
- π Background Monitoring - Works across multiple Salesforce tabs automatically
- β‘ Performance Optimized - Minimal resource usage with efficient request filtering
- Network Request Analysis - Monitors XMLHttpRequest and Fetch API calls
- Performance Observer Integration - Real-time detection without DOM dependencies
- Multi-tab Support - Automatic monitoring across all Salesforce instances
- Status History Tracking - Complete audit trail of status changes
- Domain Restriction - Limited to @talabat.com email addresses
- Encrypted Communication - Secure HTTPS backend integration
- Password Protection - SHA-256 hashing with minimum security requirements
- Session Management - Persistent authentication across browser sessions
- Clean Popup Interface - Intuitive login and status display
- Real-time Updates - 5-second refresh intervals
- Active Tab Management - Visual display of monitored Salesforce tabs
- Status Indicators - Color-coded status display with timestamps
Automatically detects and categorizes these Salesforce statuses:
| Status ID | Description |
|---|---|
0N51r0000004CAy |
Online for Cases - Available for customer support |
0N51r0000004CB8 |
Short Break (personal) - Personal break time |
0N51r0000004CBI |
Training / QA / Meeting - Learning activities |
0N569000000oLnA |
One to One - Individual meetings |
0N51r0000004CBD |
Lunch/Dinner - Meal breaks |
0N51r000000CbLR |
Calls Only - Available for calls only |
0N51r0000004CBS |
Assigned Task - Non-SF - External tasks |
0N51r0000004CBN |
Assigned Task - Non-Omni - Non-Omni tasks |
0N569000000oLn9 |
Assigned Task - General task assignment |
- Google Chrome 88+ with Extensions enabled
- Access to Salesforce with valid credentials
- @talabat.com email address for authentication
# Clone the repository
git clone https://github.com/mohammed0taku/Salesforce-Status-Tracking-System.git
cd salesforce-status-monitor
# Or download and extract the ZIP file- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (top-right toggle)
- Click "Load unpacked" and select the extension folder
- Verify the extension appears in your toolbar
π§ Google Apps Script Setup
- Go to Google Apps Script
- Create a New Project
- Replace default code with contents from
backend_code.gs - Click Deploy β New deployment
- Set type: Web app
- Configure permissions:
- Execute as: Me
- Who has access: Anyone
- Copy the deployment URL
- Open
config.jsonin the extension folder - Replace
YOUR_GOOGLE_APPS_SCRIPT_URL_HEREwith your deployment URL:
{
"backendUrl": "https://script.google.com/macros/s/YOUR_SCRIPT_ID/exec",
"debug": false,
"refreshInterval": 5000
}- Reload the extension in Chrome
- Click the extension icon in your Chrome toolbar
- Register your account:
- Enter your @talabat.com email address
- Create a secure password (8+ characters)
- Click "Register"
- Login with your credentials
graph LR
A[Open Salesforce] --> B[Extension Auto-Detects]
B --> C[Status Monitoring Begins]
C --> D[Real-time Updates]
D --> E[View Status in Popup]
- Open Salesforce in any Chrome tab
- Extension automatically starts monitoring your status
- Status changes are detected via network requests
- View current status by clicking the extension icon
- Status history is automatically saved and synced
The popup interface provides:
- Current Status with color-coded indicators
- Last Update timestamp
- Active Salesforce Tabs list
- Auto-refresh countdown timer
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
β Content β β Background β β Google Apps β
β Script βββββΊβ Service βββββΊβ Script Backend β
β β β Worker β β β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
β Salesforce β β Chrome APIs β β Google Sheets β
β Network APIs β β (Storage/Tabs) β β Database β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
- π Content Script (
content_script.js) - Network monitoring and status detection - βοΈ Background Worker (
background.js) - Extension lifecycle and tab management - π₯οΈ Popup Interface (
popup/) - User interaction and status display - βοΈ Backend API (
backend_code.gs) - Authentication and data persistence
// Simplified detection flow
Performance Observer β Network Request β Status Analysis β Backend SyncThe extension monitors specific Salesforce API endpoints:
- Messages API (
Messages?ack=) - Active session detection - Presence API (
PresenceLogin,PresenceStatus) - Status ID extraction
salesforce-status-monitor/
βββ π manifest.json # Extension manifest
βββ π§ background.js # Background service worker
βββ π content_script.js # Main monitoring logic
βββ π popup/
β βββ π¨ popup.html # User interface
β βββ β‘ popup.js # Interface logic
βββ βοΈ config.json # Configuration
βββ βοΈ backend_code.gs # Google Apps Script
βββ πΌοΈ icons/ # Extension icons
βββ π README.md # Documentation
# Enable debug mode
# Set DEBUG = true in all JavaScript files
# Monitor console logs
# Background: chrome://extensions/ β Inspect views
# Content: F12 Developer Tools β Console
# Popup: Right-click extension icon β Inspect popupπ§ Extending Status Detection
- Update Status Mapping in
content_script.js:
const STATUS_MAPPING = {
'NEW_STATUS_ID': 'New Status Description',
// ... existing mappings
};- Add Detection Logic for new API endpoints
- Test with Salesforce status changes
- Update Documentation and status table
| Issue | Solution |
|---|---|
| π« Extension not loading | Check Chrome version (88+) and enable Developer mode |
| π Authentication failed | Verify @talabat.com email and backend URL configuration |
| π Status not detected | Refresh Salesforce page and check console for errors |
| π Network errors | Verify Google Apps Script deployment and CORS settings |
-
Check Extension Console:
- Go to
chrome://extensions/ - Find "Salesforce Status Monitor"
- Click "Inspect views: background page"
- Go to
-
Monitor Network Requests:
- Open Salesforce tab
- Press F12 β Network tab
- Look for
Messages?ack=andPresencerequests
-
Review Logs:
// All logs are prefixed with [SFF-*] [SFF-INFO] Status changed: Online for Cases [SFF-WARN] Network request timeout [SFF-ERROR] Authentication failed
- Memory: < 5MB average
- CPU: Minimal impact during monitoring
- Network: Passive request observation only
- Storage: < 1MB for status history
- Efficient request filtering
- Limited history retention (100 entries)
- Background script keep-alive system
- Minimal DOM interaction
- β No sensitive data storage in browser
- β Encrypted backend communication
- β Password hashing with SHA-256
- β Domain restriction enforcement
- β CORS protection on backend
- π Only status changes are recorded
- π« No personal browsing data collected
- β° Status history limited to work hours
- ποΈ Automatic cleanup of old data
# Fork the repository
git fork https://github.com/mohammed0taku/Salesforce-Status-Tracking-System
# Create feature branch
git checkout -b feature/new-status-detection
# Make changes and test thoroughly
# Commit with clear messages
git commit -m "feat: add new status detection for XYZ"
# Submit pull request with detailed description- ES6+ JavaScript syntax
- Meaningful variable names and comments
- Error handling for all async operations
- Debug logging with appropriate levels
- Security-first approach for all features
Built with β€οΈ