A known limitation of the Salesforce integration is that an update to a mapped formula field in either an account, a contact, or a lead will not trigger a sync to Zendesk. This is a problem if you're using a formula field to sync the values of Salesforce lookup fields as described in this article. This sync issue is caused by a limitation in the Salesforce Streaming Events API, where changes to formula fields do not lead to the creation of a streaming event.
The solution to this problem is to create an automated process in Salesforce using a new hidden field that is automatically updated whenever one of your key Salesforce fields change.
There are three parts to this solution. First, create a new checkbox field in Salesforce to be used as a hidden sync trigger. Then, create a corresponding checkbox field in Zendesk and add it to the sync mapping. Finally, create a process using the Salesforce Process Builder to automatically update the new checkbox field.
To create the new field in Salesforce:
- Go to the Object Manager and select the object type you want to sync (either account, contact, or lead).
- Go to Fields & Relationships and add a new field.
- Choose checkbox for the data type and give it a name (for example, Formula Fields Updated?). Leave the default option to unchecked.
- Select the appropriate field-level security, making sure that system administrators have access to the field.
- On the page layouts settings page, uncheck all options. This field is only used in a background process and shouldn't be on the page for users to update.
To create the corresponding field in Zendesk and update the mapping:
- Go to Admin > Manage > Organization Fields or User Fields, depending on whether you're syncing to organizations or users.
- Add a new checkbox field. Make sure to name it something that indicates that it's only used for Salesforce sync purposes (for example, Salesforce internal use only).
- Next add the new field to the Salesforce mapping. Go to Admin Center > Platform > Salesforce Configuration > Data Sync and select either the Accounts or Contacts/Leads option.
- In the mapping section, add a new mapping for the new Salesforce checkbox to the new Zendesk checkbox and save the configuration.
Finally, to automate this, create a process in Salesforce:
- Go to Setup > Platform Tools > Process Automation > Process Builder and select New.
- Give the process a name (for example, Was account formula field updated?) and for the Process starts when setting, select A record changes.
- In the builder window, just below the Start oval, click Add object and add either account, contact, or lead, depending on your workflow.
- Choose to start the process when a record is created or edited.
- Back in the builder, select Add Criteria and give the new criteria a name.
- Leave the Conditions are met execution action.
- Add a condition that corresponds to one of your lookup fields getting updated. For example, if your Accounts contain an Account Executive lookup field which looks to Contacts, you could add Account > Account Executive > Contact ID as the field.
- For the operator choose Is changed. The type should be boolean and the value true.
- Repeat steps 7 and 8 for any other lookup fields that you want to trigger a sync.
- When you are done adding conditions, select the Any of the conditions are met (OR) options.
- Back in the builder, follow the True process arrow to Immediate Actions and select Add action.
- For the action type, select Update Record, give the action a name (for example, Update Zendesk sync checkbox).
- For the record type, choose Select the Account record that started your process.
- Leave the criteria as No criteria—just update the records!.
- In the field selection, pick the Salesforce checkbox field you created. Set the type to boolean and the value to true and save the action. This takes care of updating the record, but you need to reset the checkbox, so add one more action.
- Back in the builder, click Add action under Immediate Actions again. Repeat steps 12 through 15, but instead of setting the checkbox field to true, set it to false.
- Save and activate the process.
Here is an example of what the process might looks like at the end:
Go ahead and update one of your lookup fields in Salesforce and see if the account or contact or lead syncs over to Zendesk as you expect.