---
title: Freshdesk Integration
slug: freshdesk-integration
createdAt: 2020-05-20T06:25:10.000Z
---

## Introduction

The requirement is to automate sending an NPS survey invite when a ticket is marked as resolved or closed. 

This automation can be achieved using the 'Observer' automation rule provided by Freshdesk. This feature is however only available to paid Freshdesk users. 

## Requirement flow

The basic flow of events would be as following:

1.
2.
3.
4.
5.

## Configuration steps

You can refer Freshdesk [help document for detailed understanding. ](https://support.freshdesk.com/support/solutions/articles/50000000042-what-s-changed-in-automations)

1. Within FreshDesk, click `Admin > Automations` (under Helpdesk Productivity section)
2. Click `Create New Rule` under Ticket updates tab&#x20;
3. Enter the following in your new rule setup:
   1. Rule Name: Omoto NPS Webhook
   2. Description: Wehbook for Omoto NPS triggers
   3. When any of these events occur: Status is changed from "Any Status" to "Closed"
   4. And the events are performed by: any
   5. On tickets with these properties: this can be left as default.
   6. Perform these actions: Trigger WebHook (screenshot shared below)
   7. Request Type: POST&#x20;
   8. URL: `Omoto team will provide you with a unique URL for your account that can be used here`&#x20;
   9. Encoding: JSON
   10. Content: Advanced
   11. Add JSON content: `sample shared below --> use Freshdesk placeholders to insert appropriate values in the JSON.` &#x20;
4. Click Save to save the automation.

::Image[]{src="https://p112.p2.n0.cdn.getcloudapp.com/items/5zu1qBkr/Image%202020-05-20%20at%2012.18.31.png?v=2fc31697c6dd414aa052b8e713d9339a" size="94" caption="Creating a webhook call in Freshdesk" position="center" showCaption="true"}

```javascript
[
  {
    "personalinfo": {
      "firstname": "{{ticket.contact.name}}",
      "lastname": "",
      "mobileno": "{{ticket.contact.phone}}",
      "email": "{{ticket.contact.email}}",
      "regid": "{{ticket.id}}"
    },
    "qualifyinginfo": [
      {
        "name": "unitname",
        "value": "Omoto-to-provide"
      },
      {
        "name": "product",
        "value": "Jeeves"
      },
      {
        "name": "genre",
        "value": "Comedy"
      },
      {
        "name": "author",
        "value": "PG Wodehouse"
      }
    ]
  }
]
```

## Next step

Once configuration is done, Omoto will start sending NPS email invite for every ticket closed in Freshdesk. 

Additional rule of cool-off period can be setup in Omoto to avoid over surveying your customers. 



:::hint{type="info"}
## Sometimes the webhook configuration doesn't work out of the box.

In such a situation, we recommend getting in touch with Freshdesk's support team. They will help you enable the webhook or resolve issues with the webhook configuration.&#x20;
:::

