Skip to main content

Troubleshooting Guide

Solutions for common RDN integration issues.

Quick Diagnosis​

Use this flowchart to diagnose issues quickly:

  1. Is the trigger firing?

    • Yes → Continue to "API Call Issues"
    • No → See "Trigger Not Firing"
  2. Is the API call succeeding?

    • Yes → Continue to "Field Update Issues"
    • No → See "API Call Issues"
  3. Are fields being updated?

    • Yes → Integration working! ✅
    • No → See "Field Update Issues"

Trigger Not Firing​

Symptom​

After creating/updating a Lead or Contact, the integration doesn't run.

Diagnosis Steps​

1. Check Trigger Exists

Setup → Apex Triggers
  • Is your trigger deployed?
  • Is the status "Active"?

2. Verify Trigger Code Check that trigger uses after insert, after update:

trigger LeadTrigger on Lead (after insert, after update) {
if (Trigger.isAfter) {
RDNTriggerHandler.handleTrigger(Trigger.new, Trigger.oldMap);
}
}

3. Check Governor Limits If you hit Salesforce governor limits, triggers might be disabled:

Setup → System Overview → API Usage

4. Enable Debug Logs

  1. Go to Setup → Debug Logs
  2. Create a log trace for your user
  3. Update a record
  4. View logs to see if trigger executed

Solutions​

IssueFix
Trigger not deployedDeploy via Change Set or SFDX
Trigger is inactiveActivate via Setup → Apex Triggers
Wrong eventChange to after insert, after update
Missing handlerEnsure RDNTriggerHandler exists in org
Governor limitsClean up old data or increase limits

API Call Issues​

Symptom​

Trigger fires but API call fails.

Error: "Invalid Token"​

Cause: Auth Token is invalid, expired, or incorrect

Fix:

1. Go to RDN API Provider metadata record
2. Verify Auth_Token__c value
3. Contact RightWave to get new token
4. Update metadata and save
5. Re-test with a sample record

Error: "Remote Site Not Allowed"​

Cause: Salesforce can't reach the RDN API

Fix:

1. Setup → Remote Site Settings
2. Verify remote site exists and is Active
3. Verify URL matches RDN endpoint exactly
4. Ensure URL has no trailing slash
5. Clear browser cache
6. Log out and back in
7. Try again

Error: "Invalid Endpoint"​

Cause: Endpoint path in RDN API Configuration is incorrect

Fix:

1. Check RDN API documentation for correct endpoint
2. Go to RDN API Configuration metadata record
3. Verify Endpoint_Path__c value (e.g., /addScore)
4. Compare with RDN API docs - must match exactly
5. Update and save
6. Re-test

Error: "API Limit Exceeded"​

Cause: You've exceeded RDN API rate limits

Fix:

1. Check your usage in RDN dashboard
2. Wait for quota reset (typically hourly or daily)
3. Review which records triggered API calls
4. Optimize field mappings to reduce calls
5. Contact RDN support if limits are too restrictive
6. Request quota increase if needed

Error: "Timeout"​

Cause: API call took longer than 60 seconds

Fix:

1. Check RDN API status page for outages
2. Check your network connectivity
3. Verify RDN API response time (ask support)
4. Try again during off-peak hours
5. Contact RDN support if timeouts persist

Diagnosis: Enable Debug Logging​

// Add to Apex code temporarily
System.debug('DEBUG: API URL: ' + apiUrl);
System.debug('DEBUG: Payload: ' + JSON.serializePretty(payload));
System.debug('DEBUG: Auth Token: ' + token.substring(0,10) + '***');

Field Update Issues​

Symptom​

API call succeeds but fields don't get updated.

Issue: No Fields Updated​

Check #1: Is API response successful?

  • View debug logs and verify API returned 200/201
  • Check API response body in logs

Check #2: Are RDN Field Update records configured?

1. Go to RDN Field Update metadata
2. Verify records exist for your fields
3. Verify API_Config__c references correct config
4. Verify SF_Field_Name__c matches Salesforce API name
5. Verify Request_Key__c matches API response key

Check #3: Field Name Mismatch

  • API Response Key: job_role (API response)
  • SF Field Name: Job_Role__c (Salesforce field)
  • Request Key: job_role (should match API response)

Fix:

1. Review API response in debug logs
2. Check exact field names in RDN Field Update
3. Compare with RDN API documentation
4. Update Request_Key__c to match API response
5. Re-test

Issue: Some Fields Updated, Some Not​

Possible Causes:

  • Field is read-only
  • Field has validation rule blocking update
  • Field-level security prevents update
  • API response doesn't include all fields

Fix:

1. Check if target field is read-only
Setup → Lead/Contact Fields → Field Properties

2. Check validation rules
Setup → Customizations → Leads/Contacts → Validation Rules
Verify rules allow programmatic updates

3. Check field-level security
Setup → Administrative Tools → Field-Level Security
Verify your profile can edit field

4. Check API response
View debug logs and verify field is in response

Issue: "INVALID_FIELD_FOR_INSERT_UPDATE" Error​

Cause: Field doesn't exist or you don't have permission

Fix:

1. Verify field API name is correct
SF_Field_Name__c in RDN Field Update record

2. Verify field exists
Setup → Object Fields → Search for field name

3. Check field permissions for your profile
Setup → Field-Level Security

4. Try using a standard field first (like Description)
to verify the integration works

Common Issues Reference​

ErrorCauseFix
Trigger not firingTrigger not deployedDeploy trigger via Change Set
Invalid token errorAuth token expiredGet new token from RDN
Remote site not allowedRemote site not configuredAdd remote site in Setup
Field not updatingField is read-onlyCheck field properties
Timeout errorAPI slow or offlineCheck RDN status
Rate limit exceededAPI quota used upWait for reset or request increase

Debug Logs Deep Dive​

How to Read Debug Logs​

  1. Go to Setup → Developer Console
  2. Click Debug → Logs → View
  3. Find your most recent log
  4. Search for key terms:
    • "Http request" - Shows API call
    • "Http response" - Shows API response
    • "Exception" - Shows errors
    • "Trigger" - Shows trigger execution

Example Log Analysis​

09:15:23.123 (123456789)|HTTP_REQUEST_SENT|
[URL=https://api.rdn.io/addScore, METHOD=POST,
AUTH_HEADER=Bearer xxxxxxx...]

09:15:25.456 (234567890)|HTTP_RESPONSE_RECEIVED|
[STATUS_CODE=200, BODY={job_role: "manager"}]

09:15:26.789 (345678901)|FIELD_UPDATE|
Job_Role__c set to "manager"

Interpreting Status Codes​

CodeMeaningAction
200SuccessIntegration working ✅
201CreatedIntegration working ✅
400Bad RequestCheck field mappings
401UnauthorizedVerify auth token
404Not FoundCheck endpoint URL
429Rate LimitedWait or request quota increase
500Server ErrorContact RDN support
503Service UnavailableCheck RDN status

Getting Help​

Before Contacting Support​

Gather this information:

  • Error code (if any)
  • Timestamp of when issue occurred
  • Salesforce org ID (Setup → System Overview)
  • Sample Salesforce record that failed
  • Debug log snippet showing the error
  • RDN API documentation for your endpoint
  • Steps to reproduce the issue

Contact RDN Support​

Email: integration-support@rightwave.io Phone: +1 (800) RDN-HELP Hours: Monday-Friday, 9 AM - 6 PM PST


Rollback Steps​

If you need to temporarily disable the integration:

Option 1: Metadata Flags (Preferred)​

1. Go to RDN API Configuration
2. Set Is_Active__c = false on all records
3. Go to RDN API Provider
4. Set Is_Active = false
5. Changes take effect immediately
6. To re-enable, set flags back to true

Option 2: Disable Trigger​

Setup → Apex Triggers
Find your trigger
Click Deactivate

Option 3: Remove Trigger (Last Resort)​

Setup → Apex Triggers
Delete your trigger
Redeploy later if needed
warning

Preferred order: Metadata flags → Deactivate trigger → Remove trigger This allows quick re-enabling without code changes.


Next Steps​