Skip to main content
Bring your team and maximize your impact at Dreamforce. Register three or more to unlock $999 passes.

Resolve Integration and Runtime Errors

Learning Objectives

After completing this unit, you’ll be able to:

  • Identify the symptoms and causes of integration errors.
  • Identify the symptoms and causes of runtime errors.
  • Apply the correct troubleshooting steps and best practice for each category.

Resolve Integration Errors

Integration errors look different. The agent fails to reach an external system like AWS, Slack, or a custom API, or you see errors like 401 Unauthorized or 500 Internal Server Error, plus slow responses or timeouts. Common causes are expired OAuth tokens or invalid API keys, an endpoint URL that changed without being updated in Salesforce, or a misconfigured Named Credential.

Work through it in order. First, validate your Named Credentials. Go to Setup | Security | Named Credentials and confirm they’re active and pointing to the right endpoint.

  1. Validate Named Credentials by confirming they’re active and point to the right endpoint.
  2. Review API logs in Event Monitoring | API Usage Logs. See which calls failed and what HTTP status came back.
  3. Renew authentication tokens by using refresh OAuth tokens or reauthorizing the connected app.
  4. Test connectivity outside Salesforce with a tool like Postman, so you know whether the problem is the endpoint itself or something on the Salesforce side.

Here's a reminder of the common error codes.

  • 401 means refresh the OAuth token.
  • 403 means check permissions.
  • 404 means the endpoint URL or record ID is wrong.
  • 429 means you're being rate-limited (add retry/backoff logic).
  • 500 means it's time to check logs or contact Salesforce Support.

A good practice for integrations going forward is to build retry logic and monitoring alerts directly into your flows, so a transient failure doesn’t turn into a support ticket. However the issue was resolved, reproduce it in a sandbox first, don’t debug data or integration issues live in production.

Resolve Runtime Errors

Runtime errors include a process that stops before completing, exceptions such as Null Pointer Exception, or automation loops that never resolve. These usually come from uninitialized variables, recursive triggers, or governor limits being exceeded. Runtime errors show up when complex automation breaks down midexecution.

Common causes include incorrect flow logic or uninitialized variables, recursive triggers or circular dependencies (steps that repeatedly trigger each other), or governor limits exceeded (the maximum resources Salesforce allows a single transaction to use).

Run through these steps to troubleshoot.

  • Step through the flow in Debug Mode to find the failing node or variable.
  • Review Apex debug logs for stack traces.
  • Check governor limit usage for SOQL queries, DML operations, and CPU time.
  • Refactor complex flows into smaller, reusable subflows.

Best practice: Always configure Fault Paths so flows handle runtime exceptions gracefully.

Troubleshooting agents can be a challenging process with a lot of options to dig into. You now have a better idea of the different areas to look at and how to configure them to run correctly. Be sure to check out all the Resources to further your learning.

Resources

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios