Types of requests
Create a ticket
Parameter | Value |
---|---|
secret |
application id |
id |
ticket id |
status_id |
ticket's status id List of possible statuses:
|
subject |
Ticket subject |
client_id | client's ID |
assignee_id | id of the executor (agent) |
group | executer's id of the group |
last_updated_at | last ticket modification date |
channel_id | channel id |
clien't mail adress (from which he wrote) | |
published_at | ticket's creation date |
company_id | company's id (account) which the webhook came |
additional_id | additional ticket ID |
message | text of the client's message |
custom_fields |
List of fields and their values. Sent only when at least one of the fields is additional. Contains parameters:
|
custom_blocks |
List of additional system blocks, which contains parameters:
|
{ "secret":"0e8f678d8327eb3292a28c8165957b282a1b2f8b", "ticket":{ "id":"2261907", "status_id":"1", "subject":"First msg", "client_id":"242630", "assignee_id":null, "group":"0", "last_updated_at":"2016-12-17 14:07:33", "email":"jon@bonjovi.com", "published_at":"2016-12-17 14:07:33", "company_id":"153561", "additional_id":"123Ca344", "custom_fields":[ { "id":54, "name":"new item 2", "value":null } ], "custom_blocks":[ { "name":"Test", "url":"test", "secret_key":"dsf4354f=-213sdfasdsa" } ] } }
Change a ticket
When a ticket is changed, the system sends a webhook that contains:
Parameter | Value |
---|---|
secret |
application id |
id |
id of the ticket's changing event |
trigger_id |
id rule that changed the request |
user_id |
id of the user who changed the request |
ticket_id | ticket's id |
data |
The array of changes that were applied to the ticket contains the parameters:
|
changed_at |
date of change |
old_status | id of the previous ticket status |
new_status | id of the new ticket status |
company_id | id of the company (account) from which the webhook came |
custom_fields |
List of fields and their values. Sent only when at least one of the fields is additional. Contains parameters:
|
custom_blocks |
List of additional system blocks, which contains parameters:
|
client |
Client information. Contains parameters:
|
{ "secret":"0e8f678d8327eb3292a28c8165957b282a1b2f8b", "custom_fields":[ { "id":54, "name":"new item 2", "value":null } ], "custom_blocks":[ { "name":"Test", "url":"test", "secret_key":"dsf4354f=-213sdfasdsa" } ], "trigger":{ "id":"204232", "trigger_id":null, "user_id":"2", "ticket_id":"2261907", "data":[ { "target":"subject", "value":"POST UPDATE" }, { "target":"status_id", "value":"2" }, { "target":"priority", "value":"medium" }, { "target":"type", "value":"task" } ], "changed_at":"2016-12-17 14:11:53", "old_status":"1", "new_status":"2", "company_id":"153561" } }
Create a comment
When you write a comment in a ticket, the system sends a webhook that contains:
Parameter | Value |
---|---|
secret | application id |
id | comment's id |
message | the text of the message that was sent |
type |
|
from | the messages author
Important: if a message is sent via a trigger (bot), a new message webhook will not be sent. A webhook will be sent to update the request. |
user_id | id of the user who wrote the message
|
client_id | id of the client who wrote the message
|
ticket_id | id of the ticket in which the comment was written |
is_first | 1 — if the comment is the first in the ticket |
delivered | whether the message has been delivered (not implemented) |
readed | whether the message has been read (not implemented) |
published_at | сomment creation date |
custom_fields | list of fields and their values. Contains parameters:
|
client | Client information. Contains parameters:
|
{ "secret":"0e8f678d8327eb3292a28c8165957b282a1b2f8b", "comment":{ "id":"2652657", "message":"New message text", "from":"user", "user_id":"545", "client_id":null, "ticket_id":"2261907", "is_first":"0", "delivered":"0", "readed":"0", "published_at":"2016-12-17 14:14:37" } }
User rating
When receiving a rate in a ticket, the system sends a webhook that contains:
Parameter | Value |
---|---|
secret | application id |
id | rating id |
client_id | client's id |
ticket_id | ticket's id |
rating | The rating is given by the client: 1 — poor |
company_id | id of the company (account) from which the webhook came |
ticket_comment_id | rating's comment id |
comment | comment to the rating |
created_at | date the rating was created |
updated_at | rating update date |
user_id | id of the request executor |
{ "secret":"0e8f678d8327eb3292a28c8165957b282a1b2f8b", "csi":{ "id":"2652657", "comment":"New message text", "user_id":"545", "client_id":123213, "ticket_id":"2261907", "rating":"3", "created_at":"2016-12-17 14:14:37" } }