Salesforce: Syncing lookup field information to Zendesk Support

Question

How can I sync a lookup field from SFDC to Zendesk Support? When I set it up I only see the record ID in Zendesk, which is not helpful.

Answer

Lookup fields in SFDC behave a bit differently than others: the raw information stored in this field is a record ID, and Salesforce looks up the relevant details when you are viewing it. If this data were to be synced over to Zendesk Support, we would only have the SFDC record ID. For this reason, our integration does not allow lookup fields to be mapped for syncing.

In order to convert this to a usable data type, it's possible to create a custom formula field with the appropriate type (usually "text"), and automatically fill in the value of the record via that lookup field. Use the custom field when syncing from SFDC to Zendesk, and the value will carry over.

Example use case:

A common example it syncing Parent Account information. SFDC Accounts sync to Zendesk Organizations, but Orgs have a flat structure in Zendesk and do not have any hierarchy. A custom field mapping is required to bring over the Parent Account, but since this a Lookup field in SFDC we get a generic record ID which is not the best user experience, and we can make it better.

1. Create a custom field in Zendesk Support

The first step is to create a custom field in Zendesk to capture this information. The type of field will depend on the information you want to capture. In our case, it is an Org level field and we'll use a Text field type to gather the name of the Parent Account.

Go to Admin > Manage > Organization Fields.

Drag Text from the right.

Give it a useful name, e.g. Parent Account.

2. Create a formula field in SFDC:

Now we need an appropriate type field in SFDC to populate the data via a formula. Again, the type will depend on your information - in our case it will be a Text field on the Account.

Go to Setup > Customize > Accounts > Fields and create a new custom field.

Choose the data type Formula.

Give it a label such as Parent Account Name, and choose Formula Return Type such as Text.

In the Enter Formula box, you'll need to build the formula for this field. Our use case is pretty simple, so choose the Advanced Formula editor, and click the Insert Field button.

Select the right data field, e.g. Account > Parent Account > Account Name:

Finish the setup by adding whichever security settings and page layout settings you prefer.

3. Configure the field mapping:

Now that the fields exist in both locations, we just need to add the connection.

In Zendesk, open Admin Center, and navigate to the Salesforce Integration page.

Select the Account to Organizations Sync and click Configure, then scroll down to Field Mapping.

Click on the Add Mapping button

Choose the Salesforce Field from step 2. Parent Account Name, and wait for the Zendesk Support Field to load.

Select the Zendesk field from step 1. Parent Account.

Click the Save button to complete.

4. We're done!

The configuration is complete, and the data should be synced between these fields from then on. I'd suggest enabling the ongoing sync and testing on a couple of records, or performing a small sample bulk sync to ensure the config is set up exactly as you want it, before doing a larger scale bulk sync.

One important thing to note: changes to these formula fields do not directly trigger a sync due to limitations in the Salesforce Streaming API. In order to work around this limitation, we recommend following this workflow: https://support.zendesk.com/hc/en-us/articles/4408823413658

For more information on Salesforce, see the article: Setting up Zendesk for Salesforce integration.