LiveChat_Department
You need the Manage departments permission to manage departments.
LiveChat_Departments
- LiveChat_Departments Manage
GET global/departments
GET global/departments/{id}
POST global/departments
PUT global/departments/{id}
DELETE global/departments/{id}
Model
LiveChat_Department JSON Format
LiveChat_Department is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id |
guid | Id of the department. |
name |
string | Name of the department. |
description |
string | Description of the department. |
isAvailableInLiveChat |
bool | When it is false, the department will not be displayed in the Pre-chat window, department drop down list, routing rules, chat transfer rules etc. Default: true. |
isAvailableInTicketingAndMessaging |
bool | When it is false, the department name will not be displayed in the 'Assigned Department' field. Default: true. |
offlineMessageMailTo |
string | Allowed values are "toAllAgents", "toEmailAddresses". |
offlineMessageEmailAddresses |
string | Specific email addresses that offline message are sent to. Available and required when Offline Message Mail Type is "toEmailAddresses". |
isAvailableInVoice |
bool | |
agentIds |
array | Id of the selected agents for this department. |
Endpoint
Get the list of LiveChat_Departments
GET global/departments
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
keywords |
string | query | no | Filter by keywords in name of the department. |
include |
string | query | no | Allowed value is "agent". |
Response:
An array of LiveChat_Department
Example
Sample Request:
curl https://api15.comm100.io/v4/global/departments \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Get a single LiveChat_Department
GET global/departments/{id}
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
include |
string | query | no | Allowed value is "agent". |
Response:
Example
Sample Request:
curl https://api15.comm100.io/v4/global/departments/accbe492-8bf1-42a3-abaa-8bd221175c0e \
-X
'GET'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 200 OK
Create a new LiveChat_Department
POST global/departments
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
name |
string | body | yes | Name of the department. |
description |
string | body | no | Description of the department. |
isAvailableInLiveChat |
bool | body | no | When it is false, the department will not be displayed in the Pre-chat window, department drop down list, routing rules, chat transfer rules etc. Default: true. |
isAvailableInTicketingAndMessaging |
bool | body | no | When it is false, the department name will not be displayed in the 'Assigned Department' field. Default: true. |
offlineMessageMailTo |
string | body | no | Allowed values are "toAllAgents", "toEmailAddresses". |
offlineMessageEmailAddresses |
string | body | no | Specific email addresses that offline message are sent to. Available and required when Offline Message Mail Type is "toEmailAddresses". |
isAvailableInVoice |
bool | body | no | |
agentIds |
array | body | no | Id of the selected agents for this department. |
Response:
Example
Sample Request:
curl https://api15.comm100.io/v4/global/departments \
-X
'POST'
\
-H
'Authorization: Bearer {access_token}'
\
-H
'Content-Type: application/json'
\
-D
'{"name":"markting","description":"markting departments","isAvailableInLiveChat":true,"isAvailableInTicketingAndMessaging":true,"offlineMessageMailTo":"toAllAgents","offlineMessageEmailAddresses":"andy@comm100.com","isAvailableInVoice":true}'
Response:
HTTP/1.1 201 Created
Update the LiveChat_Department
PUT global/departments/{id}
Parameters:
Name | Type | In | Required | Description |
---|---|---|---|---|
name |
string | body | yes | Name of the department. |
description |
string | body | no | Description of the department. |
isAvailableInLiveChat |
bool | body | no | When it is false, the department will not be displayed in the Pre-chat window, department drop down list, routing rules, chat transfer rules etc. Default: true. |
isAvailableInTicketingAndMessaging |
bool | body | no | When it is false, the department name will not be displayed in the 'Assigned Department' field. Default: true. |
offlineMessageMailTo |
string | body | no | Allowed values are "toAllAgents", "toEmailAddresses". |
offlineMessageEmailAddresses |
string | body | no | Specific email addresses that offline message are sent to. Available and required when Offline Message Mail Type is "toEmailAddresses". |
isAvailableInVoice |
bool | body | no | |
agentIds |
array | body | no | Id of the selected agents for this department. |
Response:
Example
Sample Request:
curl https://api15.comm100.io/v4/global/departments/accbe492-8bf1-42a3-abaa-8bd221175c0e \
-X
'PUT'
\
-H
'Authorization: Bearer {access_token}'
\
-H
'Content-Type: application/json'
\
-D
'{"name":"markting","description":"markting departments","isAvailableInLiveChat":true,"isAvailableInTicketingAndMessaging":true,"offlineMessageMailTo":"toAllAgents","offlineMessageEmailAddresses":"andy@comm100.com","isAvailableInVoice":true}'
Response:
HTTP/1.1 200 OK
Remove the LiveChat_Department
DELETE global/departments/{id}
Parameters:
No Parameters
Response:
No Content
Example
Sample Request:
curl https://api15.comm100.io/v4/global/departments/accbe492-8bf1-42a3-abaa-8bd221175c0e \
-X
'DELETE'
\
-H
'Authorization: Bearer {access_token}'
\
Response:
HTTP/1.1 204 No Content