The Zendesk for Salesforce integration syncs Zendesk tickets to Salesforce cases, enabling ticket reporting and business workflows in Salesforce. When the ticket sync package is installed, Zendesk maps most of the standard ticket fields to Salesforce case fields.
You can also display a view of Zendesk tickets on a Salesforce Case page. See Setting up Ticket View in Salesforce.
This article contains the following sections:
- Important considerations
- 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
Related articles:
Important considerations
- Zendesk ticket attachments do not sync to Salesforce.
- Closed tickets do not sync to Salesforce. If a ticket has not synced and is already closed, you'll need to find an alternate method of creating a corresponding case within Salesforce, such as the Salesforce API.
Recommendations before setting up
Ticket sync is an advanced feature, and it's important to understand the behavior before setting it up in your production accounts. We recommend the following tasks:
- Test ticket sync in your Salesforce and Zendesk sandbox accounts before setting it up in your production account.
- If you have data sync enabled and you are testing with Salesforce sandbox and Zendesk production accounts, it's recommended to disable Create if no match found in Ticket Organization Matching and Ticket Requester Matching to prevent duplicate organization 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
To create a Salesforce record type
- In Salesforce, click the Setup icon in the upper right.
- Click Object Manager.
- On the Object Manager page, click Case.
- Click Record Types in the left navigation pane.
- 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 Admin Center, click Apps and integrations in the sidebar, then select Integrations > Integrations.
- Next to Salesforce, click Configure.
- Click the Data sync side tab.
- In Ticket sync, click Configure.
- In Ticket sync package, click Install.
Configuring Zendesk tickets to Salesforce cases sync
After the steps in the previous sections are completed, the ticket sync is enabled to allow mapping and syncing of Zendesk fields to Salesforce cases.
To configure settings for sending tickets to Salesforce cases
- In Admin Center, click Apps and integrations in the sidebar, then select Integrations > Integrations.
- Next to the Salesforce Integration, click Configure.
- Click the Data sync side tab.
- In Ticket sync, click Configure.
- Select the Enable ticket sync 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.
Note: You must map all required Salesforce case fields. If a required field is not mapped, the sync will fail. Drop-down fields mapped to picklists must have all possible values from Zendesk mapped to options in Salesforce. 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.
- Webhook: (Salesforce Integration) Sync tickets to Salesforce
- Trigger: (Salesforce Integration) Sync tickets to Salesforce
Webhooks 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 for ticket sync to work.
To configure and activate the trigger
- In Admin Center, click Objects and rules in the sidebar, then select Business rules > 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, set the Status to Inactive.
- Hover your mouse over the (Salesforce Integration) Sync tickets to Salesforce trigger to display the options menu icon () and select Activate.
Standard field mappings
Zendesk Ticket Field | Salesforce Case Field |
Type | Type |
Priority | Priority |
Status | Status |
Zendesk Ticket ID | Zendesk_Support_Ticket_ID__c |
Subject | Subject |
Description | Description |
Requester ID | ContactId |
Requester Name | Zendesk_Support_Ticket_Requester_Name__c |
Requester Email | Zendesk_Support_Ticket_Requester_Email__c |
Organization ID | AccountId |
Organization Name | Zendesk_Support_Ticket_Organization_Name__c |
Brand Name | Zendesk_Support_Ticket_Brand_Name__c |
Zendesk Assignee | Zendesk_Assignee__c |
Assignee Name | Zendesk_Support_Ticket_Assignee_Name__c |
Assignee Group | Zendesk_Support_Ticket_Group_Name__c |
Tags | Zendesk_Support_Ticket_Tags__c |
URL | Zendesk_Support_Ticket_URL__c |
Ticket form name | Zendesk_Support_Ticket_Form_Name__c |
Date/Time created | Zendesk_Support_Ticket_Created_At__c |
Date/Time updated | Zendesk_Support_Ticket_Updated_At__c |
Date/Time solved | Zendesk_Support_Ticket_Solved_At__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 |
Comment | Ticket comments are not synced to a case field. However, you can set up Ticket View in Salesforce cases to view ticket comments. See Setting up Ticket View in Salesforce. |
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)
If you'd like to sync custom fields, you can set up custom field mapping. Custom field mapping enables Zendesk ticket fields to be mapped to fields on the Salesforce Case object (either a system field or a custom field). This mapping takes place in the Zendesk Admin Center within the Ticket Sync settings.
The table below shows which Zendesk field types can be mapped to Salesforce field types for ticket sync.
- Multi-line
- Credit card
- Regex
- Lookup relationship
Mapping a multi-select Zendesk field will cause errors whenever that field has a value. Do not map multi-select fields to sync to Salesforce.
- EncryptedString
- ID
- MultiPicklist
- Percent
- Reference
- TextArea
- URL
Case Origin picklist fields in Salesforce cannot be mapped.
To map custom Zendesk ticket fields to the Salesforce Case object
- In Salesforce, click the Setup icon in the upper right.
- Click Object Manager.
- On the Object Manager page, click Case.
- Click Fields & Relationships in the left navigation pane, then click New.
- Select a Data Type for your new field, then click Next. See table above for which field types can be mapped between Zendesk and Salesforce.
Note: When mapping a drop-down field in Zendesk to a text field in Salesforce, the tag values will show, not the field values. For more information on how tags work with custom ticket fields, see Understanding custom ticket fields, tags, and business rules.
- Enter a Field Label. It is preferred to match the Field Label to the Zendesk Custom Field Name.
- Complete the other mandatory fields, then click Save.
- Repeat steps 4-7 to create additional custom fields.
- In Admin Center, click Apps and integrations in the sidebar, then select Integrations > Integrations.
- In Salesforce integration, click Configure > Data sync > 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, then 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 > Integrations > Salesforce, then navigate to > Configure > Data sync >Ticket Sync > Configure. See Organization syncing options.
Organization syncing options
The organization syncing section provides the following configuration options:
- Sync to existing Accounts syncs the organization to the existing Salesforce account based on the matching criteria.
-
Sync to existing Accounts and create if no match lets you map the Zendesk organization ID to a Salesforce account field. You can select from any standard and custom Salesforce account fields. This one-way sync is useful for displaying which Salesforce account is linked to a Zendesk organization.
If you have required fields on the Salesforce account for creation, those fields need to be populated from the Zendesk organization by mapping them in the Accounts to Organizations sync page.
-
Salesforce default Account lets you 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 the 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 > Integrations > Salesforce, then select Configure > Data Sync > Ticket Sync> Configure.
Requester syncing options
The ticket requester section provides the following configuration options:
- Sync to existing Contacts/Leads syncs the requester to the existing Salesforce contact or lead based on the matching criteria.
-
Sync to existing Contacts/Leads and create if no match lets you map the ticket requester's user ID to a Salesforce contact or lead field. Select from any standard and custom Salesforce contact or lead field. This one-way sync is useful for displaying which Salesforce contact or lead is linked to a Zendesk user.
If you have required fields on the contact or lead for creation, they must be populated from the Zendesk user by mapping them in the Contacts/Leads to Users sync page.
- Salesforce default Contact/Lead lets you enter an existing contact or lead as the default contact or lead for new contacts if you opt to create new contacts for unmatched ticket requesters and no user exists in Zendesk. Enter the Salesforce contact or lead ID in the provided field.
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 the deployment was successful or failed. If the deployment failed, Salesforce will provide you with detailed errors. Review the errors and resolve them. If you cannot 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 check your data sync is set up correctly:
- Confirm you have activated the Salesforce trigger in your Support settings.
- Confirm the trigger JSON body has not been edited and is as shown below. Any change to the JSON body causes the sync to fail.
{"ticket_id": {{ticket.id}}, "salesforce_org_id": "YOUR_SFDC_ORG_ID"}
- 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 in custom ticket field mappings. If you do not map all required fields, the sync will fail.