The Zendesk for Salesforce integration provides a sync of Zendesk tickets to Salesforce cases. This enables reporting on Zendesk tickets support analytics generated in Salesforce, and triggering other business workflows in Salesforce.
This article contains the following sections:
- Recommendations before setting up
- Setting up ticket sync
- Creating a Salesforce Case Record Type
- Installing the ticket sync package in Admin Center
- Configuring Zendesk tickets to Salesforce cases sync
- Configuring and activating Zendesk triggers
- Standard field mappings
- Custom field mappings
- Configuring organization matching
- Configuring ticket requester matching
- Checking if Ticket Sync has successfully installed
- Checking your ticket sync setup
Recommendations before setting up
Ticket sync is an advanced feature and it is important to understand the behavior before setting it up in your production accounts. We recommend the following tasks:
- Test ticket syncing in your Salesforce and Zendesk sandbox accounts first before setting it up in your production account.
- If you are using the legacy integration, don't enable ticket sync in both integrations at the same time. This may cause duplicate records to be created in Salesforce. When you are ready to enable the new ticket sync, turn off this feature in the legacy integration first.
- If you have data sync enabled and you are testing with Salesforce sandbox and Zendesk production accounts, it is recommended to not enable Create if no match found in Ticket Organization Matching and Ticket Requester Matching since this may create duplicate organization records and user records in Zendesk.
Setting up ticket sync
Setting up ticket sync requires performing a number of tasks to the Salesforce Case Object, Zendesk triggers, and in the Zendesk Admin Center.
To set up ticket sync from Zendesk to Salesforce
Creating a Salesforce Case Record Type
Record types are used to implement a custom business process in Salesforce. It is not mandatory to create a record type. However, if you are using your Salesforce Case Object for another process, the record type ensures the Zendesk tickets are kept separate.
To create a Salesforce Record Type
- In Salesforce, click the Setup icon in the upper right, then click Object Manager
- In the Object Manager page, click Case.
- Click Record Types in the left navigation pane, and click New in the upper right of the page.
- Follow the steps on the Salesforce page to create a record type. It is recommended to name your Record Type Label: Zendesk Ticket Sync.
Installing the ticket sync package in Admin Center
The ticket sync package creates standard Zendesk ticket fields in the case object and maps them to standard Case fields.
For the ticket sync package to create Case fields, the authenticated user must have permission to modify the Salesforce metadata API.
To install the ticket sync package
- In Zendesk Admin Center, click the Integrations icon () in the left navigation pane.
- Next to Salesforce, click Configure.
- Click the Data Sync side tab, and in Ticket sync, click Configure.
- In Ticket sync package, click Install.
Configuring Zendesk tickets to Salesforce cases sync
Once the steps in the previous sections are completed, the ticket sync is enabled to allow mapping and syncing Zendesk fields to Salesforce cases.
To configure settings for sending tickets to Salesforce cases
- In your Zendesk Admin Center, select Integrations icon () in the left navigation pane.
- Next to the Salesforce Integration, click Configure.
- Click the Data Sync side tab, and in Ticket Sync, click Configure.
- Select the Enable syncing checkbox, and configure the settings for sending Zendesk tickets to Salesforce cases.
- In Record Type, enter the Record Type ID created earlier. You can find the Record Type ID in your Salesforce account by clicking the Setup icon, then Object Manager > Case > Record Types, and clicking on the record type to find the ID in the URL.
- In Custom ticket field mapping, map Zendesk ticket fields with the Salesforce case fields you want populated. Standard field mapping is provided and the ability to customize mapping. You must map all required Salesforce Case fields. If a required field is not mapped, the sync will fail. For more information, see Standard field mappings and Custom field mappings.
- In Organization matching, configure how Zendesk organizations are synced to Salesforce accounts. For more information, see Configuring organization matching.
- In Ticket requester matching, configure how Zendesk ticket requesters are synced to Salesforce Contacts or Leads. For more information, see Configuring ticket requester matching.
- Click Save.
- Target: (Salesforce Integration) Sync tickets to Salesforce
- Trigger: (Salesforce Integration) Sync tickets to Salesforce
Targets are used to send notify external applications when a ticket is created or updated. Triggers are business rules that are defined in Zendesk.
Configuring and activating Zendesk triggers
Zendesk Triggers are created from conditions and actions. They run immediately after Zendesk tickets are created or updated.
By default, the Salesforce trigger is inactive. The trigger conditions must be reviewed and the trigger activated in order for ticket sync to work.
To configure and activate the trigger
- In Support, click the Admin icon () in the sidebar, and under Business Rules, select Triggers.
- Find the (Salesforce Integration) Sync tickets to Salesforce trigger, and click the trigger name to edit it.
- Modify the trigger conditions as needed. Use the conditions as a filter, to set which tickets should be sent to Salesforce. Do not rename the trigger.
- Click Save to save your trigger settings.
- On the Triggers page, select the Inactive tab.
- Next to the (Salesforce Integration) Sync tickets to Salesforce trigger, click the More Options icon, and select Activate.
Standard field mappings
When the ticket sync package is installed, Zendesk creates and maps most of the standard ticket fields to Salesforce case fields as shown in the following table.
|Zendesk Ticket Field||Salesforce Case Field|
|Zendesk Ticket ID||Zendesk_Support_Ticket_ID__c|
|Ticket form name||Zendesk_Support_Ticket_Form_Name__c|
|Date/Time initially assigned||Zendesk_Support_Ticket_Initial_Assigned__c|
|Resolution time (calendar)||Zendesk_Support_Ticket_Resolution_Cal__c|
|Resolution time (business)||Zendesk_Support_Ticket_Resolution_Bus__c|
Custom field mappings
- Requester wait time (calendar)
- Requester wait time (business)
- Agent wait time (calendar)
- Agent wait time (business)
- On-Hold time (calendar)
- On-Hold time (business)
- First Reply time (calendar)
- First Reply time (business)
This is done by creating custom case fields in Salesforce first, and then mapping the ticket fields in the Admin Center.
To map custom Zendesk ticket fields to the Salesforce Case Object
- In Salesforce, click the Setup icon in the upper right, then click Object Manager
- In the Object Manager page, click Case.
- Click Fields & Relationships section in the left navigation pane, then click New.
- Select a Data Type for your new field, then click Next. In most cases Text, Text Area, or Number is appropriate. For Zendesk drop-down fields, a Text field is sufficient. Only the selected value is be synced.
- Enter a Field Label. It is preferred to match the Field Label to the Zendesk Custom Field Name.
- Complete the other mandatory fields, and click Save.
- Repeat steps 3-6 to create additional the custom fields.
- In Admin Center, go to the Salesforce integration, then Ticket sync > Configure > Custom ticket field mapping. The custom case fields previously created appear in the Salesforce fields.
- Map your Zendesk fields to Salesforce fields, and click Save.
After mapping, when a ticket is sent into Salesforce, custom field data is automatically populated according to the field mappings.
Configuring organization matching
When configuring ticket sync, there are two options for setting the matching criteria for organizations:
- If your Account to Organization data sync is disabled, use default matching criteria and field mappings. The default matching criteria is Organization Name to Account Name. By default, when Zendesk sends ticket information to Salesforce, if an exact email match is not found between the ticket’s organization and account, a new account is created in Salesforce.
- If your Account to Organization data sync is enabled, the custom matching criteria configured is used to match the ticket’s organization with Salesforce accounts. You can view your custom matching criteria in Admin Center > Integrations > Salesforce Integration > Configure > Data Sync Account to organization sync.
Organization matching options
The organization matching section contains the following configuration options:
- Create if no match checkbox: Select this checkbox if you want to create a new account in Salesforce when no match is found for the ticket's organization.
Note: It is recommended to not enable the Create if no match found checkbox if you have Account to Organization data sync enabled and you are testing with your Salesforce sandbox and Zendesk production accounts. This is to prevent duplicate organization records being created in Zendesk while testing.
Default Salesforce Account ID: If you opt to create new accounts unmatched ticket organizations, you can enter an existing account as the default account in Salesforce if no organization exists in Zendesk. Setting a default account prevents orphaned accounts from being created.Note: The Organization field in Salesforce does not inherit the account of the contact in the Requester field. This Organization field only populates based on the organization information present on the ticket within Zendesk.
Configuring ticket requester matching
When configuring ticket sync, there are two options for setting the matching criteria for ticket requester:
- If your Contact or Lead to user data sync is disabled, use default matching criteria and field mappings. By default, when Zendesk sends ticket information to Salesforce, and an exact email match is not found between the ticket requester and a Contact, a new Contact is created in Salesforce.
- If your Contact or Lead to user data sync is enabled, the custom matching criteria configured is used to match the ticket requester with Salesforce Contacts or Leads. You can view custom matching criteria in Admin Center > Integrations > Salesforce > Configure > Data Sync Account to organization sync.
Ticket requester matching options
The ticket requester section provides the following configuration options:
- Create if no match checkbox: If no existing record is found for the match, select the checkbox to create a new Contact or Lead in Salesforce when no match is found for the ticket's requester.
Note: It is recommended that you do not enable Create if no match found checkbox if you are have Contact or Lead to User data sync enabled and you are testing this feature with your Salesforce sandbox and Zendesk production accounts. This is to prevent duplicate Organization and User records being created in Zendesk while testing.
- Default Salesforce contact/lead ID: If you opt to create new contacts for unmatched ticket requesters, you can enter an existing Contact or Lead as the default Contact/Lead for new Contacts if no user exists in Zendesk by entering the Salesforce Contact/ Lead ID.
Checking if Ticket Sync has successfully installed
- Go to Salesforce > Setup > Deployment Status
- Check for a deployment time for when you installed the package to see if deployment was successful or failed. If deployment failed, Salesforce will provide you with detailed errors. Review the errors and resolve them. If you are unable to resolve them, contact Zendesk Support and provide a screenshot of the error.
- Go to Salesforce > Object Manager > Case > Fields & Relationships. Check if additional case fields were created in your Salesforce Case Object, as shown below for each standard Zendesk ticket field.
- Once you have confirmed steps 2 and 3 were successful, continue with setting up Ticket Sync.
Checking your ticket sync setup
Use the following checklist to help check your data sync is set up correctly:
- Confirm you have activated the Salesforce trigger in Zendesk Support settings.
- Confirm that the trigger JSON body has not been edited and is as shown below. Any change to this JSON body will cause the sync to fail.
- Confirm you have entered the correct Record Type ID. If the Record Type ID is incorrect, the sync will fail. Note: Record Type ID is not your Salesforce Org ID.
- Confirm that all required Salesforce case fields are included custom ticket field mappings. If you do not map all required fields, the sync will fail.