Additional blocks
Additional sections are divided into two types:
Static blocks
It displays static information. At the section settings, the information (text) is set and displayed on each ticket. The text supports various ticket variables.
Dynamic blocks
It makes a request to the url specified in its settings and renders the content that is returned to it at response.
Expected response format: json
The structure of the expected response:
{ "html": "Any HTML" }
If the secret key is specified it is added to the request body.
By default, the response will be designed in accordance with the styles of Usedesk, there is support for bootstrap. Also, the answer may contain your own styles added to html.
The response timeout is 60 seconds. Above each dynamic blocks there is a “refresh” button, which repeats the request and reloads the data into the blocks.
Parameter | Value | |||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ticket_id | Ticket ID in Usedesk | |||||||||||||||||||||||||||||||||||||||||||||||
subject | Ticket subject | |||||||||||||||||||||||||||||||||||||||||||||||
client_id | Client ID in Usedesk | |||||||||||||||||||||||||||||||||||||||||||||||
contact | Сontact data | |||||||||||||||||||||||||||||||||||||||||||||||
channel_type | The type of channel to which the request came. Not recommended to use (version 1.0) Deprecated (version 1.0): Not recommended. Working with the channel type is put into the channel_data parameter | |||||||||||||||||||||||||||||||||||||||||||||||
channel_id | Channel ID in Usedesk | |||||||||||||||||||||||||||||||||||||||||||||||
from_email | Parameter that shows if the request came from an email channel Deprecated (version 1.0): Not recommended. Working with the channel type is put into the channel_data parameter | |||||||||||||||||||||||||||||||||||||||||||||||
from_id | Parameter that shows ID if the request came from another system Deprecated (version 1.0): Not recommended. Working with the channel type is put into the channel_data parameter | |||||||||||||||||||||||||||||||||||||||||||||||
client_data | Array with client data in UseDesk
| |||||||||||||||||||||||||||||||||||||||||||||||
channel_data | Array with channel data in Usedesk (version 2.0) | |||||||||||||||||||||||||||||||||||||||||||||||
Parameter | Value | |||||||||||||||||||||||||||||||||||||||||||||||
type | channel type
| |||||||||||||||||||||||||||||||||||||||||||||||
data | channel data
** UID — priority if it does not return the above data | |||||||||||||||||||||||||||||||||||||||||||||||
id | account id of the channel |
{ "ticket_id": 2252750, "subject": "Hello!", "secret_key" : "1secret2key!@", "client_id": 151869, "channel_type": "email", "channel_id": 492, "from_email": test@gmail.com, "client_data": { "name": "George Benson", "emails": [ "test@gmail.com", "test_work@gmail.com" ], "phones": [ { "type": "home", "phone": "+1 111 111-11-11 #111" }, { "type": "mobile", "phone": "+2 222 222-22-22 #222" } ], "social_services": [ { "type": "facebook", "url": "https://facebook.com/123124124124124214", "uid": null } ], "addresses": [ { "country": "Russia", "city": "Moscow", "address": "4 apt., Flower street", "type": "home" } ], "messengers": [ { "type": "telegram", "id": "1234" } ], "sites": [ "http://site.com" ], "company": "Black and White" }, "channel_data": { "type": "chat", "data": "test@gmail.com", "id": 1111111 } }