Skip to main content

Limits & Performance

Understand governor limits and optimize performance.

Salesforce Governor Limits​

These are Salesforce platform limits that affect your integration:

API Callout Limits​

LimitValueImpact
Max callouts per transaction100Synchronous API calls are limited
Max HTTP request size6 MBLarge payloads will fail
Callout timeout60 secondsLong-running APIs will timeout
Max queueable jobs per day250,000High-volume integrations limited

Queueable Job Limits​

LimitValueImpact
Batch size98Large data loads split into batches
Max chaining depth5Deep async chains are limited
Per-transaction limit1One 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:

ScenarioTimeNotes
Basic enrichment2-3 secondsSingle API call
Multiple APIs5-8 secondsSequential calls
Complex mapping8-10 secondsField transformations
Slow API30+ secondsAPI 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:

PlanCalls/HourCalls/Day
Starter1,00010,000
Professional10,000100,000
EnterpriseUnlimitedUnlimited

Check Your Current Usage​

  1. Log in to RDN dashboard
  2. Go to Settings → API Usage
  3. View current quota and usage
  4. 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:

MetricTargetFrequency
Success rate>99%Daily
Avg processing time<10 secondsDaily
API response time<5 secondsDaily
Error rate<1%Daily
API usage<80% of quotaWeekly

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​

  1. Test with realistic data volume

    • Process 500+ records
    • Measure processing time
    • Monitor API quotas
  2. Run stress tests

    • Create 1000 records simultaneously
    • Monitor system performance
    • Check for timeouts
  3. Optimize field mappings

    • Remove unnecessary fields
    • Test with minimum viable data
    • Measure improvement

After Going Live​

  1. Monitor daily metrics

    • Review success rate
    • Check processing times
    • Monitor API usage
  2. Weekly reviews

    • Check error logs
    • Identify patterns
    • Optimize if needed
  3. 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 &lt;1 hour
- Success rate >99%
- Processing time 3-10 seconds per record
- Error rate &lt;1%

Best Practices Summary​

PracticeBenefit
Monitor metrics dailyCatch issues early
Reduce field mappingsFaster processing
Schedule bulk jobsAvoid peak load
Test before productionPrevent issues
Track API usageStay within quota
Optimize periodicallyContinuous improvement

Next Steps​