A high-throughput, fault-tolerant ingestion system built on Apex to process external data reliably at scale, with retry handling, duplicate-safe operations, and a real-time LWC monitoring dashboard.
This project simulates a production-grade integration pipeline where external systems push bulk data into Salesforce.
Instead of directly processing incoming requests, the system uses a staging-first architecture to ensure durability, controlled processing, and failure recovery.
Typical Salesforce integrations break under real-world conditions:
- No retry strategy → silent data loss
- Duplicate records due to missing idempotency
- Async limits (Queueable/Future) → dropped jobs
- No visibility into failures → hard to debug
This system introduces a decoupled ingestion pipeline with:
- Durable staging layer
- Controlled asynchronous processing
- Retry + failure handling
- UI-based monitoring and manual recovery
External Client
↓
Apex REST API (Validation + Ingestion)
↓
IntegrationStaging__c (Durable Store)
↓
Async Processing Engine (Queueable)
↓
Dynamic SObject Upsert (External ID)
↓
Retry Engine (Controlled Attempts)
↓
Dead Letter State (Final Failures)
↓
LWC Dashboard (Monitoring + Retry)
- Accepts bulk JSON payloads via REST API
- Validates structure and normalizes input
- Stores raw payload in staging for reliability
- Asynchronous job execution using Queueable Apex
- Groups records by object type for bulk operations
- Dynamically maps fields using Schema methods
- Performs upsert using External ID
- Automatic retry with attempt tracking
- Controlled retry limits to prevent infinite loops
- Failed records moved to Dead state after max retries
- Error logs stored with payload + stack trace
- Full traceability of failed operations
- UI dashboard for monitoring and manual intervention
- View ingestion jobs in real-time
- Filter by status (Pending, Processing, Completed, Failed, Dead)
- Retry failed jobs directly from UI
- Track retry count and processing state
[
{
"externalId": "123",
"Source": "Account",
"Name": "Test Account"
}
]- Apex (REST + Queueable)
- Lightning Web Components (LWC)
- Custom Objects (Staging, Logs)
- Dynamic Schema (SObject mapping)
- Staging-first ingestion → prevents data loss
- Idempotent processing → avoids duplicates
- Bulk-safe operations → handles high volume efficiently
- Decoupled architecture → improves reliability and scalability
- Operational visibility → enables debugging and control
- Designing resilient backend systems under failure conditions
- Handling async processing limits in Salesforce
- Building integration pipelines beyond CRUD-level development
- Combining backend processing with UI-based monitoring
- Event-driven processing using Platform Events
- Exponential backoff with jitter for retries
- Dashboard enhancements (error insights, metrics, charts)
- Configurable mapping via Custom Metadata
Robin Sharma Software Engineer | Backend & Integration Systems (Salesforce)