Auto Distribution
  • 16 Jun 2022
  • 4 Minutes to read
  • Dark
    Light

Auto Distribution

  • Dark
    Light

Article summary

Auto Distribution

Config of ticketing auto distribution.

Auto Distribution JSON Format

Auto Distribution is represented as simple flat JSON objects with the following keys:

NameTypeDescription
isEnabledboolWhether Auto Distribution is enabled or not.
autoDistributionMethodstringHow tickets are assigned to an agent. Allowed values are "assignToAgentByLoadBalancing", "assignToAgentByRoundRobin".
isLastAssignedAgentPreferredboolWhether to choose the last assigned agent first when new ticket is received or not.
ifLimitMaxTicketsForAllAgentsboolWhether maximum number of auto assigned tickets option is enabled for all agents or not.
maxTicketsForAllAgentsintegerNumber of maximum auto assigned tickets for all agents.
ifExcludePendingExternalFromAgentMaxTicketCountboolTickets marked with the status of pending external will not be counted when the system checks if an agent has reached their predefined maximum number of tickets.
ifExcludeOnHoldFromAgentMaxTicketCountboolTickets marked with the status of on holding will not be counted when the system checks if an agent has reached their predefined maximum number of tickets.
agentAutoDistributionsagentAutoDistributions[]Reference to Agent Auto Distribution.
departmentAutoDistributionsdepartmentAutoDistributions[]Reference to Department Auto Distribution.

Agent Auto Distribution JSON Format:

NameTypeDescription
ifParticipateInAutoDistributionboolWhether an agent can automatically accept tickets or not.
maxTicketsintegerMaximum tickets an agent can automatically accept.
agentIdguidId of the agent.
agentagentReference to Agent.

Department Auto Distribution JSON Format:

NameTypeDescription
departmentIdguidId of the department.
autoDistributionMethodstringHow tickets routed to a department are assigned to agent. Allowed values are "assignToAgentByLoadBalancing", "assignToAgentByRoundRobin", "keepDepartmentAsAssignee".
isLastAssignedAgentPreferredboolWhether preferred assign to the department that was assigned last time.

Get a single Auto Distribution

GET ticketing/autoDistributionConfig

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed values are "ticketingAgentAutoDistribution", "ticketingDepartmentAutoDistribution".
  • Response:

Auto Distribution

  • Example

Sample Request:

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

Response:

HTTP/1.1 200 OK

{
  "isEnabled": true,
  "autoDistributionMethod": "assignToAgentByLoadBalancing",
  "isLastAssignedAgentPreferred": false,
  "ifLimitMaxTicketsForAllAgents": false,
  "maxTicketsForAllAgents": 50,
  "ifExcludePendingExternalFromAgentMaxTicketCount": true,
  "ifExcludeOnHoldFromAgentMaxTicketCount": true,
  "agentAutoDistributions": [
      {
          "ifParticipateInAutoDistribution": false,
          "maxTickets": 100,
          "agentId": "3b6560d4-0f10-4652-a376-e590936d290e",
          "agent": {
              "id": "c2c165b7-d5ce-40e5-a492-f586f514a062",
              "email": "andy@comm100.com",
              "displayName": "Andy Liao",
              "firstName": "Andy",
              "lastName": "Liao",
              "isAdmin": true,
              "isActive": true,
              "phone": "13712345678",
              "title": "Manager",
              "bio": "Hello, I am Andy",
              "timeZone": "Pacific Standard Time",
              "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
              "createdTime": "2020-12-25T06:01:00.913Z",
              "isLocked": true,
              "lockedTime": "2020-12-25T06:01:00.93Z",
              "ifCustomizeAvatar": true,
              "customizeAvatar": "https://dash11.comm100.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111",
              "systemAvatarId": "1383d4fd-3114-eb11-80fc-00155d081d0b",
              "avatar": "https://api11.comm100.io/v4/Global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062/avatar",
              "permissionIds": [
                  "45A2EF45-7D46-EB11-8100-00155D081D0B"
              ],
              "departmentIds": [
                  "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
              ],
              "roleIds": [
                  "e0bf1302-d145-eb11-8100-00155d081d0b"
              ]
          }
      }
  ],
  "departmentAutoDistributions": [
      {
          "departmentId": "aa3f71ac-e64e-492f-ae4f-9be6de29321a",
          "autoDistributionMethod": "assignToAgentByLoadBalancing",
          "isLastAssignedAgentPreferred": false
      }
  ]
} 

Disable the Auto Distribution

POST ticketing/autoDistributionConfig:disable

  • Parameters:

No Parameters

  • Response:

Auto Distribution

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/autoDistributionConfig:disable \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "isEnabled": false,
  "autoDistributionMethod": "assignToAgentByLoadBalancing",
  "isLastAssignedAgentPreferred": false,
  "ifLimitMaxTicketsForAllAgents": false,
  "maxTicketsForAllAgents": 50,
  "ifExcludePendingExternalFromAgentMaxTicketCount": true,
  "ifExcludeOnHoldFromAgentMaxTicketCount": true,
  "agentAutoDistributions": [
      {
          "ifParticipateInAutoDistribution": false,
          "maxTickets": 100,
          "agentId": "3b6560d4-0f10-4652-a376-e590936d290e",
          "agent": {
              "id": "c2c165b7-d5ce-40e5-a492-f586f514a062",
              "email": "andy@comm100.com",
              "displayName": "Andy Liao",
              "firstName": "Andy",
              "lastName": "Liao",
              "isAdmin": true,
              "isActive": true,
              "phone": "13712345678",
              "title": "Manager",
              "bio": "Hello, I am Andy",
              "timeZone": "Pacific Standard Time",
              "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
              "createdTime": "2020-12-25T06:01:00.913Z",
              "isLocked": true,
              "lockedTime": "2020-12-25T06:01:00.93Z",
              "ifCustomizeAvatar": true,
              "customizeAvatar": "https://dash11.comm100.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111",
              "systemAvatarId": "1383d4fd-3114-eb11-80fc-00155d081d0b",
              "avatar": "https://api11.comm100.io/v4/Global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062/avatar",
              "permissionIds": [
                  "45A2EF45-7D46-EB11-8100-00155D081D0B"
              ],
              "departmentIds": [
                  "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
              ],
              "roleIds": [
                  "e0bf1302-d145-eb11-8100-00155d081d0b"
              ]
          }
      }
  ],
  "departmentAutoDistributions": [
      {
          "departmentId": "aa3f71ac-e64e-492f-ae4f-9be6de29321a",
          "autoDistributionMethod": "assignToAgentByLoadBalancing",
          "isLastAssignedAgentPreferred": false
      }
  ]
} 

Enable the Auto Distribution

POST ticketing/autoDistributionConfig:enable

  • Parameters:

No Parameters

  • Response:

Auto Distribution

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/autoDistributionConfig:enable \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "isEnabled": true,
  "autoDistributionMethod": "assignToAgentByLoadBalancing",
  "isLastAssignedAgentPreferred": false,
  "ifLimitMaxTicketsForAllAgents": false,
  "maxTicketsForAllAgents": 50,
  "ifExcludePendingExternalFromAgentMaxTicketCount": true,
  "ifExcludeOnHoldFromAgentMaxTicketCount": true,
  "agentAutoDistributions": [
      {
          "ifParticipateInAutoDistribution": false,
          "maxTickets": 100,
          "agentId": "3b6560d4-0f10-4652-a376-e590936d290e",
          "agent": {
              "id": "c2c165b7-d5ce-40e5-a492-f586f514a062",
              "email": "andy@comm100.com",
              "displayName": "Andy Liao",
              "firstName": "Andy",
              "lastName": "Liao",
              "isAdmin": true,
              "isActive": true,
              "phone": "13712345678",
              "title": "Manager",
              "bio": "Hello, I am Andy",
              "timeZone": "Pacific Standard Time",
              "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
              "createdTime": "2020-12-25T06:01:00.913Z",
              "isLocked": true,
              "lockedTime": "2020-12-25T06:01:00.93Z",
              "ifCustomizeAvatar": true,
              "customizeAvatar": "https://dash11.comm100.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111",
              "systemAvatarId": "1383d4fd-3114-eb11-80fc-00155d081d0b",
              "avatar": "https://api11.comm100.io/v4/Global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062/avatar",
              "permissionIds": [
                  "45A2EF45-7D46-EB11-8100-00155D081D0B"
              ],
              "departmentIds": [
                  "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
              ],
              "roleIds": [
                  "e0bf1302-d145-eb11-8100-00155d081d0b"
              ]
          }
      }
  ],
  "departmentAutoDistributions": [
      {
          "departmentId": "aa3f71ac-e64e-492f-ae4f-9be6de29321a",
          "autoDistributionMethod": "assignToAgentByLoadBalancing",
          "isLastAssignedAgentPreferred": false
      }
  ]
} 

Update the Auto Distribution

PUT ticketing/autoDistributionConfig

  • Parameters:

NameTypeinRequiredDescription
isEnabledboolbodynoWhether Auto Distribution is enabled or not.
autoDistributionMethodstringbodynoHow tickets are assigned to an agent. Allowed values are "assignToAgentByLoadBalancing", "assignToAgentByRoundRobin".
isLastAssignedAgentPreferredboolbodynoWhether to choose the last assigned agent first when new ticket is received or not.
ifLimitMaxTicketsForAllAgentsboolbodynoWhether maximum number of auto assigned tickets option is enabled for all agents or not.
maxTicketsForAllAgentsintegerbodynoNumber of maximum auto assigned tickets for all agents.
ifExcludePendingExternalFromAgentMaxTicketCountboolbodynoTickets marked with the status of pending external will not be counted when the system checks if an agent has reached their predefined maximum number of tickets.
ifExcludeOnHoldFromAgentMaxTicketCountboolbodynoTickets marked with the status of on holding will not be counted when the system checks if an agent has reached their predefined maximum number of tickets.
agentAutoDistributionsagentAutoDistributions[]bodynoSettings of agent in Auto Distribution.
departmentAutoDistributionsdepartmentAutoDistributions[]bodynoSettings of department in Auto Distribution.
  • Response:

Auto Distribution

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/autoDistributionConfig \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"isEnabled":true,"autoDistributionMethod":"assignToAgentByLoadBalancing","isLastAssignedAgentPreferred":false,"ifLimitMaxTicketsForAllAgents":false,"maxTicketsForAllAgents":50,"ifExcludePendingExternalFromAgentMaxTicketCount":true,"ifExcludeOnHoldFromAgentMaxTicketCount":true,"agentAutoDistributions":[{"ifParticipateInAutoDistribution":false,"maxTickets":100}],"departmentAutoDistributions":[{"autoDistributionMethod":"assignToAgentByLoadBalancing","isLastAssignedAgentPreferred":false}]}' 

Response:

HTTP/1.1 200 OK

{
  "isEnabled": true,
  "autoDistributionMethod": "assignToAgentByLoadBalancing",
  "isLastAssignedAgentPreferred": false,
  "ifLimitMaxTicketsForAllAgents": false,
  "maxTicketsForAllAgents": 50,
  "ifExcludePendingExternalFromAgentMaxTicketCount": true,
  "ifExcludeOnHoldFromAgentMaxTicketCount": true,
  "agentAutoDistributions": [
      {
          "ifParticipateInAutoDistribution": false,
          "maxTickets": 100,
          "agentId": "3b6560d4-0f10-4652-a376-e590936d290e",
          "agent": {
              "id": "c2c165b7-d5ce-40e5-a492-f586f514a062",
              "email": "andy@comm100.com",
              "displayName": "Andy Liao",
              "firstName": "Andy",
              "lastName": "Liao",
              "isAdmin": true,
              "isActive": true,
              "phone": "13712345678",
              "title": "Manager",
              "bio": "Hello, I am Andy",
              "timeZone": "Pacific Standard Time",
              "datetimeFormat": "YYYY/MM/DD HH:mm:ss",
              "createdTime": "2020-12-25T06:01:00.913Z",
              "isLocked": true,
              "lockedTime": "2020-12-25T06:01:00.93Z",
              "ifCustomizeAvatar": true,
              "customizeAvatar": "https://dash11.comm100.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111",
              "systemAvatarId": "1383d4fd-3114-eb11-80fc-00155d081d0b",
              "avatar": "https://api11.comm100.io/v4/Global/agents/c2c165b7-d5ce-40e5-a492-f586f514a062/avatar",
              "permissionIds": [
                  "45A2EF45-7D46-EB11-8100-00155D081D0B"
              ],
              "departmentIds": [
                  "b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"
              ],
              "roleIds": [
                  "e0bf1302-d145-eb11-8100-00155d081d0b"
              ]
          }
      }
  ],
  "departmentAutoDistributions": [
      {
          "departmentId": "aa3f71ac-e64e-492f-ae4f-9be6de29321a",
          "autoDistributionMethod": "assignToAgentByLoadBalancing",
          "isLastAssignedAgentPreferred": false
      }
  ]
} 

Was this article helpful?

What's Next