Author Topic: Question on RealtimeDO.RTRiassunto  (Read 7031 times)

barryf

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 4
    • View Profile
Question on RealtimeDO.RTRiassunto
« on: January 13, 2009, 18:20:22 »
hi,

If I do a query on multiple queues using, for example:

$params_rt = array(
     new XML_RPC_Value(411|412|415|418),
           new XML_RPC_Value("wallboard"),
           new XML_RPC_Value("XXXXXXXX"),
           new XML_RPC_Value(""),
           new XML_RPC_Value(""),
           $req_blocks_rt
       );

It returns an array which only lists the agents/calls for "all selected" queues, like the output below. However, I want to be able to access the details of each individual queue separately - how can I do this?

[RealtimeDO.RTRiassunto] => Array
        (
           
  • => Array

                (
                   
  • => 
  • [1] => Queue 
                        [2] => N. agents
                        [3] => Ready agents
                        [4] => On pause
                        [5] => Unk
                        [6] => Bsy
                        [7] => N. Calls waiting
                        [8] => On phone inbound
                        [9] => On phone outbound
                    )

                [1] => Array
                    (
                       
  • =>
  • [1] => all selected
                        [2] => 51
                        [3] => 48
                        [4] => 3
                        [5] => 0
                        [6] => 0
                        [7] => 0
                        [8] => 0
                        [9] => 0
                    )

            )


    Thanks,

    -Barry Flanagan

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Question on RealtimeDO.RTRiassunto
« Reply #1 on: January 14, 2009, 11:48:07 »
You should be doing a separate query for each queue. It's not 100% sure that all reports are simply additive, meaning that it's not always true that f(A+B) = f(A) + f(B).

barryf

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 4
    • View Profile
Re: Question on RealtimeDO.RTRiassunto
« Reply #2 on: January 14, 2009, 12:21:20 »
You should be doing a separate query for each queue. It's not 100% sure that all reports are simply additive, meaning that it's not always true that f(A+B) = f(A) + f(B).


OK, that is what I am doing as a work-around. There is a problem with this, however. I have 5 queues, each with the same members. If one agent is on a call, that shows up on the queue he is taking the call from, so I get 4 agents ready, and one on a call. However, all of the other queues still show 5 agents ready, which is not the case because one agent is on a call, albeit on a different queue.

Is there any fix for this?

-Barry

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Question on RealtimeDO.RTRiassunto
« Reply #3 on: January 14, 2009, 16:25:33 »
You could pull information from the aggregate queue and integrate it wit queue-by queue data when needed.

barryf

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 4
    • View Profile
Re: Question on RealtimeDO.RTRiassunto
« Reply #4 on: January 15, 2009, 12:59:34 »
You could pull information from the aggregate queue and integrate it wit queue-by queue data when needed.


Yes, but that doesn't really change the fact that Queuemetrics should really not be reporting that there are 5 agents available for a queue when one or more are on a call and therefore NOT available.

-Barry

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Question on RealtimeDO.RTRiassunto
« Reply #5 on: January 16, 2009, 08:52:52 »
This is caused by the security model - QM is "blind" to queues that is not supposed to see in the queue list.
In any case, if you can see the details of each single queue in the Realtime page, you should be able to access those right from the XML-RPC interface as well.
 

barryf

  • Jr. Member
  • **
  • Posts: 62
  • Karma: 4
    • View Profile
Re: Question on RealtimeDO.RTRiassunto
« Reply #6 on: January 16, 2009, 13:22:45 »
In any case, if you can see the details of each single queue in the Realtime page, you should be able to access those right from the XML-RPC interface as well.
 

Yes, but that is the crux of my problem. Whereas in the QM Realtime page, if I have an aggregate queue which contains 6 queues, I see the correct number of available agents for each queue. However, if I query these same 6 queues via XML-RPC I am only given the "all selected" information, and if I query each queue individually I am given the wrong information, because it is showing agents free but they are in fact busy in another queue.

This would be solved for me if, when I query by XML-RPC a group of queues, that the result returned included the details of each queue I requested, rather than simply  the "all selected" summary.

-Barry

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Question on RealtimeDO.RTRiassunto
« Reply #7 on: January 18, 2009, 10:51:52 »
You should be seeing calls in the active queues at least, that is the "all selected" plus a line for each active queue. If you don't, please contact Support so we can open up a bug (they will ask you to send over a config files likely).

We track this as bug #611.
« Last Edit: January 18, 2009, 10:54:02 by QueueMetrics »

marcos

  • Loway
  • Full Member
  • *
  • Posts: 138
  • Karma: 3
    • View Profile
Re: Question on RealtimeDO.RTRiassunto
« Reply #8 on: April 09, 2009, 11:28:04 »
Hi Barry,

I'm trying to replicate the problem you arise but I'm unable to do it. I'm running the PHP code you can find in the QM_XML-RPC_manual_151.pdf (you can download from QueueMetrics support page).
I've modified it a little bit to be able to access to Realtime reports and, for what I can understand, QueueMetrics seems working correctly: if I select more than one queue in the XML RPC query parameters, QueueMetrics is answering with one line for each selected queue plus the "all selected" summary line.
I think that this is the wanted behavior.
I post below the code I'm using; could you, please, test it on your QM revision?
Thank you and best regards.

Marco.

<?php
    require_once 'XML/RPC.php';
   
    $qm_server = "yourmachine"; // the QueueMetrics server address
    $qm_port = "8080"; // the port QueueMetrics is running on
    $qm_webapp = "queuemetrics"; // the webapp name for QueueMetrics
   
    // set which response blocks we are looking for
    $req_blocks = new XML_RPC_Value(array(
        new XML_RPC_Value("RealtimeDO.RTRiassunto"),
        new XML_RPC_Value("RealtimeDO.RTCallsBeingProc"),
        new XML_RPC_Value("RealtimeDO.RTAgentsLoggedIn")
        ), "array");
       
    // general invocation parameters - see the documentation
    $params = array(
        new XML_RPC_Value("200|300"),
        new XML_RPC_Value("robot"),
        new XML_RPC_Value("robot"),
        new XML_RPC_Value(""),
        new XML_RPC_Value(""),
        $req_blocks
        );
       
    $msg = new XML_RPC_Message('QM.realtime', $params);
    $cli = new XML_RPC_Client("/$qm_webapp/xmlrpc.do", $qm_server, $qm_port);
   
    //$cli->setDebug(1);
    $resp = $cli->send($msg);
   
    if (!$resp) {
        echo 'Communication error: ' . $cli->errstr;
        exit;
    }
   
    if ($resp->faultCode()) {
        echo 'Fault Code: ' . $resp->faultCode() . "\n";
        echo 'Fault Reason: ' . $resp->faultString() . "\n";
    } else {
        $val = $resp->value();
        $blocks = XML_RPC_decode($val);

        // now we print out the details....
        printBlock( "result", $blocks );
        printBlock( "RealtimeDO.RTRiassunto", $blocks );
        printBlock( "RealtimeDO.RTCallsBeingProc", $blocks );
        printBlock( "RealtimeDO.RTAgentsLoggedIn", $blocks );
    }
   
    // output a response block as HTML
    function printBlock( $blockname, $blocks ) {
        echo "Response block: $blockname \n";
        $block = $blocks[$blockname];
       
        for ( $r = 0; $r < sizeof( $block ); $r++ ) {
            echo "\n";
            for ( $c = 0; $c < sizeof( $block[$r] ); $c++ ) {
                echo( $block[$r][$c] . "\t" );
            }
        }
    }
?>