Zendesk tickets fail to sync into cases in Salesforce

Issue symptoms

I followed the instructions in Setting up Ticket Sync from Zendesk to Salesforce, but Salesforce doesn't create or update cases.

Resolution steps

To resolve this issue, ensure that the Salesforce Integration trigger fires and generates a log entry in Salesforce.

To verify the Salesforce Integration trigger functionality:

Open the Admin Center and verify if the ticket sync is active.

Check if the (Salesforce Integration) Sync tickets to Salesforce trigger is active.

If ticket sync is active and the trigger is active, an entry appears within the ticket event view after you create or update a ticket.

If you see the entry, turn on the Salesforce logs. If you do not see this type of event in your tickets, see Setting up Ticket Sync from Zendesk to Salesforce.

To run the Salesforce logs:

Sign in to Salesforce with an admin account.

Note: This does not need to be the same account you use to authenticate from Zendesk to Salesforce. It can be any Salesforce admin.

Go to Setup > Environments > Logs > Debug Logs. Click New to create a new User Trace Flag with the details below:

Traced Entity Type: User

Traced Entity Name: Select the user you use to authenticate from Zendesk to Salesforce. This is the user you use to sign in to Salesforce after you click Connect in Admin Center.

Start Date: Current Datetime

End Date: Current Datetime plus 30 minutes

Debug Level: Use any existing debug level that has at least DEBUG for Apex Code and System.

Click Save. You can now debug.

Create a ticket in Zendesk that meets the conditions of your trigger to push to Salesforce as a case.

Check the ticket events to confirm the (Salesforce Integration) Sync tickets to Salesforce trigger fired and you can see Message pushed to target.

Switch back to Debug Logs in Salesforce and refresh the page.

Look for new entries with Request-type: API and Operation: /services/data/v45,9/components/sobjects. Depending on the activity in your Zendesk, multiple entries might appear. Filter the entries to identify the correct one.

Click View to open the log.

Look for Validation Fail or Required field missing messages. These prevent Salesforce from the case creation.

If there is no log available, it might indicate one of the following:

The User Trace Flag had the incorrect user in the Trace entity name. To find the user who authenticated that connection to Salesforce, in Salesforce go to Apps > Connected Apps > Connected App OAuth Usage and click the user count value.

The trigger or target does not reach your Salesforce instance. To confirm proper connection, open a new incognito window and return to the Admin Center. Once there, disconnect the Salesforce integration and then reconnect it. When you reconnect to sign in to Salesforce as a system admin, ensure full access to the necessary fields and objects.

Note: The trigger will not fire on ticket updates to Salesforce in some situations. For example, ticket deletion, automatic system closers such as automations that close tickets at 28 days, ticket imports with the Import API, and ticket deletion schedules with the “has attachment” condition enabled.