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.
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. When this data is synced over to Zendesk Support, we just have the record ID which is what we can display.
In order to convert this to a usable data type, the best solution is to create a customer formula field with the appropriate type, 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.
- Go to All Tabs > Zendesk > User and Organization Sync Settings > Go to Mappings.
- Select the Account - Organizations pairing, and scroll down to Field Mapping.
- Choose the Salesforce Field from step 2. Parent Account Name, and wait for the Zendesk Support Field to load. It should load the types which match, so once it's done select the Zendesk field from step 1. Parent Account.
- Click the Add 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.