Call Center Agent Dashboard Issues

Status
Not open for further replies.

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,415
376
83
Hello All,
In a way, this follows on from this thread, but I thought it better to start a new one:
https://www.pbxforums.com/threads/change-agent-status-through-user-dashboard.2973/

/var/www/fusionpbx/app/call_centers/call_center_agent_dashboard.php (Installed Feb 14th 2020) certainly has some issues from what I can see. I can fix it up to meet my immediate needs, but before I embark on fixing it or raising a ticket with the Fusion Team, I am interested to know how people think it should work.

For a user, I believe the intention is to show all the call center queues for the domain and then show if the agent (user) is logged in or out for each queue whilst providing the opportunity for the user to log in to a queue.

The first problem, as I see it, is the status of the agent has nothing to do with the agents "membership" of a queue. An agent is either logged in or logged out (don't worry about "On Break" for now).

The queue "membership" is achieved by the tier mapping of an agent to a queue, this is generally set up in the call center queue edit page. The tier mapping can also be added or deleted using Event Socket API.

Question 1: Should the dashboard app simply allow the agent to log in and out, nothing more? i.e update their status.

Question 2: Should the dashboard app allow a agent to add and remove themselves from queues?

Question 3: If the answer to Q2 is yes, should this be a separate operation to the agent status change?

In its current configuration the dashboard app cannot update the agents actual status (log in/out), it can only add or remove a tier mapping for that agent to a given queue.

To fix the app as it stands now requires several small code changes:
Add [0] to references to the $agent array
Code:
For example:
change
echo "        <input type='hidden' name='agents[".$x."][agent_name]' value='".escape($agent['agent_name'])."'>\n";
to
echo "        <input type='hidden' name='agents[".$x."][agent_name]' value='".escape($agent[0]['agent_name'])."'>\n";


Change reference to queue_name
Code:
Change
echo "        <input type='hidden' name='agents[".$x."][queue_name]' value='".escape($row['queue_name'])."'>\n";
to
echo "        <input type='hidden' name='agents[".$x."][queue_name]' value='".escape($row['call_center_queue_uuid'])."'>\n";


Remove references to the domain in the API calls, queue are names by UUID not domain.
Code:
For example:
change
$cmd = "api callcenter_config tier add ".$row['queue_name']."@".$_SESSION['domain_name']." ".$row['agent_name']."@".$_SESSION['domain_name'];
to
$cmd = "api callcenter_config tier add ".$row['queue_name']." ".$row['agent_name']." 0 0";

And finally update the agents actual status display by an API call to callcenter_config agent list [agent_name] (UUID)

I rather suspect that many companies would not want an agent to be able to add and remove themselves from queues, this would be an admin function. Certainly my current customer only wants the agent to be able to update their status. The agent status automatically governs if calls are tried or not from any queue the agent is mapped to.

I hope what I have written makes sense, I welcome any views on this.

Adrian.
 
Last edited:
Status
Not open for further replies.