CRM and Zendesk Integration

Supports:
SmartConnect 2017+
Publisher:
eOne Solutions

CRM and Zendesk Integration



Overview
Integrate Zendesk and Dynamics CRM using a combination of bulk and scheduled processes to keep your Dynamics CRM and Zendesk data in sync.  The templates are a two-way integration solution, allowing data to flow in both directions between the two systems. Decide which components of each system should be synced with the other using the provided integration maps. The integration includes processes that will sync up the following record types:
  • Zendesk Users and Dynamics CRM Contacts
  • Zendesk Organizations and Dynamics CRM Accounts
  • Zendesk Tickets and Dynamics CRM Cases
The maps can be used as downloaded, as a starting point to customize further, or by showing techniques on how to get SmartConnect to interact with Zendesk.  The maps make use of several key Zendesk features such as:
  • Run integrations involving more than 100 records, the max that the Zendesk API will allow in a single call
  • Run incremental integrations, which allow only processing records after a specific time
  • Run integrations that use custom fields added into Zendesk
The solution includes a set of minor customizations to both 365 Sales and Zendesk. The customizations allow the unique ID from each system to be stored in the other one in order to ensure that data isn't duplicated or missed when integrating the two systems together. 

These templates do require that the latest version of the Zendesk Connection is installed and setup within SmartConnect. The Zendesk Connection is included in the download file with these templates, and additional information about the connection can be found on its dedicated overview page.

Details

General Information

The Zendesk and Dynamics CRM templates consist of 18 maps.  There are integration points between the following points:
  • Zendesk Organizations and Dynamics CRM Accounts
  • Zendesk Users and Dynamics CRM Contacts
  • Zendesk Tickets and Dynamics CRM Cases
For every integration, a bulk version and change/real-time version of the maps exist going from CRM to Zendesk as well as from Zendesk to CRM.  The set of bulk maps are intended for an initial sync of data. Once that is complete, the change maps are designed to be scheduled as an ongoing process to keep the two systems synced up.  Bulk maps integrating data from Zendesk into CRM have two maps linked together to complete the integration (MapID's that end in '2').  This is because the Zendesk API only returns 100 records at a time.  Running one map will automatically run the linked map if another page of data exists, allowing for any number of records to be exported from Zendesk.

Any of the mappings can be changed or configured once the integrations are imported into SmartConnect, so additional fields can be included or even new maps can be added to fit specific needs.

Prerequisites to using these templates are as follows:
  • Have a valid Dynamics CRM and Zendesk instance/organization
  • SmartConnect 20.17.0.14 or higher installed and registered
  • Dynamics CRM Connector already configured within SmartConnect
The process to integrating a Zendesk and CRM system is
  1. Create custom fields in Dynamics CRM and Zendesk.  Custom fields keep the systems in sync and prevent duplicate records from forming.
  2. Import and customize the Connector methods.  The Zendesk API will have fields related to authorization and access that are specific to your system.
  3. Import and Configure the Dynamics CRM – Zendesk Maps.
  4. Run bulk maps to synchronize historical data and set up on going maps to keep the systems in sync.

Create custom fields in Dynamics CRM and Zendesk

Zendesk and CRM use different fields to identify each record.  For example, Zendesk tickets use a number as the unique identifier but CRM's caseID has letters and numbers.  Because of this, we need to add a caseID field into Zendesk and a ticket number into CRM so duplicates aren't created and changes made in one system will be reflected in the corresponding case/ticket in the other system.

Import Solution into CRM

Either the managed or unmanaged solution can be imported with the main difference being an unmanaged solution can be modified after it is imported.  The screenshots show importing an managed solution.
Steps to Import
  1. Download the "Zendesk_1_0_managed.zip" file.
  2. In CRM, navigate to Settings > Solutions > Import and select the zip file downloaded in step 1
  3. Publish the solution

Create Custom Field In Zendesk

Because Zendesk tickets use a number as the unique identifier but CRM's caseID has letters and numbers, we need to add a caseID field into Zendesk. 
Steps to Import
  1. Browse to "https://{company}.zendesk.com/agent/admin/ticket_fields", where {company} is the name of your zendesk company.
  2. Click "Add custom field" and choose "text".
  3. Type "zendeskCRMCaseID" as the title for agents and for end-users, and check the visibility checkbox.

Import and customize the Connector methods

Importing Zendesk REST methods

The REST settings define how SmartConnect makes calls to the Zendesk API. After the methods are imported, the authorization key needs to be imported and several constants need to be set before any successful API calls can be made.
Steps to Import
  1. Click on the “Maintenance” tab within SmartConnect
  2. Click the “Import” button within the REST Connector section
  3. Browse to and select the “REST_Connector_Zendesk.xml” file for the import
  4. Mark the Zendesk service provider box for import
  5. Click the “Import” button to bring in the service provider definition

REST Parameter Setup

There are 5 Parameters that are used by the Zendesk Service Provider. To view the parameters, browse to the Maintenance tab, click the Service Providers button on the ribbon and select the Parameters tab. To modify these parameters, double click a parameter and change the "Default Value" on the pop up window.
  • Authorization - Holds the security token information. This is set up using Postman (described below).
  • company - Defines the company name to be used as the subdomain. For example, a URL of https://eone.zendesk.com/ would set the default value to "eone".
  • pageNum - Used by bulk maps that have multiple pages of results. Zendesk limits results to 100 records, so pageNum is auto-incremented to return all results sequentially. This parameter does not need to be modified.
  • role - This field is appended to web requests that return all users from Zendesk. This parameter is used by maps that transfer Zendesk users to CRM contacts. The three types of roles are "end-user", "agent", and "admin". If you would like to return all Zendesk users, leave this field blank. If you would like to return just end-users, enter "role=end-user". If you would like to return two types, enter "role[]=admin&role[]=end-user". For more information on setting up role filters, see the the Zendesk developers documentation.
  • unix_time - Unix time is used to return results that are incremental exports and filter results by only returning results after a specified time. Change maps sending data from Zendesk to CRM automatically update this field to the last successful run time of the map, so nothing needs to be entered here.


Finding Authorization key using Postman

Postman is a tool that that can be used to test web services by making (and saving) web requests. Postman can be installed by browsing to https://www.getPostman.com/apps.
Finding Auth Key Steps
  1. From within Postman, enter a GET request (we aren't sending anything, so just make sure the field isn't blank).
  2. Double-click the “Authorization” tab
  3. Enter your username and password using Basic Auth, and click the “Update Request” button to add a custom header with authorization information
  4. Within Postman, click the "Headers(1)" tab and copy the "Value" field next to the "Authorization" key.
  5. Within SmartConnect on the Maintenance tab, click the Service Providers button on the ribbon.
  6. Select Zendesk from the list of providers, and browse to the Parameters tab.
  7. Double click the Authorization parameter. Select the "Default Value" cell and paste the value that was copied in from Postman.

Importing Maps and Configuring Saved SQL Connections

Importing the maps and configuring the saved SQL connection is the last step to set up. Note that there are bulk maps and real-time/change maps going both ways, so not all maps will be used.  The MSSQL Server connector is used in pre-map tasks to update different parameter values, such as the pageNum and unix_time variables.  The ODBC Data Source is used in the "ZENDESK_CUSTOM_FIELDS" map.
Importing the SmartConnect Maps
  1. Click on the “Maintenance” tab within SmartConnect
  2. Click the “Import Wizard” button within the SmartConnect Maintenance section
  3. Select the “Zendesk_Crm_Maps.sce” file and import its contents
Configuring Saved SQL Connections
  1. Navigate to the Maintenance tab within SmartConnect.
  2. Click on the “MSSQL Defaults” button and then double-click the “SMARTCONNECT” item to open it.
  3. Update the connection information in the SQL connection to point to the correct SmartConnect server and database and then save the changes.
  4. Click on the "ODBC Data Source" button and then double-click the "smartconnect_ODBC" item to open it.
  5. Update the connection information in the SQL connection to point to the correct SmartConnect server and database and then save the changes.

Running Maps

The maps can be grouped by the end points they integrate together (excluding the "Zendesk Custom Fields" map that runs one time). Each set has bulk maps and change/real-time versions. Bulk maps going from Zendesk to CRM have two maps that reference each other. The map pair allows sending more than 100 records. The "CHANGE_" maps send data from Zendesk to CRM and are intended to be scheduled to run as often as every 5 minutes. All real-time maps send data from CRM into Zendesk and begin with "RT_" in the mapID.

A general description of the map types are listed below.  For the initial setup, the maps should be run in the following order:
  1. ZENDESK_CUSTOM_FIELDS
  2. BULK_CRM_ACCOUNTS_TO_ZENDESK_ORGS
  3. BULK_ZENDESK_ORGS_TO_CRM_ACCOUNTS
  4. BULK_CRM_CONTACTS_TO_ZENDESK_USERS
  5. BULK_ZENDESK_USERS_TO_CRM_CONTACTS
  6. BULK_CRM_CASES_TO_ZENDESK_TICKETS
  7. BULK_ZENDESK_TICKETS_TO_CRM_CASES
After the bulk maps have been run, the real-time and change maps can be ran.
  • Zendesk_Custom_Fields
    • The zendesk ticket has a custom field for the case number. When that field is added manually, it is given a field ID that we need to know in order to map anything to the field. Instead of hard-coding this ID into maps, a global variable called GBL_ZENDESKCRMCASEID is used in maps to identify the case number custom field in Zendesk. This map updates the global variable and only has to be run one time after the Zendesk field is created.
  • Zendesk Organizations/CRM Accounts
    • Has 5 maps in total
    • The Zendesk organization ID is imported into a custom field in CRM. The custom field is created when the CRM solution (provided above) is published.
  • Zendesk Users/CRM Contacts
    • Has 5 maps in total
    • The Zendesk User ID is imported into a custom field in CRM, however, maps sending data from CRM into Zendesk use the contact's email address to identify the user.
  • Zendesk Tickets/CRM Cases
    • Has 7 maps in total
    • The Zendesk ticket ID is imported into a custom field in CRM.
    • The CRM case number is imported into a custom field in Zendesk. Maps use the ticket ID or case number to identify each record.
    • There are 4 real-time/change maps because both systems auto-generate a unique identifier when creating a new record. Once a new record is created, a second map will send the new unique identifier into the other system.
    • If a case is created in CRM, the RT_CRM_CASE_TO_ZENDESK_TICKET map will create a new ticket in Zendesk. Once the CHANGE_UPDATE_CRM_CASE map runs, the newly created zendesk ticket ID will be sent over to the corresponding CRM case.
    • If a ticket is created in Zendesk, the CHANGE_ZENDESK_TICKETS_TO_CRM_CASES map will create a new case in CRM. The newly created CRM case will trigger the RT_UPDATE_ZENDESK_TICKET map, which sends the case number back to the corresponding Zendesk ticket.

Free 30 Day Trial

Free 30 Day Trial