Skip to main content

Freshdesk

Introduction

The Freshdesk integration in 1Gateway allows you to send tickets, updates, comments, and attachments into Freshdesk (outbound) and receive them from Freshdesk (inbound). Inbound can be set up either with a webhook or with a poller. The integration uses the Freshdesk REST API and includes options for authentication, feedback handling, and timing controls.

Prerequisites

Add Freshdesk user

A user needs to be configured in Freshdesk in order to retrieve and insert tickets into Freshdesk. If both Inbound and Outbound plugins are used, only one user needs to be configured for both plugins.

Outbound

Outbound Description

The Freshdesk Outbound plugin creates and updates incidents in Freshdesk. The messages, comments and attachments are sent from 1Gateway into Freshdesk through the REST API.

This outbound plugin is supported from version 4.1.5 of 1Gateway and higher.

Outbound Configuration

Freshdesk uses Basic authentication credentials with:

  • User: API key for the 1Gateway user in Freshdesk.
  • Password: X
info

To find the API key for your 1Gateway user in Freshdesk, follow these instructions https://support.freshdesk.com/support/solutions/articles/215517-how-to-find-your-api-key

These are the configuration fields needed to connect to Freshdesk:

Freshdesk config

FieldSupported ValuesDescriptionExample
Freshdesk API URLValid URLFreshdesk server connectionhttps://YourCompanyName.freshdesk.com/api/v2
CredentialsAny stringFreshdesk credentials referencefreshdesk
Freshdesk Group IDAny stringDefault group to assign the ticket in Freshdesk, will be applied if the group ID is not present (optional, will stay empty if not set)6000212268 (Technical team)
info

In order to find out the group ID, use a rest client (e.g. Postman) and do a GET request with basic authentication to your freshdesk URL with the following: <your-freshdesk-url>/api/v2/groups

These fields define optional behaviors and timing controls for handling messages and feedback:

Freshdesk config

FieldSupported ValuesDescription
Use user exit scriptTrue/FalseIf true use a custom script that runs after a message has been processed
Use validations scriptTrue/FalseIf true applies custom message validation before processing the message; Defined in Profiles/ValidationScript
Record insert feedbackTrue/FalseAdd feedback to ticket on insert
Record update feedbackTrue/FalseAdd feedback to ticket on update
Record error feedbackTrue/FalseAdd feedback to ticket on error
Delay between rest callsIntegerDelay in seconds between REST calls to the Freshdesk API

Inbound

Inbound Description

There are two options when configuring the Freshdesk Inbound connection, either through a webhook configured in Freshdesk or by polling for them, you can use one method or the other.

This Inbound plugin is supported from version 4.1.5 of 1Gateway and higher.

Inbound Webhook configuration

If configured, Freshdesk pushes new tickets and updates directly to 1Gateway as they occur. A webhook in Freshdesk needs to be configured according to your company's requirements, for example:

Webhook configuration in Freshdesk

info

To learn how to setup a webhook in Freshdesk follow the instructions here, https://suretriggers.com/docs/how-to-set-up-webhooks-in-freshdesk/

Freshdesk config

FieldSupported ValuesDescription
Message typeAny stringType of message retrieved from Freshdesk
Product nameAny stringFreshDesk
ID locationAny stringLocation of Ticket ID in the message
Partner IDTrue/FalseID of the partner that should recieve the tickets (for 1Bonding use cases)

Freshdesk config

FieldSupported ValuesDescription
Use override scriptTrue/FalseRun override script for customized integrations
Delay between rest callsIntegerDelay in seconds between REST calls to the Freshdesk API

Inbound Poller configuration

1Gateway periodically checks Freshdesk for new tickets, updates, comments, and attachments.

To setup a Poller go to the Profiles section of your plugin and click on:

Profile configuration

Once you've given it a name complete the following fields:

poller configuration for Freshdesk

FieldSupported ValuesDescription
Query used to poll for ticketsFreshdesk filter languageQuery used for polling, default is filter by group and incident ticket type (group_id:6000212268 AND type:INC) fill in the correct Group ID and ticket type
Poll since X days agoIntegerIn the first poll cycle, poll for messages that are newer than value
msgtypeAny stringThe message type should define the format and context of the data carried in the message, for use in the message flow (e.g. FreshdeskIncident)
Partner IDIntegerID of the partner that should recieve the tickets (1Bonding only)
Run interval in secondsIntegerPolling interval in seconds, default is 300 seconds