Department

Prev Next

Department

You need the Manage departments permission to manage departments.

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.
isDeleted bool Whether the department is deleted or not.
chatbotStartTriggerActionIds array The guid array of chatbot smart trigger actions for the selected departments.
shiftIds array The guid array of shifts for the selected departments.
segmentIds array The guid array of segmentations for the selected departments.

Get the list of 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 Department

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/departments \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "id": "a0831b44-a2d0-4bed-96c4-43f7eb69b095",
      "name": "markting",
      "description": "markting departments",
      "isAvailableInLiveChat": true,
      "isAvailableInTicketingAndMessaging": true,
      "offlineMessageMailTo": "toAllAgents",
      "offlineMessageEmailAddresses": "andy@comm100.com",
      "isDeleted": false,
      "agentIds": [
          "3CA2EF45-7D46-EB11-8100-00155D081D0B"
      ],
      "chatbotSmartTriggerActionIds": [
         "807dfb38-2c29-4fad-b1ee-910b37bacef4"
      ],
      "shiftIds": [
         "1dfd687b-68e8-4870-95e0-68052fd08bb5"
      ],
      "segmentIds": [
         "7f8c4778-2126-4ff3-a4ba-9089cf24159c"
      ]
  }
] 

Get a single Department

GET global/departments/{id}

  • Parameters:

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

Department

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/departments/a0831b44-a2d0-4bed-96c4-43f7eb69b095 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "a0831b44-a2d0-4bed-96c4-43f7eb69b095",
  "name": "markting",
  "description": "markting departments",
  "isAvailableInLiveChat": true,
  "isAvailableInTicketingAndMessaging": true,
  "offlineMessageMailTo": "toAllAgents",
  "offlineMessageEmailAddresses": "andy@comm100.com",
  "isDeleted": false,
  "agentIds": [
      "3CA2EF45-7D46-EB11-8100-00155D081D0B"
  ],
   "chatbotSmartTriggerActionIds": [
      "807dfb38-2c29-4fad-b1ee-910b37bacef4"
  ],
  "shiftIds": [
      "1dfd687b-68e8-4870-95e0-68052fd08bb5"
   ],
   "segmentIds": [
      "7f8c4778-2126-4ff3-a4ba-9089cf24159c"
   ]
} 

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.
isDeleted bool body no Whether the department is deleted or not.
chatbotStartTriggerActionIds array body no The guid array of chatbot smart trigger actions for the selected departments.
shiftIds array body no The guid array of shifts for the selected departments.
segmentIds array body no The guid array of segmentations for the selected departments.
  • Response:

Department

  • Example

Sample Request:

curl https://api11.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": "a0831b44-a2d0-4bed-96c4-43f7eb69b095",
  "name": "markting",
  "description": "markting departments",
  "isAvailableInLiveChat": true,
  "isAvailableInTicketingAndMessaging": true,
  "offlineMessageMailTo": "toAllAgents",
  "offlineMessageEmailAddresses": "andy@comm100.com",
  "isDeleted": false,
  "agentIds": [
      "3CA2EF45-7D46-EB11-8100-00155D081D0B"
  ],
  "chatbotSmartTriggerActionIds": [],
  "shiftIds": [],
  "segmentIds": []
} 

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.
isDeleted bool body no Whether the department is deleted or not.
chatbotStartTriggerActionIds array body no The guid array of chatbot smart trigger actions for the selected departments.
shiftIds array body no The guid array of shifts for the selected departments.
segmentIds array body no The guid array of segmentations for the selected departments.
  • Response:

Department

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/departments/a0831b44-a2d0-4bed-96c4-43f7eb69b095 \ 
    -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": "a0831b44-a2d0-4bed-96c4-43f7eb69b095",
  "name": "markting",
  "description": "markting departments",
  "isAvailableInLiveChat": true,
  "isAvailableInTicketingAndMessaging": true,
  "offlineMessageMailTo": "toAllAgents",
  "offlineMessageEmailAddresses": "andy@comm100.com",
  "isDeleted": false,
  "agentIds": [
      "3CA2EF45-7D46-EB11-8100-00155D081D0B"
  ],
  "chatbotSmartTriggerActionIds": [],
  "shiftIds": [],
  "segmentIds": []
} 

Remove the Department

DELETE global/departments/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/departments/a0831b44-a2d0-4bed-96c4-43f7eb69b095 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content