- SalesforceChaCha
- Posts
- 💃 Built to Bounce Back 🕺
💃 Built to Bounce Back 🕺
Fail gracefully, not catastrophically
Good morning, Salesforce Nerds! Picture this: it’s a Monday morning, you roll out a release, and suddenly a key integration misfires, or an Apex trigger deadlocks, or data corruption sneaks in.
In a brittle system, that’s full outage or broken business flows. 😭
In a resilient system, things degrade a bit, short-circuit, heal, or recover. With minimal user pain. 🤗
For Salesforce professionals, “resiliency” isn’t just a buzzword. It’s the safety net every org should be equiped with.
In this article we’ll demystify what system resilience means, peel back its core components, show how it applies in the Salesforce world, and give you practical tactics.
Let’s get it. 💪

TABLE OF CONTENTS
💃 Built to Bounce Back 🕺
BOUNCE, SURVIVE, RECOVER
WHAT IS SYSTEM RESILIENCY?
At its heart ❤️, resilience is the capacity of a system to withstand stress (toughness) and recover or adapt (elasticity).
A resilient system doesn’t promise you no failures. ❌
It assumes components break, and designs so the system can isolate failure, degrade gracefully, and self-heal or failover. 🧠
Key properties:
Fault isolation / containment – if one piece fails, it doesn’t bring down everything.
Redundancy / failover – alternate paths or retries exist.
Graceful degradation – noncritical features may degrade before critical ones.
Recovery / rollback capability – ability to restore state or fallback.
Observability + feedback – you detect issues early before full failure.
In cloud-native systems, we often talk about “chaos engineering,” “circuit breakers,” “bulkheads,” “retry with backoff,” etc.
Same principles apply. 🎯
Salesforce solutions must be designed with those ideas in mind, albeit constrained by the platform’s limits. 🙁
YOUR RESILIENCE TOOLKIT
CORE COMPONENTS OF RESILIENCY
Here are the architectural layers and components that make a resilient Salesforce org:
Lifecycle & Deployment Controls
Application Lifecycle Management (ALM): a strong CI/CD pipeline (triggered tests, immutable packaging, version control) reduces risk by catching regressions before they hit production. 💯
Release gating & feature toggles: release new behavior under toggles so if something goes wrong you can switch it off without dropping changes.
Fault Isolation & Loose Coupling
Event-driven patterns & message buses (Platform Events, Change Data Capture, Pub/Sub API) help decouple systems so failures don’t ripple. 🧩
Bulkheads / module boundaries: isolate units - e.g. keep critical flows separate from analytics or batch jobs so a flood in one doesn’t choke the other.
Redundancy & Failover
Retry + backoff logic in integration calls (use resilient HTTP clients, exponential backoff).
Fallback logic: if a downstream system is unavailable, you can queue work or degrade to cached data. 🤔
Alternative paths: multiple integration endpoints, queued jobs as fallback, circuit breaker patterns.
Data Resilience & Backup
Use Backup & Recover, automated backups, anomaly alerts, and ability to restore subsets (fields, objects).
Archive / offload infrequently used data so your working set is lean (performance + easier recovery). 🏎️
For high-value flows, consider continuous data protection (near-real-time capture of deltas).
Monitoring, Alerts & Instrumentation
Instrument key metrics: latencies, error rates, queue depths, retry counts.
Set SLIs / SLOs / error budgets so you know when you're approaching failure boundaries.
Define alerts 🚨 that escalate automatically (e.g., via PagerDuty), plus dashboards for ops.
Incident Response & Recovery Processes
A documented Incident Response Plan (IRP): roles, steps, communication, escalation. 👈️
Postmortems / RCA (Root-Cause Analysis): learn from failures to harden the system.
Continuity planning / runbooks: scripts, fallback modes, manual interventions.
These components work in concert: the architecture gives you redundancy and isolation, your operations give you detection and control, and your process gives you reaction and learning loops. 😋
FROM FRAGILITY TO SAFETY NET
HOW RESILIENCY IMPACTS A SALESFORCE ORG
Let me paint a few use-case examples where resilience makes (or breaks) a Salesforce project. 👇️
Example 1: Integration to External System
Say you integrate Salesforce with an ERP. The ERP endpoint goes down. A resilient design will:
Use a retry mechanism with backoff
Queue the request in a durable medium (Platform Event or message queue)
Later replay once the endpoint recovers
Instrument and alert on growing queue backlogs
Without resilience, you’d see failed transactions, data loss, or worse … processes that silently go wrong. 👎️
Example 2: Trigger Logic Cascade
You have a heavy trigger chain (Account → Contact → Order → Opportunity). If Contact update fails, it might block downstream logic. In a resilient setup:
You isolate atomic units (bulkheads) so failure in downstream logic doesn’t block upstream.
Use try/catch, compensating transactions, or deferred work via Queueables or Platform Events.
Optionally, use transaction fences or “sagas” to coordinate rollback logic.
Example 3: Metadata / Data Corruption, Bad Release
You push a release with a bug 🪲 that corrupts data. Because you have backup & recover, and strong ALM, you can:
Immediately roll back the release (feature toggles help)
Restore affected records/fields
Use anonymized sandbox testing to ensure fixes before replay
Learn from the incident via postmortem, adapt test cases, improve coverage.
A well-architected Salesforce instance is not one that never fails, but one that doesn’t catastrophically fail. 🤩
It protects the core business flows and recovers swiftly from edge-case failures.
SHOW ME THE CODE
CODE + ARCHITECTURE SNIPPET
Here’s a toy pattern to show how you might build some resiliency in Apex:
public class ResilientOrderProcessor {
public static void process(List<Id> orderIds) {
for (Id oid :orderIds) {
try {
// Try the main logic
processOrder(oid);
} catch (Exception ex) {
// Log error, enqueue retry via Platform Event
OrderRetry__e ev = new OrderRetry__e(
OrderId__c = oid,
ErrorMsg__c = ex.getMessage()
);
Database.saveResult sr = EventBus.publish(ev);
}
}
}
private static void processOrder(Id oid) {
// complex logic, external callouts, updates, etc.
// throw exception if something fails
}
}
Simple, huh? 👍️
Next, an event subscriber listens to OrderRetry__e
, consumes, retries a few times, and if still failing, escalates or flags for manual intervention.
This gives you durable retry, isolation of failures, and the ability to monitor retry metrics.
On the architecture side, you’d place this logic behind a feature toggle, so you can disable it in a pinch if something goes sideways. 💨
BUILD SYSTEMS, NOT CASTLES
RESILIENCE AS A MINDSET
Resiliency isn't “add-on insurance”. It’s a design principle. 🏗️
A resilient Salesforce org assumes failure and plans around it: isolating faults, instrumenting deeply, executing robust recovery, and evolving after incidents.
When built right, it protects your business from small glitches spiraling into outages. ✨
As you plan your next release, take a few minutes to ask:
What happens if this API call fails?
Can I queue the work, retry, or fallback?
What metrics will alert me early?
Do I have restore / rollback plans?
Did I isolate risky logic so failures don’t spread?
By weaving resilience into every layer (deployment, logic, data, operations) you craft a Salesforce architecture that doesn’t just “work,” but thrives under pressure. 💪
SOUL FOOD
Today’s Principle
"I can be changed by what happens to me. But I refuse to be reduced by it."
and now....Salesforce Memes

s


What did you think about today's newsletter? |