In this article you will learn how to connect Next Matter to Freshdesk and see some typical use cases.

If you are looking for a solution to trigger Next Matter processes automatically from Freshdesk under certain conditions, please check this article instead.

Launch Next Matter processes from Freshdesk

  1. Create your Freshdesk API key

  2. Connect Next Matter with Freshdesk

    1. Display ticket information in Next Matter

    2. Updating the ticket with an internal note

    3. Updating a custom field on the ticket

Step 1: Create your Freshdesk API key

API keys are necessary so that the Next Matter process can authenticate itself when communicating with Freshdesk. You can obtain your API key by following these steps

How to find your API key

Once you have found your key, Freshdesk requires that you encode it with a tool like

https://base64encode.org

Simply enter your API key in the format APIkey:X and press on "encode". So if your API key is 12345 you need to enter 12345:X. Save the resulting string, it will be needed for the authentication of Next Matter.


Step 2: Connect Next Matter with Freshdesk

Once you have the authentication string you can connect your Next Matter processes with Freshdesk. This section will show you how to create "Integration Steps" in your process for three typical use cases

  • displaying ticket information in your Next Matter process

  • updating the ticket with an internal note

  • updating a custom field on the ticket

You can also use our step templates to create the required steps. The template will create steps for getting ticket information and for updating information on the ticket.

1. Display ticket information in Next Matter

Select the Next Matter process that should integrate with Freshdesk, open the editor and add a new "Integration Step" at the right point in the process. Configure the step:

Method GET and URL

https://your_freshdesk_subdomain.freshdesk.com/api/v2/tickets/{{instance_name}}

The ticket id will be taken from the name of the Next Matter instance. You can also use "data reference" to access the ticket id from any other step in your process

Add a header

Key             Value
Authorization encoded api key from step 1

Finally, add variables in the section "Response data for use in later steps". This will allow you to reference the ticket information in later steps and display it. To map the ticket description add

Name         Value
description $.description

Now to display the ticket information create a new "Action Step" and add a "Instruction" action. By using the data reference functionality in the text editor you can access any ticket information you mapped in the previous step.


2. Updating the ticket with an internal note

Select the Next Matter process that should integrate with Freshdesk and open the editor. Before creating the "Integration Step" for the ticket update, first create an "Action Step" with a "Text Input" action. You can use this text input to define the text that you want to update the ticket with.

Now add a new "Integration Step" at the right point in the process. Configure the step:

Method PUT and URL

https://your_freshdesk_subdomain.freshdesk.com/api/v2/tickets/{{instance_name}}/notes

The ticket id will be taken from the name of the Next Matter instance. You can also use "data reference" to access the ticket id from any other step in your process

Add a header

Key             Value
Authorization encoded api key from step 1
Content-Type application/json

Add a body. This will set the information to update the ticket with. You can reference the previous step to get the text to update the ticket with.

{"body": "use data reference function here"}


3. Updating a custom field on the ticket

In this example we will update a custom field "Next Matter URL" on your ticket in Freshdesk. Next Matter will write the url of the process instance into this field. This can be useful if you want to filter tickets that have already been send to Next Matter.

Add a new "Integration Step" at the right point in the process. Configure the step:

Method PUT and URL

https://your_freshdesk_subdomain.freshdesk.com/api/v2/tickets/{{instance_name}}/

The ticket id will be taken from the name of the Next Matter instance. You can also use "data reference" to access the ticket id from any other step in your process, if necessary.

Add a header

Key             Value
Authorization encoded api key from step 1
Content-Type application/json

Add a body. This will set the information to update the ticket with. You can reference the previous step to get the text to update the ticket with.

{"custom_fields":{"cf_next_matter_url":"{{instance_url}}"}}

Did this answer your question?