Feedback Agent Availability API: Parameter needed GROUP | Community
Skip to main content

Feedback Agent Availability API: Parameter needed GROUP

  • March 27, 2023
  • 0 replies
  • 0 views

So I have been experimenting with an implementation on the front end of our help center that uses the agent availability API to check whether agents in a particular group are Online - and if they are show our Chat widget.


The main issue with that is that there is no group parameter returned in the Get agent availabilities endpoint. 

I know there are ways to work around this by using other API endpoints such as the group memberships API - however that only complicates the implementation and adds unnecessary requests that have to be made. (Keep in mind these would fire every time a customer loads the page).


So what would be ideal essentially, is an additional query filter for the Get agent availabilities endpoint which would allow to filter down via group_id. 

Further what would be helpful, is if there was an endpoint that would simply return the number of free agents (filtered down via group or channel respectively). At the moment, the endpoint returns an array with all agents that is also paginated - which makes it necessary to iterate through the entire array and each page, if I want to get the number of agents online for a particular channel.

Having a very simple endpoint that just returns the number of agents and their collective free capacity for that particular channel - would make things a lot easier (filtered down via query of agent status, channel, group) 

Example use case:
Retrieving agent status information to decide whether to show a messaging web widget on a website, in order to set customer expectations accordingly. (If there are no free and available agents Online -> don't show a chat widget that might give them the hope for direct communication)


POST Request to the Zendesk API: 
Input: Group_id, Channel (e.g. = messaging)

Output:
Number of agents Online for particular channel
Number of free capacity for the particular channel. ( none of the agents have free capacity, the number returned would be 0 - if there are 2 agents and one of them has free capacity of 3, while the other has a free capacity of 1, the number returned would be 4)


Free capacity refers to omnichannel routing capacity rules and conditions: For example if I set up for the messaging capacity to be 2 chats per agent - and if an agent has one active chat - his free capacity for the messaging channel would be 1.