Auto Distribution

Config of ticketing auto distribution.

Auto Distributions
- Auto Distributions Manage
GET ticketing/autoDistributionConfig
POST ticketing/autoDistributionConfig:disable
POST ticketing/autoDistributionConfig:enable
PUT ticketing/autoDistributionConfig
Model
Auto Distribution JSON Format

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

Name Type Description
isEnabled bool Whether Auto Distribution is enabled or not.
autoDistributionMethod string How tickets are assigned to an agent. Allowed values are "assignToAgentByLoadBalancing", "assignToAgentByRoundRobin".
isLastAssignedAgentPreferred bool Whether to choose the last assigned agent first when new ticket is received or not.
ifLimitMaxTicketsForAllAgents bool Whether maximum number of auto assigned tickets option is enabled for all agents or not.
maxTicketsForAllAgents integer Number of maximum auto assigned tickets for all agents.
ifExcludePendingExternalFromAgentMaxTicketCount bool Tickets 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.
ifExcludeOnHoldFromAgentMaxTicketCount bool Tickets 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.
agentAutoDistributions agentAutoDistributions[] Reference to Agent Auto Distribution.
departmentAutoDistributions departmentAutoDistributions[] Reference to Department Auto Distribution.

Agent Auto Distribution JSON Format:

Name Type Description
ifParticipateInAutoDistribution bool Whether an agent can automatically accept tickets or not.
maxTickets integer Maximum tickets an agent can automatically accept.
agentId guid Id of the agent.
agent agent Reference to Agent.

Department Auto Distribution JSON Format:

Name Type Description
departmentId guid Id of the department.
autoDistributionMethod string How tickets routed to a department are assigned to agent. Allowed values are "assignToAgentByLoadBalancing", "assignToAgentByRoundRobin", "keepDepartmentAsAssignee".
isLastAssignedAgentPreferred bool Whether preferred assign to the department that was assigned last time.
Endpoint
Get a single Auto Distribution

GET ticketing/autoDistributionConfig

Parameters:
Name Type In Required Description
include string query no Allowed values are "ticketingAgentAutoDistribution", "ticketingDepartmentAutoDistribution".
Response:
Example

Sample Request:

curl https://api15.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":"188f4225-6ac0-46f2-a87a-73b36ca0c6f9","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","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/188f4225-6ac0-46f2-a87a-73b36ca0c6f9/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"],"skillIds":["8F8D3782-B4FD-48C4-BA6B-82F0B7B53D7F"]}}],"departmentAutoDistributions":[{"departmentId":"aa3f71ac-e64e-492f-ae4f-9be6de29321a","autoDistributionMethod":"assignToAgentByLoadBalancing","isLastAssignedAgentPreferred":false}]}
Disable the Auto Distribution

POST ticketing/autoDistributionConfig:disable

Parameters:
No Parameters
Response:
Example

Sample Request:

curl https://api15.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":"188f4225-6ac0-46f2-a87a-73b36ca0c6f9","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","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/188f4225-6ac0-46f2-a87a-73b36ca0c6f9/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"],"skillIds":["8F8D3782-B4FD-48C4-BA6B-82F0B7B53D7F"]}}],"departmentAutoDistributions":[{"departmentId":"aa3f71ac-e64e-492f-ae4f-9be6de29321a","autoDistributionMethod":"assignToAgentByLoadBalancing","isLastAssignedAgentPreferred":false}]}
Enable the Auto Distribution

POST ticketing/autoDistributionConfig:enable

Parameters:
No Parameters
Response:
Example

Sample Request:

curl https://api15.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":"188f4225-6ac0-46f2-a87a-73b36ca0c6f9","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","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/188f4225-6ac0-46f2-a87a-73b36ca0c6f9/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"],"skillIds":["8F8D3782-B4FD-48C4-BA6B-82F0B7B53D7F"]}}],"departmentAutoDistributions":[{"departmentId":"aa3f71ac-e64e-492f-ae4f-9be6de29321a","autoDistributionMethod":"assignToAgentByLoadBalancing","isLastAssignedAgentPreferred":false}]}
Update the Auto Distribution

PUT ticketing/autoDistributionConfig

Parameters:
Name Type In Required Description
isEnabled bool body no Whether Auto Distribution is enabled or not.
autoDistributionMethod string body no How tickets are assigned to an agent. Allowed values are "assignToAgentByLoadBalancing", "assignToAgentByRoundRobin".
isLastAssignedAgentPreferred bool body no Whether to choose the last assigned agent first when new ticket is received or not.
ifLimitMaxTicketsForAllAgents bool body no Whether maximum number of auto assigned tickets option is enabled for all agents or not.
maxTicketsForAllAgents integer body no Number of maximum auto assigned tickets for all agents.
ifExcludePendingExternalFromAgentMaxTicketCount bool body no Tickets 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.
ifExcludeOnHoldFromAgentMaxTicketCount bool body no Tickets 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.
agentAutoDistributions agentAutoDistributions[] body no Settings of agent in Auto Distribution.
departmentAutoDistributions departmentAutoDistributions[] body no Settings of department in Auto Distribution.
Response:
Example

Sample Request:

curl https://api15.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":"188f4225-6ac0-46f2-a87a-73b36ca0c6f9","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","ifCustomizeAvatar":true,"customizeAvatar":"https://dash11.comm100dev.io/Global/agents/c1ad60f8-e2e1-47d2-ad50-8b5de24d2b06/customizeAvatar?SiteId=10000&version=6e7b513d20baaf89b84e81e56d365111","systemAvatarId":"1383d4fd-3114-eb11-80fc-00155d081d0b","avatar":"https://api15.comm100.io/v4/Global/agents/188f4225-6ac0-46f2-a87a-73b36ca0c6f9/avatar","permissionIds":["45A2EF45-7D46-EB11-8100-00155D081D0B"],"departmentIds":["b6ff11d8-0be7-4e99-b8c7-5a7ab501c69b"],"roleIds":["e0bf1302-d145-eb11-8100-00155d081d0b"],"skillIds":["8F8D3782-B4FD-48C4-BA6B-82F0B7B53D7F"]}}],"departmentAutoDistributions":[{"departmentId":"aa3f71ac-e64e-492f-ae4f-9be6de29321a","autoDistributionMethod":"assignToAgentByLoadBalancing","isLastAssignedAgentPreferred":false}]}