How to resolve accounts that fail to sync from Salesforce to Zendesk

Issue symptoms

I enabled Accounts to Organization data sync from Salesforce to Zendesk but it doesn't sync. How do I resolve this?

Explanation and example

The Zendesk external ID is a system field which is required to be unique across all organizations for a Zendesk account. If one organization with a given external ID already exists, an attempt to create a second will fail outright due to a conflict.

This conflict occurs when an organization has its external ID set because of a previous Salesforce legacy integration. An example of how this can happen is explained below with the fictional Spiffy Corp account.

The legacy Salesforce integration syncs Spiffy Corp account to create an organization in Zendesk with the name Spiffy Corp and an external ID of 0011H000026CXpiQAG.

The legacy integration sync is disabled and the new Salesforce integration is enabled.

The account name in Salesforce is changed to Spiffy Corp, Inc.

Since the new integration has never synced this account before, it looks for a match based on matching criteria (typically account name to organization name).

Because there is no organization named Spiffy Corp, Inc, the integration attempts to create a new organization with the name Spiffy Corp, Inc and the same external ID.

The sync attempt fails as the external ID is already in use by the original Spiffy Corp organization.

To confirm the sync failure is due to this conflict

In Admin Center, check the matching criteria. Click the Apps and integrations icon ( ) in the sidebar, then select Integrations > Salesforce > Configure > Data Sync > Accounts to Organizations sync > Matching criteria. This is commonly associated with name-matching but could also occur with other matching criteria.

Find the account ID from the URL of the Salesforce account that's failed to sync.

Use the URL below to see if there are any organizations in Zendesk with that as their external ID. {YOUR_ACCOUNT_ID} is the account ID from your Salesforce account URL.
https://SUBDOMAIN.zendesk.com/agent/search/1?type=ticket&q=type%3Aorganization%20external_id%3AACCOUNT_ID_IHERE

Use the result from the above search and compare the matched criterion (likely name) to the matched SFDC field under Matching criteria.

Resolution steps

There are a few possible solutions to the conflict.

Stop syncing the Account-ID into the external ID.

Disable Populate Zendesk organization external ID which should prevent the collision.

Note: If the ID present in Zendesk is required, create a custom organization field and sync the account ID to a field in the standard field mappings instead.

Remove the external_id value from current organizations

You can remove the external_id using the organizations API or by using the organizations bulk import by CSV.

Correct the account names so that the account with given account ID syncs successfully with the organization that matches the external ID

This is the most labor-intensive but guarantees that IDs will sync successfully. Once an account is successfully matched to an organization, subsequent changes to that account's name should update the organization's name (instead of making a new organization).