The following APIs help you incorporate custom functionalities in your extension when certain events occur in your help desk portal.
Ticket Events
You can configure extensions to receive information when an event, such as adding a comment to a ticket or opening a different ticket occurs on the ticket detail page.
When a user adds a comment to a ticket from UI, the ticket_comment.add event is broadcast along with comment details.
Code Format:
- App.instance.on("ticket_comment.add", function(data){
- //data gives the comment detail
- })
The response/data sent to the extension will be in the following format.
- {
- commentId: "219cc630fdfdef9ad7bf564c20e4e7d0",
- isPublicComment: false,
- displayTime: "9 Jan 2018 12:25 PM",
- displayName: "Name",
- comment: "Test Comment"
- }
On Moving From One Ticket To Another
When the user clicks a different ticket in the All Tickets view on the left pane, the ticket_Shift event is broadcast.
Code Format:
- App.instance.on("ticket_Shift", function(data){
- //data provides status of ticket change as true
- }
The response/data sent to the extension will be in the following format.
On Changing The Due Date Of A Ticket
When user changes due date of a ticket from UI, the ticket_dueDate.changed event will broadcast with details of the new due date.
- App.instance.on('ticket_dueDate.changed', function(data){
- //data gives the duedate changed
- })
The response/data sent to the extension will be in the following format.
- {"ticket.dueDate":"08/15/2018 12:00 PM"}
On Changing The Priority Of A Ticket
When user changes priority of a ticket from UI, the ticket_priority.changed event will broadcast with details of the updated priority value.
- App.instance.on('ticket_priority.changed', function(data){
- //data gives the priority changed
- })
The response/data sent to the extension will be in the following format.
- {"ticket.priority":"Low"}
On Changing The Classification Of A Ticket
When user changes classification of a ticket from UI, the ticket_classification.changed event will broadcast with details of the updated classification value.
- App.instance.on('ticket_classification.changed', function(data){
- //data gives the classification changed
- })
The response/data sent to the extension will be in the following format.
- {"ticket.classification":"Feature"}
On Changing The Product Associated With A Ticket
When user changes product associated with a ticket from UI, the ticket_productName.changed event will broadcast with details of the updated product.
- App.instance.on('ticket_productName.changed', function(data){
- //data gives the productname changed
- })
The response/data sent to the extension will be in the following format.
- {"ticket.productName":"Finance"}
On Changing The Phone Number In A Ticket
When user changes phone number of a ticket from UI, the ticket_phone.changed event will broadcast with details of the new phone number.
- App.instance.on('ticket_phone.changed', function(data){
- //data gives the phone changed
- })
The response/data sent to the extension will be in the following format.
- {"ticket.phone":"1 888 900 9646"}
On Changing The Status Of A Ticket
When user changes status of a ticket from UI, the ticket_status.changed event will broadcast with details of the updated status.
- App.instance.on('ticket_status.changed', function(data){
- //data gives the status changed
- })
The response/data sent to the extension will be in the following format.
- {"ticket.status":"On Hold"}
On Changing The Spam Status Of A Ticket
When user changes spam status of a ticket from UI, the ticket_isSpam.changed event will broadcast with details of the updated status.
App.instance.on('ticket_isSpam.changed', function(data){
- //data gives the spam status changed
- })
The response/data sent to the extension will be in the following format.
Call Events
You can also configure extensions to receive information when a call-related event occurs in your help desk portal.
On Receiving A Call
When an agent receives a call, the call.ringing event is broadcasted along with the phone number of the contact. Contact ID is included if the contact already exists in your portal.
- App.instance.on('call.ringing', function(data){
- //data gives the call information
- })
The response/data sent to the extension will be in the following format.
- {"contactId":"123456789", "number": "9876543210"}
On Answering A Call
When an agent answers a call, the call.answered event is broadcasted along with the phone number of the contact. Contact ID is included if the contact already exists in your portal.
- App.instance.on('call.answered', function(data){
- //data gives the call information
- })
The response/data sent to the extension will be in the following format.
- {"contactId":"123456789", "number": "9876543210"}
On Completing A Call
When an agent completes the conversation with the customer and disconnects the call, the call.completed event is broadcasted along with the phone number of the contact. Contact ID is included if the contact already exists in your portal.
- App.instance.on('call.completed', function(data){
- //data gives the call information
- })
The response/data sent to the extension will be in the following format.
- {"contactId":"123456789", "number": "9876543210"}