Limits & Performance
Understand governor limits and optimize performance.
Salesforce Governor Limits
These are Salesforce platform limits that affect your integration:
API Callout Limits
| Limit | Value | Impact |
|---|---|---|
| Max callouts per transaction | 100 | Synchronous API calls are limited |
| Max HTTP request size | 6 MB | Large payloads will fail |
| Callout timeout | 60 seconds | Long-running APIs will timeout |
| Max queueable jobs per day | 250,000 | High-volume integrations limited |
Queueable Job Limits
| Limit | Value | Impact |
|---|---|---|
| Batch size | 98 | Large data loads split into batches |
| Max chaining depth | 5 | Deep async chains are limited |
| Per-transaction limit | 1 | One job per transaction |
RDN Integration Performance
Processing Strategy
The integration uses asynchronous Queueable jobs to:
✅ Avoid synchronous limits - Not limited to 100 callouts per transaction ✅ Better performance - Doesn't block user UI ✅ Automatic retries - Failed jobs can be retried ✅ Scalability - Can process unlimited records per day
Batch Processing
Large record sets are automatically split into batches:
100 records to process
↓
Split into batches of 98
↓
Batch 1: Records 1-98 (queued)
Batch 2: Records 99-100 (queued)
↓
Each batch processed async
Processing Time
Typical processing times per record:
| Scenario | Time | Notes |
|---|---|---|
| Basic enrichment | 2-3 seconds | Single API call |
| Multiple APIs | 5-8 seconds | Sequential calls |
| Complex mapping | 8-10 seconds | Field transformations |
| Slow API | 30+ seconds | API latency dependent |
Optimization Tips
1. Reduce Field Mappings
Before (Slow):
Mapping 15 fields to API
Processing time: 8 seconds per record
After (Fast):
Mapping 5 essential fields only
Processing time: 3 seconds per record
65% improvement
2. Use Selective Field Updates
Only update fields that changed:
// Instead of updating all fields
// Only update fields from API response
if (apiResponse.containsKey('job_role')) {
record.Job_Role__c = apiResponse.get('job_role');
}
3. Schedule Bulk Operations
Don't process 1000+ records simultaneously:
// ❌ BAD - Processes all at once
Lead[] leads = [SELECT Id FROM Lead WHERE Created_Today__c = true];
for (Lead l : leads) {
RDNAPIUtils.callAPI(l);
}
// ✅ GOOD - Schedule over time
// Run batch job at 2 AM
// Process 1000 records per batch
// Spread across hours
4. Monitor API Response Time
Track RDN API performance:
Time API calls and compare:
Fast API response: <2 seconds
Slow API response: >5 seconds
If consistently slow:
1. Contact RDN support
2. Check your network
3. Consider timeout increases
RDN API Limits
Rate Limiting
RDN APIs have rate limits per your plan:
| Plan | Calls/Hour | Calls/Day |
|---|---|---|
| Starter | 1,000 | 10,000 |
| Professional | 10,000 | 100,000 |
| Enterprise | Unlimited | Unlimited |
Check Your Current Usage
- Log in to RDN dashboard
- Go to Settings → API Usage
- View current quota and usage
- Request increase if needed
Handling Rate Limits
If you receive "Rate Limited" errors (429):
1. Check current usage in RDN dashboard
2. Identify which APIs are heavy users
3. Reduce frequency of API calls if possible
4. Wait for quota reset (typically hourly)
5. Request quota increase from RDN
Monitoring Performance
Key Metrics
Track these metrics to identify issues:
| Metric | Target | Frequency |
|---|---|---|
| Success rate | >99% | Daily |
| Avg processing time | <10 seconds | Daily |
| API response time | <5 seconds | Daily |
| Error rate | <1% | Daily |
| API usage | <80% of quota | Weekly |
Create Dashboard
Build a Salesforce dashboard to track:
1. Records processed today
2. Success/error rate (%)
3. Average processing time
4. API calls made (vs quota)
5. Errors in last 24 hours
Set Up Alerts
Alert when metrics exceed thresholds:
Alert if:
- Error rate > 5% (1 hour)
- Processing time > 30 seconds (avg)
- API usage > 90% of quota
- Failed records > 100 (daily)
Performance Tuning
Before Going Live
-
Test with realistic data volume
- Process 500+ records
- Measure processing time
- Monitor API quotas
-
Run stress tests
- Create 1000 records simultaneously
- Monitor system performance
- Check for timeouts
-
Optimize field mappings
- Remove unnecessary fields
- Test with minimum viable data
- Measure improvement
After Going Live
-
Monitor daily metrics
- Review success rate
- Check processing times
- Monitor API usage
-
Weekly reviews
- Check error logs
- Identify patterns
- Optimize if needed
-
Monthly optimization
- Analyze 4-week trend
- Identify slow APIs
- Request quota increases
Common Performance Issues
Issue: Slow Processing (>30 seconds per record)
Potential Causes:
- RDN API is slow
- Your network is slow
- Too many fields being processed
- Validation rules causing delays
Fix:
1. Check RDN API status page
2. Test API response time directly
3. Reduce field count in mapping
4. Disable non-essential validation rules
5. Contact RDN support if persistent
Issue: High Error Rate (>5%)
Potential Causes:
- Rate limiting from RDN
- Invalid field mappings
- Validation rule rejecting updates
- Insufficient permissions
Fix:
1. Review error logs
2. Verify field mappings
3. Check validation rules
4. Verify field-level security
5. Reduce batch frequency
Issue: Hitting API Quota Too Quickly
Potential Causes:
- Unnecessary field updates
- Triggers firing for non-essential changes
- Large batch jobs running frequently
- Integration running unnecessarily
Fix:
1. Reduce field mappings
2. Implement smarter change detection
3. Schedule batch jobs during off-peak
4. Request quota increase
5. Consider API call optimization
Load Testing Procedure
1. Create Test Data
Create 500 test records with:
- Job Title = Sales Manager
- Country = USA
- Email = test+[number]@example.com
2. Trigger Bulk Update
Update all 500 records:
- Change Job Title to Account Executive
- Monitor logs
- Measure processing time
3. Monitor Performance
Track:
- Total processing time
- API calls per record
- Success/error rate
- Peak memory usage
4. Analyze Results
Expected:
- All 500 processed in <1 hour
- Success rate >99%
- Processing time 3-10 seconds per record
- Error rate <1%
Best Practices Summary
| Practice | Benefit |
|---|---|
| Monitor metrics daily | Catch issues early |
| Reduce field mappings | Faster processing |
| Schedule bulk jobs | Avoid peak load |
| Test before production | Prevent issues |
| Track API usage | Stay within quota |
| Optimize periodically | Continuous improvement |
Next Steps
- Security & Compliance - Security best practices
- Support & Escalation - How to get help