Auto Distribution

You need the Manage Settings permission to manage Auto Distrubution

Auto Distribution
- Auto Distribution Manage
GET livechat/autoDistributionConfig
POST livechat/autoDistributionConfig:disable
POST livechat/autoDistributionConfig:enable
PUT livechat/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 Allowed values are "loadBalancing", "roundRobin", "capabilityWeighted".
isLastChattedAgentPreferredForAutoDistribution bool Whether the last-chatted agent is preferred or not.
ifLimitMaxConcurrentChatsForAllAgents bool Whether to set the same maximum number of chats for all agents.
maxConcurrentChatsForAllAgents integer Maximum number of chats for all agents.
ifAgentCanManuallyAcceptChatsAfterReachingMaxChatsLimit bool Whether to allow agent to manually accept chat after reaching max chats limit in agent console.
ifNotAutoDistributeChatsToAgentsWhenHavingAudioVideoChat bool Whether to allocate chats to agents who are having audio or video chats.
isLastChattedAgentPreferredForAutoAccept bool Whether the last-chatted agent is preferred or not.
agentAutoDistributionConfigs agentAutoDistributionConfigs[] Reference to Agent Auto Distribution.
departmentAutoDistributionConfigs departmentAutoDistributionConfigs[] Reference to Department Auto Distribution.

Agent Auto Distribution JSON Format:

Name Type Description
ifAutoAcceptChat bool When it is false, the agent will not accept chat automatically. Default: true.
maxConcurrentChats integer Maximum chat number.
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 Allowed values are "loadBalancing", "roundRobin", "capabilityWeighted".
isLastChattedAgentPreferred bool Whether the last chatted agent is preferred or not.
backupDepartmentId guid Id of the backup department.
Endpoint
Get a single Auto Distribution

GET livechat/autoDistributionConfig

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

Sample Request:

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

Response:

 HTTP/1.1 200 OK

{"isEnabled":true,"autoDistributionMethod":"loadBalancing","isLastChattedAgentPreferredForAutoDistribution":true,"ifLimitMaxConcurrentChatsForAllAgents":true,"maxConcurrentChatsForAllAgents":3,"ifAgentCanManuallyAcceptChatsAfterReachingMaxChatsLimit":true,"ifNotAutoDistributeChatsToAgentsWhenHavingAudioVideoChat":true,"isLastChattedAgentPreferredForAutoAccept":true,"agentAutoDistributionConfigs":[{"ifAutoAcceptChat":true,"maxConcurrentChats":3,"agentId":"35DC397E-509F-4D34-A1DE-843CE5B26D93","agent":{"id":"aa24bf9b-9110-4872-92f9-832a81cc29c6","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/aa24bf9b-9110-4872-92f9-832a81cc29c6/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"]}}],"departmentAutoDistributionConfigs":[{"departmentId":"C36A27EC-EC1E-4A86-8B15-3367FE680AD3","autoDistributionMethod":"0","isLastChattedAgentPreferred":true,"backupDepartmentId":"DE314FF0-E864-4929-81E7-7E575F752037"}]}
Disable the Auto Distribution

POST livechat/autoDistributionConfig:disable

Parameters:
No Parameters
Response:
Example

Sample Request:

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

Response:

 HTTP/1.1 200 OK

{"isEnabled":false,"autoDistributionMethod":"loadBalancing","isLastChattedAgentPreferredForAutoDistribution":true,"ifLimitMaxConcurrentChatsForAllAgents":true,"maxConcurrentChatsForAllAgents":3,"ifAgentCanManuallyAcceptChatsAfterReachingMaxChatsLimit":true,"ifNotAutoDistributeChatsToAgentsWhenHavingAudioVideoChat":true,"isLastChattedAgentPreferredForAutoAccept":true,"agentAutoDistributionConfigs":[{"ifAutoAcceptChat":true,"maxConcurrentChats":3,"agentId":"35DC397E-509F-4D34-A1DE-843CE5B26D93","agent":{"id":"aa24bf9b-9110-4872-92f9-832a81cc29c6","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/aa24bf9b-9110-4872-92f9-832a81cc29c6/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"]}}],"departmentAutoDistributionConfigs":[{"departmentId":"C36A27EC-EC1E-4A86-8B15-3367FE680AD3","autoDistributionMethod":"0","isLastChattedAgentPreferred":true,"backupDepartmentId":"DE314FF0-E864-4929-81E7-7E575F752037"}]}
Enable the Auto Distribution

POST livechat/autoDistributionConfig:enable

Parameters:
No Parameters
Response:
Example

Sample Request:

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

Response:

 HTTP/1.1 200 OK

{"isEnabled":true,"autoDistributionMethod":"loadBalancing","isLastChattedAgentPreferredForAutoDistribution":true,"ifLimitMaxConcurrentChatsForAllAgents":true,"maxConcurrentChatsForAllAgents":3,"ifAgentCanManuallyAcceptChatsAfterReachingMaxChatsLimit":true,"ifNotAutoDistributeChatsToAgentsWhenHavingAudioVideoChat":true,"isLastChattedAgentPreferredForAutoAccept":true,"agentAutoDistributionConfigs":[{"ifAutoAcceptChat":true,"maxConcurrentChats":3,"agentId":"35DC397E-509F-4D34-A1DE-843CE5B26D93","agent":{"id":"aa24bf9b-9110-4872-92f9-832a81cc29c6","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/aa24bf9b-9110-4872-92f9-832a81cc29c6/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"]}}],"departmentAutoDistributionConfigs":[{"departmentId":"C36A27EC-EC1E-4A86-8B15-3367FE680AD3","autoDistributionMethod":"0","isLastChattedAgentPreferred":true,"backupDepartmentId":"DE314FF0-E864-4929-81E7-7E575F752037"}]}
Update the Auto Distribution

PUT livechat/autoDistributionConfig

Parameters:
Name Type In Required Description
isEnabled bool body no Whether auto distribution is enabled or not.
autoDistributionMethod string body no Allowed values are "loadBalancing", "roundRobin", "capabilityWeighted".
isLastChattedAgentPreferredForAutoDistribution bool body no Whether the last-chatted agent is preferred or not.
ifLimitMaxConcurrentChatsForAllAgents bool body no Whether to set the same maximum number of chats for all agents.
maxConcurrentChatsForAllAgents integer body no Maximum number of chats for all agents.
ifAgentCanManuallyAcceptChatsAfterReachingMaxChatsLimit bool body no Whether to allow agent to manually accept chat after reaching max chats limit in agent console.
ifNotAutoDistributeChatsToAgentsWhenHavingAudioVideoChat bool body no Whether to allocate chats to agents who are having audio or video chats.
isLastChattedAgentPreferredForAutoAccept bool body no Whether the last-chatted agent is preferred or not.
agentAutoDistributionConfigs agentAutoDistributionConfigs[] body no Reference to Agent Auto Distribution.
departmentAutoDistributionConfigs departmentAutoDistributionConfigs[] body no Reference to Department Auto Distribution.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/livechat/autoDistributionConfig \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"isEnabled":true,"autoDistributionMethod":"loadBalancing","isLastChattedAgentPreferredForAutoDistribution":true,"ifLimitMaxConcurrentChatsForAllAgents":true,"maxConcurrentChatsForAllAgents":3,"ifAgentCanManuallyAcceptChatsAfterReachingMaxChatsLimit":true,"ifNotAutoDistributeChatsToAgentsWhenHavingAudioVideoChat":true,"isLastChattedAgentPreferredForAutoAccept":true,"agentAutoDistributionConfigs":[{"ifAutoAcceptChat":true,"maxConcurrentChats":3}],"departmentAutoDistributionConfigs":[{"autoDistributionMethod":"0","isLastChattedAgentPreferred":true,"backupDepartmentId":"DE314FF0-E864-4929-81E7-7E575F752037"}]}'

Response:

 HTTP/1.1 200 OK

{"isEnabled":true,"autoDistributionMethod":"loadBalancing","isLastChattedAgentPreferredForAutoDistribution":true,"ifLimitMaxConcurrentChatsForAllAgents":true,"maxConcurrentChatsForAllAgents":3,"ifAgentCanManuallyAcceptChatsAfterReachingMaxChatsLimit":true,"ifNotAutoDistributeChatsToAgentsWhenHavingAudioVideoChat":true,"isLastChattedAgentPreferredForAutoAccept":true,"agentAutoDistributionConfigs":[{"ifAutoAcceptChat":true,"maxConcurrentChats":3,"agentId":"35DC397E-509F-4D34-A1DE-843CE5B26D93","agent":{"id":"aa24bf9b-9110-4872-92f9-832a81cc29c6","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/aa24bf9b-9110-4872-92f9-832a81cc29c6/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"]}}],"departmentAutoDistributionConfigs":[{"departmentId":"C36A27EC-EC1E-4A86-8B15-3367FE680AD3","autoDistributionMethod":"0","isLastChattedAgentPreferred":true,"backupDepartmentId":"DE314FF0-E864-4929-81E7-7E575F752037"}]}