All Collections
Integrations & API
Salesforce
Salesforce: Tracing Errors & Troubleshooting
Salesforce: Tracing Errors & Troubleshooting
Updated over a week ago

Troubleshooting the Agent Connect Integration in Salesforce:

1. Confirm that the Send Agent Connect Request at DateTime field is being successfully set on the Case (or whichever object you have set as your base object). The field should be filled with a timestamp if the case was closed and was eligible for a survey, meaning it met all the requirements of your workflow rules.​

2. Confirm that integration is enabled for each mapped object

From the Agent Connect Configuration page review each mapped object under Field Mappings and confirm that the status is set to Test or Production.

3.Review Setup > Scheduled Jobs

Depending on what you have enabled, you should see an Agent Connect Request Sender, Agent Connect Data Return, and/or Agent Connect Service Recovery jobs scheduled to run. This confirms that the integration is successfully enabled.

4. Review Agent Connect Salesforce app > Agent Connect Requests tab

You'll want to click Go next to the View so that you can see all of the requests. Here, you will see the requests getting created for each Case that is processed. The request successful checkbox should be checked. If not checked, the detail page will show any errors that occurred.

5. Changes to the base object after closed/resolved

Confirm if team members are making changes to the base object after the case is solved. For example, a team member closes a case and the Send Agent Connect Request at DateTime field gets set. Then the team member deletes the contact on the case making the customer email address blank. When the managed package attempts to send the request, you will receive an error message regarding the customer email address missing.

You would need to add logic to clear the Send Agent Connect field if changes are made or set up the Salesforce workflow for a time-dependent action.

Another example is if the case closes and then the team member assigns the case to a queue. There is then no employee associated with the case by the time the Agent Connect Request Sender job runs to send surveys for eligible cases, creating an error. You'll want to use a formula instead in to populate a field which will capture the agent for which the survey is capturing feedback that will be associated with the record.

6. Review Setup > Apex Jobs

You should see a history of jobs that have run. You will see Scheduled Apex which may be either Queued or Aborted, which are both expected/acceptable statuses. You should also see Batch Apex jobs which are actually making the API calls which should be in Completed status. If there is an error with one of these, you will see that error here.

  1. An error message in the Status Details column and/or

  2. A 1 posted in the failures column or total batches 1/batches processed 0

  3. If there is no error on any of the Agent Connect jobs, then remove any filters you may have set on the view and review all jobs for the timeframe of the integration being disabled. Look at all the jobs that are being run: you might find some correlation between the failures and runs of other jobs that are interfering with Agent Connect jobs.

7. Review your Agent Connect API Status page (https://(your_subdomain).agentconnect.net/api/request_status)

If the API request is successful but the request fails another validation within Agent Connect, you should see a failed request listed on this page. There are a couple of reasons that a request can fail and cause a survey not to be sent. For example, the employee profile is not complete. These errors do not disable the integration in Salesforce.

8. Apex job error: Apex CPU time limit exceeded: Salesforce disables the jobs

This could be a data volume issue. If you have a high volume of data in your org, database queries could be taking a long time and causing the CPU time limit to be reached. It is not possible for us to diagnose without additional details.

9. API Endpoint Misconfiguration

If you receive the following error the integration may be pointing to an invalid endpoint. This is most applicable to customer upgrading to version 1.65 or later from version 1.48 or earlier which previously leveraged https://sapi.stellaconnect.net which has been updated to https://api.stellaconnect.net.


You can audit your endpoints under Custom Settings and select Manage next to each Agent Connect object and audit the endpoints.

Note: If your Agent Connect instance is hosted on our European Data Center the endpoint https://fra1-connect-1.api.stellaconnect.net/ should be leveraged in place of https://api.stellaconnect.net/. If you are not sure which Data Center you instance is hosted on please contact our Support Team!

10. Audit the Data Return Mapping

If fields are not being populated on the Agent Connect Response Object audit the field mapping in the Data Return settings. If all mappings appear correct on the Data Return tab of the Agent Connect Configuration page deeper auditing of the fields should be performed within Custom Settings under the Agent Connect Data Return Map Option.

Note: This is an edge case scenario for customers who may have a complex survey leveraging multiple of the same survey question type or who have deleted and added new survey questions that lead for survey questions to have unique identifiers. The unique identifiers then need to be added to the field settings under Agent Connect Data Return Map Option by selecting the ‘Edit’ option next to the field name to update the Data Return Path value to include the unique identifier for the question

If you are not certain of the unique identifiers for the questions please connect with our Support Team or your Professional Services point of contact.

Enable debugging

Sometimes an error message is not enough and we need to review debug logs. You can activate debug logging for users, Apex classes, and Apex triggers, configure trace flags and debug levels in the Developer Console or in Setup.

Known issues:

  1. Apex job error: First error: Job object is locked and currently processing. This does not allow the next job to schedule. It does not generate any notifications. Please reach out to support if you experience this issue.

Types of Salesforce Integration Error Notifications

From the Agent Connect Managed Package:

These error emails are generated by the Agent Connect integration itself and will be sent to the email address(es) entered on the Agent Connect Configuration page in Salesforce.

These emails often reference errors created when survey requests created in Salesforce are missing required information, like a customer email address or employee email address/ID. When this required information is missing from a survey request, the communication between Salesforce and the Agent Connect API endpoint will trigger an error email for you. In the email you receive, there will be a link to the record(s) that created the error, so you can review them and resolve the root cause.

Common Error Messages:

Stella Connect Employee cannot be a Queue -- most common

The employee cannot be a queue. It must be an individual. This individual must have an email or ID that matches an active profile within Agent Connect.

Missing fields: employee_email or employee_custom_id

The employee that closes the object that triggers the managed package to run, must be filled in. It also must match an active Agent Connect profile.

Customer Email field missing value

The customer must have an email in order for an interaction record to be created and for a survey to be delivered.

System.SObjectException: Invalid field StellaConnect__Requested_Datetime__c for Case:

This means that the date time field is not being populated or it is not triggering the case because it's been open and closed multiple times. Instruct client to open a new case and test a fresh date time validation.

​From SF Apex exception emails:

When there is a Salesforce Apex Exception Error, Salesforce will send an email notification directly. Apex Exception Errors occur outside of the communication between Salesforce and the Agent Connect API, which means that we cannot send notification emails for these errors. Please ensure that the admin chosen to receive these emails is an active user who is able to actively monitor any received Apex Exception error emails sent by Salesforce.

Apex errors may cause the Agent Connect integration to be disabled by Salesforce. Unfortunately, this is outside of our control, and resolving the root cause of any exception error is the best way to avoid auto-disabling of the integration.

Implemented in version v1.67, a Job Monitor schedulable class runs every hour and checks if the other batches are running normally and haven’t shut off. If any of the other batches are not running, then it sends out an error email to notify about the package shut off.

​From Agent Connect:

Emails with the subject line API Error Alert come from the Agent Connect application and reference failed survey requests, visible on the API Status Page in your Agent Connect account (Settings > Integrations > API Status Page). These failed survey requests will NOT disable your Agent Connect integration in Salesforce.

Did this answer your question?