Integrations

ServiceNow Freshdesk Integration Guide

intermediateAPI Key in headerFreshdesk

The ServiceNow-Freshdesk integration enables seamless bi-directional synchronization of support tickets between ServiceNow's incident management module and Freshdesk's customer support platform. This integration addresses the common challenge faced by enterprise IT teams who use ServiceNow for internal IT service management while customer support teams rely on Freshdesk for external customer interactions. By connecting these systems, organizations eliminate duplicate data entry, reduce response times, and ensure consistent customer experiences across support channels. The integration supports both real-time webhook-driven updates and scheduled batch synchronization, with data flowing bi-directionally between Freshdesk tickets and ServiceNow incidents. Primary automation patterns include webhook triggers for high-priority ticket creation, automated agent assignment based on skill matching, and escalation workflows that seamlessly hand off complex issues from customer support to IT operations teams within ServiceNow's Incident Management module.

Prerequisites

  • ServiceNow Vancouver or later with Integration Hub Professional license
  • Freshdesk Estate plan or higher for API access and webhook configuration
  • System Administrator role in ServiceNow for credential management and REST message configuration
  • Account Administrator role in Freshdesk for API key generation and webhook setup
  • Valid SSL certificates configured on both platforms for secure API communication
  • MID Server installed and operational if integrating with on-premises Freshdesk deployment
  • Integration Hub plugin (com.glide.integration_hub) activated in ServiceNow

Architecture Overview

The integration leverages ServiceNow's native REST capabilities combined with the Integration Hub Freshdesk spoke (if available) or custom RESTMessageV2 configurations to establish secure API communication with Freshdesk's REST API endpoints. Authentication is handled through API key-based authentication stored in ServiceNow's Connection & Credential Alias framework, with credentials encrypted at rest in the sys_credential table. Data flows bi-directionally with webhook triggers pushing real-time updates from Freshdesk to ServiceNow via Scripted REST APIs, while scheduled jobs in ServiceNow query and update Freshdesk tickets through outbound REST calls. A MID Server is not required for cloud-to-cloud communication but may be necessary for on-premises Freshdesk deployments or when implementing custom field mappings through transform maps. Rate limiting considerations include Freshdesk's API limits of 1000 requests per hour for Estate plans and ServiceNow's outbound HTTP request quotas, requiring implementation of retry logic and request queuing mechanisms.

Sourdough
Chrome Extension

Sourdough: ServiceNow Monitoring and Analytics

A Chrome extension for ServiceNow Admins and Developers with essential tools, analytics, graphs and monitoring features.

Instance HealthGraphs & ChartsAPI HealthDeveloper ToolsQuick SearchInstance Switcher
Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Implementation Steps

1

Generate Freshdesk API key and configure ServiceNow credentials

Log into your Freshdesk instance and navigate to Admin > API Settings to generate a new API key with full access permissions. Copy the generated API key and note your Freshdesk domain URL format (https://yourdomain.freshdesk.com). In ServiceNow, navigate to Connections & Credentials > Credentials and create a new Basic Auth credential record with your Freshdesk API key as the password and any placeholder text as the username (Freshdesk ignores the username field). Set the credential name to 'Freshdesk_API_Credential' and ensure the 'Active' checkbox is selected for proper credential resolution.

2

Create Connection Alias for Freshdesk API endpoint

Navigate to Connections & Credentials > Connection Aliases and create a new connection alias named 'Freshdesk_API_Connection'. Set the connection URL to your Freshdesk API base URL (https://yourdomain.freshdesk.com/api/v2/) and associate it with the credential created in the previous step. Configure the connection timeout to 30 seconds and set the authentication type to 'Use Credential' with the credential reference pointing to your Freshdesk_API_Credential. Test the connection using the 'Test Connection' button to verify authentication and network connectivity before proceeding.

3

Configure REST Message for Freshdesk API operations

Navigate to System Web Services > Outbound > REST Message and create a new REST Message record named 'Freshdesk Integration'. Set the endpoint URL to reference your connection alias using the format ${credentials:Freshdesk_API_Connection} and configure default authentication headers. Create HTTP methods for common operations including GET /tickets, POST /tickets, PUT /tickets/{id}, and GET /agents with appropriate content-type headers set to 'application/json'. Add the Authorization header with value 'Basic ${credentials:Freshdesk_API_Credential}' and configure variable substitutions for dynamic ticket IDs and filter parameters.

ServiceNow Script
var rm = new sn_ws.RESTMessageV2('Freshdesk Integration', 'get_tickets');
rm.setStringParameterNoEscape('ticket_id', current.correlation_id);
rm.setRequestHeader('Authorization', 'Basic ' + gs.base64Encode(gs.getProperty('freshdesk.api.key') + ':X'));
var response = rm.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
4

Build Scripted REST API for inbound Freshdesk webhooks

Navigate to System Web Services > Scripted Web Services > Scripted REST APIs and create a new API named 'Freshdesk_Webhooks' with base path '/api/x_custom/freshdesk_webhooks'. Create a POST resource named 'ticket_events' with relative path '/ticket_event' to handle incoming webhook payloads from Freshdesk. Configure the resource to accept application/json content and implement webhook signature verification using Freshdesk's webhook secret for security. Add logic to parse the webhook payload, extract ticket information, and either create new ServiceNow incidents or update existing ones based on correlation IDs stored in the correlation_id field.

ServiceNow Script
(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
    var payload = request.body.dataString;
    var ticketData = JSON.parse(payload);
    
    var gr = new GlideRecord('incident');
    gr.addQuery('correlation_id', ticketData.id);
    gr.query();
    
    if (!gr.next()) {
        gr.initialize();
        gr.correlation_id = ticketData.id;
        gr.short_description = ticketData.subject;
        gr.description = ticketData.description_text;
        gr.priority = mapFreshdeskPriority(ticketData.priority);
        gr.state = mapFreshdeskStatus(ticketData.status);
        gr.insert();
    }
    
    response.setStatus(200);
    response.setBody(JSON.stringify({status: 'success'}));
})(request, response);
5

Configure Freshdesk webhook endpoints and triggers

In your Freshdesk admin panel, navigate to Admin > Workflows > Automations and create a new automation rule for ticket creation events. Configure the webhook URL to point to your ServiceNow instance using the format https://yourinstance.service-now.com/api/x_custom/freshdesk_webhooks/ticket_event and include proper authentication headers. Set up webhook triggers for ticket creation, status changes, priority updates, and agent assignments with appropriate conditional logic to filter high-priority tickets. Generate and configure a webhook secret in Freshdesk, then store this secret in ServiceNow system properties for payload verification.

6

Implement scheduled synchronization job for bulk updates

Navigate to System Definition > Scheduled Jobs and create a new scheduled script execution job named 'Freshdesk Ticket Sync'. Configure the job to run every 15 minutes during business hours and implement logic to query recently modified incidents in ServiceNow that originated from Freshdesk. Use the REST Message configured earlier to push updates back to Freshdesk, including status changes, priority modifications, and resolution notes. Implement proper error handling with retry logic and logging to capture failed synchronization attempts in the system log for troubleshooting.

ServiceNow Script
var gr = new GlideRecord('incident');
gr.addQuery('correlation_id', '!=', '');
gr.addQuery('sys_updated_on', '>', new GlideDateTime().subtract(15 * 60 * 1000));
gr.query();

while (gr.next()) {
    var rm = new sn_ws.RESTMessageV2('Freshdesk Integration', 'update_ticket');
    rm.setStringParameterNoEscape('ticket_id', gr.correlation_id);
    
    var payload = {
        status: mapServiceNowStatus(gr.state),
        priority: mapServiceNowPriority(gr.priority),
        notes: gr.work_notes.toString()
    };
    
    rm.setRequestBody(JSON.stringify(payload));
    var response = rm.execute();
    
    if (response.getStatusCode() != 200) {
        gs.error('Failed to sync incident ' + gr.number + ' to Freshdesk: ' + response.getErrorMessage());
    }
}
7

Configure field mappings and transform maps

Navigate to System Import Sets > Transform Maps and create transform maps for Freshdesk ticket data conversion to ServiceNow incident format. Configure field mappings for standard fields including priority (Freshdesk 1-4 to ServiceNow 1-5 scale), status mappings between Freshdesk ticket statuses and ServiceNow incident states, and category mappings. Set up coalesce rules using correlation_id as the primary key to prevent duplicate incident creation and ensure proper record updates. Create JavaScript-based field transforms for complex mappings such as Freshdesk custom fields to ServiceNow choice lists and user assignments between systems.

ServiceNow Script
// Transform map script for priority mapping
function mapFreshdeskPriority(freshdeskPriority) {
    var priorityMap = {
        '1': '1', // Low -> Planning
        '2': '2', // Medium -> Low
        '3': '3', // High -> Moderate
        '4': '1'  // Urgent -> High
    };
    return priorityMap[freshdeskPriority.toString()] || '3';
}

// Usage in transform map field
answer = mapFreshdeskPriority(source.priority);
8

Test integration and implement error handling

Create test tickets in Freshdesk with various priority levels and statuses to verify webhook delivery and incident creation in ServiceNow. Monitor the System Log > All for any integration errors and verify that correlation IDs are properly maintained across both systems. Test bi-directional synchronization by updating incident states in ServiceNow and confirming corresponding ticket status updates in Freshdesk. Implement comprehensive error handling including HTTP timeout scenarios, authentication failures, and malformed payload processing with appropriate fallback mechanisms and administrator notifications.

ServiceNow Script
try {
    var rm = new sn_ws.RESTMessageV2('Freshdesk Integration', 'get_tickets');
    rm.setRequestHeader('Authorization', 'Basic ' + gs.base64Encode(api_key + ':X'));
    var response = rm.execute();
    
    if (response.getStatusCode() == 401) {
        gs.error('Freshdesk API authentication failed - check credentials');
        return false;
    }
    
    if (response.getStatusCode() >= 400) {
        gs.error('Freshdesk API error: ' + response.getStatusCode() + ' - ' + response.getBody());
        return false;
    }
    
    return JSON.parse(response.getBody());
} catch (ex) {
    gs.error('Freshdesk integration exception: ' + ex.getMessage());
    return null;
}

Common Use Cases

High-priority ticket escalation to ServiceNow IT operations

When customers report critical issues through Freshdesk (priority 4 - Urgent), webhooks automatically create corresponding Priority 1 incidents in ServiceNow with proper categorization and assignment to Level 2 support teams. The integration maintains full ticket history and enables seamless communication between customer-facing agents and internal IT specialists. This ensures rapid response to business-critical issues while maintaining complete audit trails across both platforms for compliance and reporting purposes.

Automated agent handoff for technical escalations

Customer support agents in Freshdesk can escalate complex technical issues by updating ticket categories, which triggers automatic assignment to specialized ServiceNow resolver groups based on predefined business rules. The integration transfers all customer context, conversation history, and relevant attachments to ensure continuity of service. Resolution updates from ServiceNow IT teams are automatically synchronized back to Freshdesk, keeping customer-facing agents informed of progress without requiring separate communication channels.

Bi-directional status synchronization for customer transparency

When ServiceNow incidents progress through workflow states (New, In Progress, Resolved, Closed), corresponding Freshdesk tickets automatically update their status to reflect current progress (Open, Pending, Resolved, Closed). This real-time synchronization ensures customers receive accurate status updates through Freshdesk's customer portal while internal teams work within ServiceNow's structured ITIL processes. Custom field mappings handle organization-specific status definitions and business logic.

Knowledge base article sharing between platforms

When ServiceNow knowledge base articles are created or updated for incident resolutions, the integration can automatically create corresponding solution articles in Freshdesk's knowledge base for customer self-service. This eliminates manual content duplication and ensures consistent information across both platforms. The synchronization includes article categorization, tagging, and approval workflows to maintain content quality and relevance for different audiences.

Customer satisfaction survey synchronization

Customer satisfaction scores and feedback collected through Freshdesk surveys are automatically synchronized to corresponding ServiceNow incident records for comprehensive service quality tracking. This integration enables unified reporting across customer-facing and internal support metrics within ServiceNow's performance analytics dashboards. Survey responses trigger automated workflows for follow-up actions when satisfaction scores fall below defined thresholds.

Troubleshooting

401 Unauthorized error when making REST calls to Freshdesk API

Check that your API key is correctly formatted and encoded in the Authorization header. Navigate to System Web Services > Outbound > REST Message and verify the authentication header uses the correct format: 'Basic [base64_encoded_api_key:X]'. Test the credential by logging into Freshdesk admin panel and regenerating the API key if necessary. Ensure the API key has sufficient permissions for the operations being performed (read/write access to tickets, contacts, and agents).

Webhook payloads received but no ServiceNow records created

Check the Scripted REST API logs in System Logs > All for JavaScript execution errors or parsing failures. Verify that the webhook URL in Freshdesk exactly matches your ServiceNow Scripted REST API endpoint including proper HTTPS protocol and correct path structure. Examine the webhook payload format by adding debug logging to capture the request body, then ensure your JSON parsing logic handles all expected Freshdesk field names and data types correctly.

Duplicate incidents created for the same Freshdesk ticket

Verify that the correlation_id field is properly populated and used as a coalesce key in your integration logic. Check your webhook processing script to ensure it queries for existing incidents using the Freshdesk ticket ID before creating new records. Review Freshdesk automation rules to prevent multiple webhook triggers for the same event, and implement idempotency checks in your ServiceNow processing logic using unique identifiers from the webhook payload.

Rate limiting errors causing failed API requests to Freshdesk

Implement exponential backoff retry logic in your scheduled synchronization jobs and add request throttling to stay within Freshdesk's API limits (1000 requests per hour for Estate plans). Check the Freshdesk API response headers for rate limit status and remaining quota information. Consider batching multiple updates into single API calls where possible, and stagger scheduled job execution times to distribute API usage throughout the day rather than making bulk requests simultaneously.

Field mapping errors causing incorrect data synchronization

Review your transform maps and JavaScript field mapping functions to ensure they handle null values and unexpected data formats gracefully. Check ServiceNow choice list values against Freshdesk field options to verify mapping accuracy, particularly for priority, status, and category fields. Add validation logic to your integration scripts to log mapping errors and fall back to default values when source data doesn't match expected formats or ranges.

Webhook signature verification failures blocking inbound requests

Ensure the webhook secret configured in Freshdesk matches the secret stored in your ServiceNow system properties or credential store. Implement proper HMAC-SHA256 signature verification in your Scripted REST API using the raw request body before JSON parsing. Check that your signature verification algorithm matches Freshdesk's implementation exactly, including proper encoding of the secret key and payload. Add debug logging to compare expected versus received signature values during troubleshooting.

Pro Tips

  • Implement field-level change tracking in your synchronization logic to avoid unnecessary API calls when only system fields (like sys_updated_on) change. Create custom update sets to track which fields actually contain business-relevant changes and only synchronize those modifications to Freshdesk, significantly reducing API quota consumption and improving integration performance.
  • Configure separate ServiceNow business rules with conditions to handle different Freshdesk webhook event types (ticket_created, ticket_updated, note_added) rather than processing everything in a single script. This approach provides better error isolation, easier debugging, and more granular control over integration behavior for different scenarios.
  • Set up monitoring dashboards using ServiceNow Performance Analytics to track integration health metrics including API response times, error rates, and synchronization delays. Create automated alerts when error thresholds exceed acceptable limits and implement health checks that proactively test API connectivity during maintenance windows.
  • Use ServiceNow's Integration Hub Flow Designer to create visual workflows for complex multi-step integrations rather than relying solely on scripted solutions. This approach provides better maintainability, easier troubleshooting through execution logs, and enables non-technical administrators to modify integration logic without custom scripting.
  • Implement comprehensive logging strategies using custom log tables to track all integration transactions with correlation IDs, timestamps, and payload data. This enables rapid troubleshooting of synchronization issues and provides audit trails for compliance requirements while keeping sensitive data separate from standard ServiceNow system logs.
  • Create custom ServiceNow notifications that alert administrators when Freshdesk tickets remain unsynced for extended periods, indicating potential integration failures or API quota exhaustion. Include automatic retry mechanisms with exponential backoff for transient failures while escalating persistent issues to support teams.

Known Limitations

  • Freshdesk's API rate limiting restricts Estate plans to 1000 requests per hour, which may be insufficient for organizations with high ticket volumes or frequent status updates. This limitation requires careful implementation of request batching, caching strategies, and priority-based synchronization to ensure critical updates are processed within quota constraints. Consider upgrading to higher-tier Freshdesk plans for increased API limits if integration requirements exceed these thresholds.
  • Real-time bi-directional synchronization can create infinite loops if both systems trigger updates simultaneously, requiring careful implementation of sync flags and timestamp comparisons to prevent circular updates. ServiceNow's webhook processing must include logic to detect and break sync cycles, potentially introducing slight delays in data consistency between platforms. This limitation necessitates thorough testing of all update scenarios during implementation.
  • Custom fields and complex data relationships in either platform may not have direct equivalents, requiring manual mapping decisions and potential data loss during synchronization. Freshdesk's limited custom field types compared to ServiceNow's extensive data model can constrain the richness of synchronized information. Organizations must carefully evaluate which data elements are essential for integration versus those that remain platform-specific.
  • ServiceNow's Integration Hub licensing requirements add cost considerations for organizations not already using Integration Hub features, as the professional license tier is typically required for production integrations. Alternative implementations using basic REST messages and scheduled jobs may have reduced functionality but lower licensing costs. Budget planning must account for both ServiceNow and Freshdesk licensing tiers that support necessary API features.
  • Large-scale historical data migration between platforms is not supported through standard API endpoints due to rate limiting and timeout constraints. Initial synchronization of existing tickets requires careful planning with incremental data loads and extended migration timeframes. Organizations implementing this integration should plan for parallel operation periods while historical data alignment is completed through batch processes.

Frequently Asked Questions

Can I sync custom fields between Freshdesk and ServiceNow incidents?

Yes, custom fields can be synchronized by modifying the field mapping logic in your transform maps and REST message payloads. Freshdesk custom fields are accessible through the API using the format 'custom_fields.field_name' and can be mapped to ServiceNow incident fields or custom fields you've created. You'll need to ensure data type compatibility and implement appropriate validation logic to handle cases where custom field values don't match between systems. Consider using ServiceNow's choice lists to standardize values that will be synchronized between platforms.

How do I handle agent assignment synchronization between both systems?

Agent assignment requires mapping Freshdesk agents to ServiceNow users, typically using email addresses as the common identifier. Create a mapping table or use transform map logic to correlate Freshdesk agent IDs with ServiceNow sys_user records, then update the assigned_to field when tickets are synchronized. You'll need to handle cases where agents exist in one system but not the other by implementing fallback assignment rules to default groups or users. Consider using ServiceNow's assignment rules and business rules to automatically route tickets based on categories rather than direct agent mapping for more flexible resource management.

What happens if the integration fails and creates data inconsistencies?

Implement comprehensive error handling with transaction rollback capabilities and maintain detailed integration logs for forensic analysis of failed synchronizations. Create ServiceNow scripts that can compare data between both systems and generate discrepancy reports highlighting records that are out of sync. Develop recovery procedures that can re-synchronize specific records or date ranges using correlation IDs as the primary key for matching records across platforms. Consider implementing a manual override mechanism that allows administrators to force synchronization of specific records when automated processes fail.

Can I trigger ServiceNow workflows based on Freshdesk ticket events?

Yes, Freshdesk webhook events can trigger ServiceNow workflows through business rules, Flow Designer flows, or custom script includes that execute when incidents are created or updated via the integration. Configure business rules with conditions that check for the presence of correlation_id fields to identify Freshdesk-originated incidents, then trigger appropriate ServiceNow workflows. You can also use Flow Designer to create visual workflows that respond to specific webhook events and implement complex business logic including approvals, notifications, and multi-step processes. Ensure proper error handling in workflows to prevent failures from breaking the integration synchronization process.

How do I test the integration without affecting production data?

Set up separate development instances of both ServiceNow and Freshdesk for testing, or use Freshdesk's sandbox environment if available with your subscription tier. Create test data sets with known values and configure the integration to use development API endpoints and credentials stored in separate Connection Alias records. Implement feature flags or system properties that can disable production synchronization while enabling test mode execution, and use ServiceNow's clone data functionality to create test environments with realistic data volumes. Consider using ServiceNow's automated testing framework to create repeatable test cases that validate integration functionality across different scenarios and data conditions.

Is there an official ServiceNow spoke available for Freshdesk integration?

As of current releases, ServiceNow does not provide an official certified spoke specifically for Freshdesk in the Integration Hub library. Organizations must implement custom integration solutions using ServiceNow's REST Message framework, Scripted REST APIs, and scheduled jobs as described in this guide. Check the ServiceNow Store and Integration Hub spoke catalog periodically for updates, as new spokes are regularly added based on customer demand. Third-party integration platforms like MuleSoft or Zapier may offer pre-built connectors, but these require additional licensing and architectural considerations for enterprise implementations.

What are the security considerations for this integration?

Implement secure credential storage using ServiceNow's encrypted credential framework and avoid hardcoding API keys in scripts or system properties. Configure webhook signature verification to ensure incoming requests are genuinely from Freshdesk and implement IP address whitelisting if supported by your network architecture. Use HTTPS for all API communications and consider certificate pinning for additional security in high-security environments. Regularly rotate API keys and webhook secrets according to your organization's security policies, and implement proper access controls to limit which ServiceNow users can modify integration configurations or view sensitive credential information.

Test Your Knowledge

Quick 3-question quiz — see how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue