Connectors / Service / FreshService

FreshService

FreshService

Freshservice is a cloud-based IT Help Desk and service management solution.

Overview

Freshservice is a cloud-based IT Help Desk and service management solution that enables organizations to simplify their IT operations. The solution offers features that include a ticketing system, self-service portal, and knowledge-base.

Authentication

Within the workflow builder, highlight the FreshService connector.

In the FreshService connector properties panel to the right of the builder, click on the Authenticate tab and the 'New authentication' button. This will result in a Tray.io authentication pop-up modal.

Name the authentication something that will easily identify it in a larger list. For example using the name of the service account, whether it is a Sandbox or Production OAuth, etc.

When choosing between the type of authentication you wish to create ('Personal' or 'Organisational'), consider who and how many people will need access to it.

The next page asks you for your 'Access token' and 'Domain' credentials.

To get the 'Domain', head to your FreshService account and sign in. Select the URL of the FreshService account.

The URL will be similar to: https://trayio-org.myfreshservice.com/crm/sales/.

The Domain is the hash between https:// and .myfreshservice.com.

In this case, the Domain is: trayio-org.

To get the 'API key' on your FreshService account, click on your profile picture on the top right corner of your portal. Go to the 'Profile Settings' page.

Your API key will be available below the 'Delegate Approvals' section to your right.

Once you have added these fields to your Tray.io authentication pop-up window, click the 'Create authentication' button.

Go back to your settings authentication field (within the workflow builder properties panel), and select the recently added authentication from the dropdown options now available.

Your connector authentication setup should now be complete.

Available Operations

The examples below show one or two of the available connector operations in use.

Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.

Example Usage

TRAY POTENTIAL: Tray.io is extremely flexible. By design there is no fixed way of working with it - you can pull whatever data you need from other services and work with it using our core and helper connectors. This demo which follows shows only one possible way of working with Tray.io and the FreshService connector. Once you've finished working through this example please see our Introduction to working with data and jsonpaths page and Data Guide for more details.

Below is an example of a way in which you could potentially use the FreshService connector, to create tickets and then send notifications for the newly created tickets on chosen Slack channel.

PLEASE NOTE: In these examples, we show data being received via the Webhook trigger - i.e. a scenario whereby you have configured an external service to automatically send new record data to your Tray.io workflow. In practice, you can receive data in any structure, and in other ways, such as from any pre-built Tray.io service trigger or from a previous workflow step that has pulled data from another source (e.g., Salesforce 'Find Records', CSV Reader, etc.)

The steps will be as follows:

  1. Setup using a Webhook trigger and fetch data.
  2. Loop through the fetched data using a Loop connector.
  3. Create tickets in Freshservice based on the looped data.
  4. Send messages on the selected Slack channel for the newly created tickets.

The following workflow demonstrates one approach to achieving this:

1 - Setup Trigger

Setup using a trigger (Webhook in this case) to fetch the data.

The data received through the Webhook trigger is in JSON format:

[{
"email": "emaggorini0@census.gov",
"subject": "Health Benefits",
"description": "Request information about employee health benefits."
}, {
"email": "lfisher1@feedburner.com",
"subject": "Incorrect information",
"description": "Correct the authentication information in Redshift docs."
}, {
"email": "dgoodridge2@nature.com",
"subject": "Update",
"description": "Update operation references."
}]

Feel free to re-name your steps as you go along to make things clearer for yourself and other users. The operation names themselves often suffice.

2 - Loop fetched data and create tickets

Loop is set to 'Loop List' the data received from the trigger.

A jsonpath for the 'List' field should appear similar to this: $.steps.trigger.body. You can always use a connector-snake to find the jsonpath.

JSONPATHS: For more information on what jsonpaths are and how to use jsonpaths with Tray.io, please see our Intro page and Data Guide for more details.
CONNECTOR-SNAKE: The simplest and easiest way to generate your jsonpaths is to use our feature called the Connector-snake. Please see the main page for more details.

Create ticket is a Freshservice operation that creates a new ticket in your service desk based on the provided information.

The following fields are receiveing information from the Loop step:

  • Email: $.steps.loop-1.value.email
  • Subject: $.steps.loop-1.value.subject
  • Description $.steps.loop-1.value.description

Once the ticket is created, the details for the newly created ticket would look like this:

Click on the Debug tab to view Input and Output for individual steps.

3 - Send a message on the Slack channel

Send message sends a message on the selected Slack channel.

The content of the 'Message' sent on the Slack channel contains jsonpaths for the attributes from the previous step. These jsonpaths provide information like the subject and ID of the newly created ticket.

The jsonpaths are specified in interpolated mode, i.e., wrapping the jsonpaths in curly brackets:

```
A new ticket is created.
Subject: {$.steps.freshservice-1.item.helpdesk_ticket.subject}
ID: {$.steps.freshservice-1.item.helpdesk_ticket.id}
```
INTERPOLATION: When you wish to include JSON generated data within another input/ output/ result, use our Interpolation method as described here.

The final message sent on the Slack channel would look like this:

BEST PRACTICES: Whenever you do decide to create your own workflow, please make sure you take a look at our Managing data best practices guide.

All Operations

Latest version:

1.0