Skip to main content

Testing & Validation

Verify your RDN integration setup is working correctly.

Pre-Testing Checklist​

Before running tests, confirm you have:

  • ✅ Installed the RDN package
  • ✅ Created RDN API Configuration metadata records
  • ✅ Created RDN API Input Field records
  • ✅ Created RDN API Provider with valid token
  • ✅ Created RDN Field Update records
  • ✅ Implemented triggers on Lead/Contact objects
  • ✅ Added remote site for RDN API endpoint
  • ✅ All metadata records marked as Active

Test Data Setup​

Sample Lead Record​

Create a test Lead with these fields:

First Name: Test
Last Name: Lead
Company: Acme Corp
Title: Sales Manager
Phone: (555) 123-4567
Email: testlead@example.com
Country: USA
Industry: Technology

Sample Contact Record​

Create a test Contact with these fields:

First Name: Test
Last Name: Contact
Email: testcontact@example.com
Phone: (555) 234-5678
Title: Product Manager
Mailing Country: United Kingdom
tip

Use different field values each time you test to avoid duplicate data clogging your org.

Test Execution​

Test 1: Basic Integration Flow​

Goal: Verify the complete integration workflow

Steps:

  1. Create Record - Create a new Lead with test data
  2. Wait for Processing - Wait 5-10 seconds for async job
  3. Check Trigger Execution - View debug logs to verify trigger fired
  4. Verify API Call - Confirm RDN API was called in logs
  5. Check Field Updates - Refresh the record and verify mapped fields populated

Expected Results:

  • Trigger executes without errors
  • Queueable job is enqueued
  • API call completes successfully
  • Fields are updated with API response data
  • No error emails received

Test 2: Change Detection​

Goal: Verify that only field changes trigger the integration

Steps:

  1. Create Record - Create a Lead without updating any fields afterward
  2. Update Field - Change the Title field to a different value
  3. Check Logs - Verify API was called
  4. Update Non-Monitored Field - Change email or phone
  5. Check Logs - Verify API was NOT called (no changes to monitored field)

Expected Results:

  • API call only triggered when monitored fields change
  • Non-monitored field changes don't trigger API
  • No unnecessary API calls made

Test 3: Error Handling​

Goal: Verify error handling and notifications

Steps:

  1. Disable Auth Token - Temporarily update API Provider with invalid token
  2. Create/Update Record - Trigger the integration
  3. Wait for Error - Allow API call to fail
  4. Check Logs - Verify error was logged
  5. Check Email - Verify error notification email received
  6. Re-enable Token - Update API Provider with correct token

Expected Results:

  • Error is captured and logged
  • Error notification email is sent
  • Integration can be re-enabled without restarting

Test 4: Batch Processing​

Goal: Verify batch job handling for large record sets

Steps:

  1. Create Multiple Records - Create 150+ leads in bulk
  2. Execute Batch Job - Trigger batch execution from RDN
  3. Monitor Progress - Check RDN logs for batch status
  4. Verify Results - Confirm all records processed
  5. Check Error Rate - Verify <1% error rate

Expected Results:

  • Records processed in batches of 98
  • All records successfully processed
  • Batch job completes without timeout

Validation Checklist​

After completing tests, verify:

  • ✅ New records trigger the integration automatically
  • ✅ Mapped fields are populated with API response data
  • ✅ Error notifications are sent when issues occur
  • ✅ Processing time is acceptable (<10 seconds per record)
  • ✅ API call limits are not exceeded
  • ✅ Debug logs show expected flow

Performance Validation​

Measurement Points​

MetricTargetAction if Exceeded
Processing Time (per record)<10 secondsCheck API latency
Success Rate>99%Review error logs
API Response Time<5 secondsContact RDN support
Error Rate<1%Check field mappings

How to Measure​

  1. Create a test record and note timestamp
  2. Monitor Salesforce debug logs
  3. Note when API call completes
  4. Calculate elapsed time
  5. Record in a tracking spreadsheet

Moving to Production​

Pre-Production Checklist​

  • ✅ All tests passed in Sandbox
  • ✅ Error handling verified
  • ✅ Performance acceptable
  • ✅ Stakeholders aware of changes
  • ✅ Monitoring/alerting configured
  • ✅ Runbook prepared for ops team

Production Deployment​

  1. Clone Configuration - Copy metadata from Sandbox to Production
  2. Deploy Triggers - Deploy trigger code via Change Set
  3. Verify Setup - Confirm all metadata and triggers are active
  4. Run Smoke Tests - Create 1-2 test records in production
  5. Monitor Logs - Watch logs for first hour
  6. Notify Teams - Inform stakeholders of successful deployment

Production Validation​

After deploying to production:

  1. Create Test Record - Create a test Lead/Contact
  2. Verify Processing - Confirm API call succeeded
  3. Check Fields - Verify field population
  4. Monitor 24 Hours - Watch for issues
  5. Sign Off - Confirm successful production deployment

Troubleshooting During Tests​

Issue: Trigger Not Firing​

Check:

  1. Is trigger deployed and active? (Setup → Apex Triggers)
  2. Is the trigger on the correct object?
  3. Are you in After Insert/After Update events?

Issue: API Call Fails​

Check:

  1. Is the remote site configured correctly?
  2. Is the Auth Token valid?
  3. Is the endpoint URL correct?
  4. Check RDN status page for outages

Issue: Fields Not Updating​

Check:

  1. Are RDN Field Update records configured?
  2. Do field names match API response keys?
  3. Are target fields accessible (not read-only)?
  4. Check field-level security permissions

Next Steps​