How to Sync Statuses and Custom Fields between Zendesk and Salesforce

Screenshot 2024-10-30 at 11.34.18 AM

This article was originally published on the Zendesk and Salesforce communities.

Syncing data between Zendesk and Salesforce allows organizations to unify both sales and support data without context-switching or manual request processing.

Since neither platform can share data natively, you’d need native or third-party solutions to get the exchange to work. These integration solutions bridge the communication gap and handle data transformation across platforms.

Without wasting much time, let me show you how to map and sync Zendesk and Salesforce custom fields and statuses using Exalate, a bidirectional third-party solution. 

Status and Custom Field Update: Zendesk to Salesforce Use Case

You can create a custom field in your Salesforce Case to reflect data from a custom field in a Zendesk ticket.

Why is this necessary?

  • Syncing user data from Zendesk to Salesforce can give more context and information about user accounts.
  • You can share Zendesk ticket status with teams monitoring a Salesforce Case.
  • Customer service teams can use this case configuration to obtain customer account data from a custom field created in a Salesforce Case.

For this illustration, I want to fetch the day of the week from a “Weekday” picklist on Salesforce and have it reflect as a text in the custom “Weekday” field in Zendesk. 

Then, we also want to change the status of a Salesforce case and have it reflected on the corresponding Zendesk ticket.

Here are the requirements:

Primary Requirements

  • Fetching the right API name from fields and entities on both sides.
  • Mapping the correct statuses and custom fields on both Salesforce and Zendesk.
  • Establishing sync rules for the incoming and outgoing data in custom fields. 
  • Setting triggers to update the field on the Salesforce side automatically.

If you prefer watching a video demonstrating the use case, it’s all here: 

How Exalate Can Map and Sync Statuses and Custom Fields Between Zendesk and Salesforce

Exalate is a two-way integration solution that works with Zendesk, Azure DevOps, ServiceNow, Jira, Salesforce, GitHub, etc. 

Why Exalate? 

How to Implement Exalate for Data Updates

First, install Exalate on both the Salesforce and Zendesk sides. Follow this step-by-step Getting Started guide to connect both of them. 

You can also request a Salesforce Zendesk integration trial by clicking the button below.

To set a connection between Zendesk and Salesforce that supports advanced integration, choose the Script Mode.

Once done, open a Case in Salesforce. Add the description and populate the required fields. These changes won’t reflect on the other side because the mapping rules have not been set. 

To configure the sync, open Exalate in your Zendesk dashboard, go to the connection you want to edit, and click on the “Edit connection” icon. 

You have two options: 

  • Outgoing sync (on the Zendesk side) refers to the data being sent over to Salesforce. 
  • Incoming sync (on the Salesforce side) refers to the data to be received from the issue on Zendesk.

Under the “Rules” tab, enter the following code snippet into the “Outgoing sync” text area. 

Sync custom fields between Zendesk and Salesforce
replica.Weekday__c = entity.Weekday__c

The entity.Weekday__c function points to the custom field name in the Zendesk ticket. The replica works as a payload or a message containing information you want to pass between the two systems. 

For the status mapping between custom fields on Zendesk and Salesforce, enter the following code snippet.

Sync statuses between Zendesk and Salesforce
def statusMap = [
          “open”   : “New”,
          “pending”: “Working”,
          “Solved” : “Escalated”
        ]

def remoteStatusName  = replica.status.name
      statusName      = statusMap[remoteStatusName]
      entity.Status   = statusName
}

The statusMap variable maps different statuses by fetching the replica.status.name and mapping it to the statusName variable of the corresponding entity.Status. Make sure the names match the corresponding statuses.

Once done, click “Publish” to save and implement changes.

Now head to the Zendesk “Incoming sync” text area and add the following line of code.

Custom field sync
issue.customFields.”Weekday”.value = replica.Weekday__c.value

The issue.customFields.”Weekday”.value fetches the string value of the field based on the name. The replica saves the value from the Salesforce Case.

Once done, click “Publish” to save the changes.

Now, it’s time to set event triggers to control the sync. 

Salesforce uses Salesforce Object Query Language (SOQL), while Zendesk uses the Zendesk search syntax.

To set an event trigger for the sync, go to “Triggers” and click “Create trigger”. 

Triggers in Exalate
Status = “Working”

Enter the following code to dictate when the exchange should be triggered. Say, when the admin sets the Case status to “Working”.

Click “Add” to complete the trigger configuration.

Back in Salesforce, select a day from the “Weekday” picklist and change the status to “Working”.

Status and custom field Salesforce sync

Now, back in Zendesk, you’ll see that the status has changed to “Pending”, which corresponds with the rules established earlier. You can also see that the “Weekday” field has been populated by the same value selected from the Picklist. 

Status sync in Zendesk

Congratulations! You have now set rules and triggers to help you update statuses and sync custom Salesforce case fields with Zendesk tickets. 

Start monitoring things in order to adjust the rules according to the demands of specific projects and issues.

If you still have questions or want to see how Exalate is tailored to your specific use case, book a demo with one of our experts right away.

Recommended Reading:

Comments are closed.