Create and Manage Webhooks

A Webhook, also called a web callback or HTTP push API, is a way for an app to provide other applications with real-time information. WebHooks allow you to integrate with external applications or trigger an external workflow when specific events happen in the publisher application.

This feature is available for all plans.

HappyFox WebHooks contain information pertaining to a ticket when the following events happen:

  • A ticket is created in HappyFox.
  • A ticket is edited in HappyFox.
  • When a smart-rule is triggered in HappyFox.

To enable integration with Webhooks, do the following:

  • Log in to HappyFox.
  • Go to Apps >> Goodies >> Webhooks.
  • Click "Install"

  • Make Sure " Webhook Active" drop-down is "yes". Also, note down your webhook key.

 

Setting up a Webhook and Trigger options:

While creating a Webhook URL, you can specify whether the webhook should be triggered during ticket creation or ticket update. Once defined and saved, a webhook URL will be triggered only when a ticket is updated or created or both (As Specified).

What will I receive at the remote end?

You will receive a JSON representation of the ticket details along with information about the type of event (Ticket created or ticket updated). You can receive the call at your end and perform an appropriate action.

Webhooks and Smart rules

You can now even configure a webhook as a Smart rule action. This way, you can integrate with an external service whenever certain conditions are met on one or more tickets.

Steps:

  • Go to Automate >> Smart Rules.
  • Click " Create a Smart Rule".
  • Choose "Trigger Webhook' as the action to be performed by the Smart Rule.
  • Enter the Webhook URL.
  • Define conditions that govern when the Smart Rule should be triggered automatically.
  • Enter name and description for the Smart Rule. Choose applicable categories and associate an appropriate Work Schedule.
  • Click "Finish Creating a Smart Rule".

Webhooks log

HappyFox also keeps a log of all the webhooks sent with the time stamps. You can see the webhook details in the log section too. in the event that some webhooks have failed to post, you can select them from the logs and resend them.

Sample webhook JSON data

Webhooks Key

In the webhook payload, a field called "uuid", will be seen and this field is uniquely generated for every request. We (HappyFox) sign (HMAC-SHA1) every request payload (which contains this uuid field) with the key mentioned in the Apps>>Goodies>>Webhooks page, and we display the subsequent signature of each request with the associated payload in our Webhooks log page.

This can be used to verify that this webhook was in fact sent from HappyFox's server. No specific action is required for this with each request. As a side note, this uuid field from the request can be stored and compared to ensure that each request is processed only once, if required.

Manage Webhooks:

Once you have created webhooks, you can choose to manage them.

  • Go to Apps >> Goodies >> Webhooks.
  • Click "Manage".
  • Choose to "Activate/Deactivate", "edit" or "delete" individual webhooks that you have created.

  • 128
  • 03-Oct-2018
  • 5109 Views