Overview:
Helpy includes the ability to integrate with external services using an event system called triggers. With triggers, you can instruct Helpy to respond to specific events like new tickets, closing tickets and more, in turn delivering a JSON package (webhook) to the URL(s) of your choosing. This is different from our REST API where you make a request to a specific endpoint, and Helpy responds with a JSON document.
Some examples of the kind of integrations made possible are:
- Sync multiple systems together. When an agent marks a billing issue ticket resolved, a webhook is sent to your main account system changing the status of the customer.
- When a ticket is assigned, a webhook is sent to a billing system to charge the client for a support incident.
- When a new ticket is received, a webhook is sent to a notification system to alert the team through various means.
Setting it up:
There are two main things you need to do to send up webhook triggers: 1. Create the triggers in Helpy through the admin UI, and 2. Set up your system to respond to the JSON POST sent by Helpy.
- To create the trigger in Helpy, first go to the settings control panel and locate the “Triggers” item. On clicking this, you will need to select “New Trigger” in the upper right.
- Next choose the event you would like to respond to. This could be when a new ticket is created, or when a ticket has been assigned to an agent, or several options.
- Specify conditions for your event to limit your webhook to firing only when certain circumstances occur- “VIP customer” and the message includes “billing” for example.
- Next in the actions sections, you will need to choose JSON and provide a URL that Helpy will POST a JSON object to. The URL must be https.
The JSON:
Every time a webhook trigger is fired, Helpy sends a full JSON representation of the Ticket object and any replies (posts) that are attached to it. Example:
{
"event": "assigned_group",
"id": 2,
"user_id": 3,
"name": "About Helpy",
"body": [
{
"id": 2,
"topic_id": 2,
"user_id": 3,
"kind": "first",
"active": true,
"created_at": "2016-07-09T23:39:35.378Z",
"updated_at": "2016-07-09T23:39:35.378Z",
"points": 0,
"attachments": [],
"cc": null,
"bcc": null,
"raw_email": null,
"escaped_body": "This is the main ticket body"
},
{
"id": 30,
"topic_id": 2,
"user_id": 1,
"kind": "reply",
"active": true,
"created_at": "2017-01-14T22:49:07.641Z",
"updated_at": "2017-01-14T22:49:07.641Z",
"points": 0,
"attachments": [],
"cc": null,
"bcc": null,
"raw_email": null,
"escaped_body": "This is a reply."
},
{
"id": 420,
"topic_id": 2,
"user_id": 1,
"kind": "note",
"active": true,
"created_at": "2017-03-14T03:06:26.464Z",
"updated_at": "2017-03-14T03:06:26.464Z",
"points": 0,
"attachments": [],
"cc": null,
"bcc": null,
"raw_email": null,
"escaped_body": "This message has been closed by the support staff"
}
],
"status": "closed",
"assigned_user_id": 1,
"team_list": [
"top"
],
"channel": "email",
"kind": "ticket"
}