salesforce-reliability-patterns

Featured

Implement Salesforce reliability patterns including circuit breakers, idempotent upserts, and fallback caching. Use when building fault-tolerant Salesforce integrations, implementing retry strategies, or adding resilience to production Salesforce services. Trigger with phrases like "salesforce reliability", "salesforce circuit breaker", "salesforce idempotent", "salesforce resilience", "salesforce fallback", "salesforce retry".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Salesforce Reliability Patterns ## Overview Production-grade reliability patterns for Salesforce integrations: circuit breakers for API outages, idempotent operations using External IDs, graceful degradation with cached data, and dead letter queues for failed operations. ## Prerequisites - jsforce connection configured - Understanding of Salesforce error codes (see `salesforce-common-errors`) - Redis or database for state management (optional) - opossum or similar circuit breaker library ## Instructions ### Step 1: Circuit Breaker for Salesforce API ```typescript import CircuitBreaker from 'opossum'; import { getConnection } from './salesforce/connection'; // Circuit breaker wraps all Salesforce calls const sfBreaker = new CircuitBreaker( async (fn: () => Promise<any>) => fn(), { timeout: 30000, // SF calls can be slow — 30s timeout errorThresholdPercentage: 50, // Open circuit at 50% error rate resetTimeout: 60000, // Try again after 1 minute volumeThreshold: 10, // Need 10 calls before evaluating errorFilter: (error: any) => { // Don't count client errors as circuit-breaking failures const nonCircuitErrors = ['INVALID_FIELD', 'MALFORMED_QUERY', 'REQUIRED_FIELD_MISSING']; return nonCircuitErrors.includes(error.errorCode); }, } ); sfBreaker.on('open', () => { console.error('CIRCUIT OPEN: Salesforce API failing — requests will fail fast'); // Alert ops team }); sfBreaker.on('halfO...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category