Department

You need the Manage departments permission to manage departments.

Departments
- Departments Manage
GET global/departments
GET global/departments/{id}
POST global/departments
PUT global/departments/{id}
DELETE global/departments/{id}
Model
Department JSON Format

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".
agentIds array Id of the selected agents for this department.
Endpoint
Get the list of Departments

GET global/departments

Parameters:
Name Type In Required Description
include string query no Allowed value is "agent".
Response:

An array of   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

[{"id":"a46afdad-82c9-4405-bb4b-8d5517ef57d8","name":"markting","description":"markting departments","isAvailableInLiveChat":true,"isAvailableInTicketingAndMessaging":true,"offlineMessageMailTo":"toAllAgents","offlineMessageEmailAddresses":"andy@comm100.com","agentIds":["3CA2EF45-7D46-EB11-8100-00155D081D0B"]}]
Get a single 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/a46afdad-82c9-4405-bb4b-8d5517ef57d8 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"a46afdad-82c9-4405-bb4b-8d5517ef57d8","name":"markting","description":"markting departments","isAvailableInLiveChat":true,"isAvailableInTicketingAndMessaging":true,"offlineMessageMailTo":"toAllAgents","offlineMessageEmailAddresses":"andy@comm100.com","agentIds":["3CA2EF45-7D46-EB11-8100-00155D081D0B"]}
Create a new 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".
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"}'

Response:

 HTTP/1.1 201 Created

{"id":"a46afdad-82c9-4405-bb4b-8d5517ef57d8","name":"markting","description":"markting departments","isAvailableInLiveChat":true,"isAvailableInTicketingAndMessaging":true,"offlineMessageMailTo":"toAllAgents","offlineMessageEmailAddresses":"andy@comm100.com","agentIds":["3CA2EF45-7D46-EB11-8100-00155D081D0B"]}
Update the 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".
agentIds array body no Id of the selected agents for this department.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/global/departments/a46afdad-82c9-4405-bb4b-8d5517ef57d8 \
-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"}'

Response:

 HTTP/1.1 200 OK

{"id":"a46afdad-82c9-4405-bb4b-8d5517ef57d8","name":"markting","description":"markting departments","isAvailableInLiveChat":true,"isAvailableInTicketingAndMessaging":true,"offlineMessageMailTo":"toAllAgents","offlineMessageEmailAddresses":"andy@comm100.com","agentIds":["3CA2EF45-7D46-EB11-8100-00155D081D0B"]}
Remove the Department

DELETE global/departments/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/global/departments/a46afdad-82c9-4405-bb4b-8d5517ef57d8 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content