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 synchronization to Zendesk. This is a problem if you use a formula field to sync the values of Salesforce lookup fields as described in this article: Salesforce: Syncing lookup field information to Zendesk Support. 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.
- 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 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
- Open the User fields page or the Organization fields page, depending on whether you sync to organizations or users.
- Add a new checkbox field. Name the field something that indicates that it's only used for Salesforce sync purposes, for example, Salesforce internal use only.
- Add the new field to the Salesforce mapping. Follow the instructions in this section: Configuring Salesforce Contacts or Leads to Zendesk users sync.
- In the mapping section, add a new mapping for the new Salesforce checkbox to the new Zendesk checkbox and save the configuration.
To 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 that 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 look 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.