Troubleshooting Salesforce integrations

Use the following information to help troubleshoot an integration that has stopped working, or is not working as expected. Contact your Medallia Agent Connect Client Success Manager for assistance.

General troubleshooting

Begin troubleshooting by performing the following actions, in order:

  1. Confirm that the Send Agent Connect Request at DateTime field is being successfully set on your Salesforce base object.

    The field should have a timestamp if the case was closed and was eligible for a survey, meaning it met all of the requirements of your workflow rules.

  2. Confirm that integration is enabled.

    In the Agent Connect Configuration app, the integration status should be set to either Test or Production. The managed package might have been disabled if there was a critical error in the system.

  3. Verify the jobs scheduled to run.

    In Salesforce Setup, open Scheduled Jobs. Depending on what you have configured, you should see a Agent Connect Request Sender, Agent Connect Data Return, and Agent Connect Service Recovery jobs scheduled to run. Seeing these jobs confirms that the integration is successfully enabled.

  4. Verify that requests are created for cases.

    Agent Connect Configuration app, open the Agent Connect Requests tab, and then click Go to see all of the requests. The Request Successful field should be checked for most cases. If it is not checked, the detail page shows the related errors.

  5. Check whether agents have made changes to the base object after the case is solved.

    Consider the following examples:

    • When an agent closes a case, the Send Agent Connect Request at DateTime field is set. The agent might then delete the contact on the case, making the customer email address blank. When the managed package attempts to send the survey request, you receive an error message about the missing customer email address. To address this agent behavior, update your Salesforce workflow to clear the Send Agent Connect Request at field if changes are made. Alternatively, modify your Salesforce workflow to include a time-dependent corrective action.
    • An agent might assign a closed case to a queue. When this happens, there is no agent associated with the case when the Agent Connect Request Sender job runs, resulting in an error. To resolve this, use a formula instead of criteria in the Salesforce workflow. For example:
      AND(NOT(ISPICKVAL(Reason, "Service Recovery")), IsClosed, BEGINS( OwnerId , "005") )
  6. Check the status of Salesforce Apex jobs

    In Salesforce Setup, open Apex Jobs to see a history of jobs that have run. Scheduled Apex might be Queued or Aborted, which are both acceptable states. Batch Apex jobs (which make the API calls) should have a status of Completed. Investigate any displayed errors with Apex jobs. For example, an error message in the Status Details column, 1 posted in the Failures column, Total Batches is 1, or Batches processed is 0.

    If you see no error on any of the Agent Connect jobs, remove any filters on the view and then review all jobs for the span of time the integration was disabled. By examining all jobs you might find a correlation between failed jobs that others that are interfering with Agent Connect jobs.

    If you see the error, Apex job error: First error: Job object is locked and currently processing, contact Medallia Support. This error prevents the next job from being scheduled, but does not generate a notifications.

  7. Check the Agent Connect API request status page (https://your_subdomain.stellaconnect.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 the API request status page. Requests might fail, preventing surveys from being sent. For example, the Team Member's Agent Connect profile might not be complete. These errors do not disable the integration in Salesforce.

  8. Verify whether the Apex CPU time limit was exceeded.

    This might be caused by a data volume issue. If you have a high volume of data in your organization, database queries could be taking a long time, and causing the CPU time limit to be reached. For details, see the Salesforce documentation.

  9. Enable debugging.

    If you need to contact Medallia Support, enable debug logging for users, Apex classes, and Apex triggers, and configure trace flags and debug levels in the Developer Console or in Setup. Sometimes an error message is not enough and the Medallia can better assist you by reviewing debug logs.

Integration error notification sources

You might see error messages coming from the following sources.

Agent Connect Configuration app

Some error emails are generated by the managed package itself, and are sent to the email addresses entered on the Agent Connect Configuration page in Salesforce. For reference, your Agent Connect Customer Success team is also be copied on these error notifications.

These emails reference errors created when survey requests created in Salesforce are missing required information, such as a customer email address or employee email address/ID. The email you receive contains a link to any record that created the error, so you can review the records and fix the root cause. Agent Connect sends one notification email after the first error, and a subsequent notification email after the tenth error within 24 hours.

The managed package is unlikely to automatically turn off the integration for these types of errors.

Salesforce Apex exceptions

When a Salesforce Apex Exception Error occurs, Salesforce sends an email notification. Apex Exception Errors occur outside of the communication between Salesforce and the Agent Connect API, which means that Agent Connect cannot send notification emails for these errors. Ensure that the administrator selected to receive these emails is an active user who is able to actively monitor Apex Exception error emails.

Apex errors might cause the integration to be disabled by Salesforce. Resolving the root cause of any exception error is the best way to avoid auto-disabling of the integration.

Agent Connect

Emails with the subject line API Error Alert come from the Agent Connect, and reference failed survey requests. These errors are visible on the API Request Status screen in your Agent Connect account. Failed survey requests do not disable your Agent Connect integration in Salesforce.