Page 1 of 1

Agent time

PostPosted: Wed Apr 18, 2012 12:37 pm
by GaD
Hi

I need to be able to 'export' the time ranges when an agent is on the phone and the time frames of when these agents are on a pause codes. On the Vici I've noticed that the agent time is calculated based on the sum of different statuses, but I do not have a detail of when these happened. As an example: I need to have somethin like:

2012-04-18 8:00:00 to 2012-04-18 9:00:00 -> Some outbound calling campaign (on the phone)
2012-04-18 9:00:00 to 2012-04-18 9:30:00 -> Break
2012-04-18 9:30:00 to 2012-04-18 13:00:00 -> Some other outbound calling campaign

In the database I know I can get the pause codes somewhat in this format with the event_time and the pause_sec or the other options, but I have no way of knowing how much time an agent was logged in to a specific campaign in a start-time end-time format and not in a sum of time like the usual (from the Reports page) reports display.

Re: Agent time

PostPosted: Wed Apr 18, 2012 1:53 pm
by mflorell
The information you want is in the vicidial_agent_log table, you should be able to export directly from it using the MYSQL CLI or something like PHPMyAdmin.

Re: Agent time

PostPosted: Mon Jun 18, 2012 6:08 pm
by GaD
Ok..., I'm finally back on this thread where I got de-routed to other topics....

So, Matt, quick question. On that agent_log the *epoch* field corresponds to when the agent started such activity or when it ended. Eg. If I went to lucn at 13:00 for 10 minutes, the pause_epoch will show 13:00:00 or 13:10:00?

Another question. Whgat is the LOGIN status?

In the example below (a few months old) -I removed a few extra fields...- On the second entry, this agent was on Break for 8 seconds on Fri, 13 Apr 2012 17:08:23 GMT and came back from Break at 17:08:31?

He then waited for 127 seconds and went on another break for 0 seconds, then went to Brief for another 0 seconds and then to 'LOGIN' for 368 seconds and then again to LOGIN for 2337 seconds.

After that he got a call (lead_id 94), spoke for 55 seconds, waited 136 seconds, dospi for 26 seconds, dead for 98 seconds and paused himself for 94 seconds? (Lazy ass agent! Jeje)

Am I reading this right...?


Code: Select all
| event_time          | lead_id | campaign_id | pause_epoch | pause_sec | wait_epoch | wait_sec | talk_epoch | Talk_sec | dispo_epoch | dispo_sec | status | sub_status | dead_epoch | dead_sec | processed |
+---------------------+---------+-------------+-------------+-----------+------------+----------+------------+----------+-------------+-----------+--------+------------+------------+----------+-----------+
| 2012-04-13 11:04:23 |    NULL | TEST        |  1334336663 |       238 | 1334336901 |        2 |       NULL |        0 |        NULL |         0 | NULL   | LOGIN      |       NULL |        0 | N         |
| 2012-04-13 11:08:23 |      35 | TEST        |  1334336903 |         8 | 1334336911 |       35 | 1334336946 |       20 |  1334336966 |        19 | A      | Break      |       NULL |        0 | N         |
| 2012-04-13 11:09:45 |    NULL | TEST        |  1334336985 |         0 | 1334336985 |      127 |       NULL |        0 |        NULL |         0 | NULL   | Break      |       NULL |        0 | N         |
| 2012-04-13 11:11:52 |    NULL | TEST        |  1334337112 |         0 | 1334337112 |        0 |       NULL |        0 |        NULL |         0 | NULL   | Brief      |       NULL |        0 | N         |
| 2012-04-13 12:10:23 |    NULL | TEST        |  1334340623 |       368 | 1334340991 |        0 |       NULL |        0 |        NULL |         0 | NULL   | LOGIN      |       NULL |        0 | N         |
| 2012-04-13 13:34:07 |    NULL | TEST        |  1334345647 |      2337 | 1334347984 |        0 |       NULL |        0 |        NULL |         0 | NULL   | LOGIN      |       NULL |        0 | N         |
| 2012-04-16 08:24:34 |      94 | USDIRECT    |  1334586274 |        81 | 1334586355 |      136 | 1334586491 |       55 |  1334586546 |        29 | NI     | LOGIN      | 1334586529 |       17 | N         |
| 2012-04-16 08:29:35 |      98 | USDIRECT    |  1334586575 |         0 | 1334586575 |       17 | 1334586592 |       18 |  1334586610 |        72 | CALLBK | NULL       |       NULL |        0 | N         |
| 2012-04-16 08:31:22 |     102 | USDIRECT    |  1334586682 |         0 | 1334586682 |       22 | 1334586704 |       29 |  1334586733 |        24 | NI     | NULL       |       NULL |        0 | N         |
| 2012-04-16 08:32:37 |     104 | USDIRECT    |  1334586757 |         0 | 1334586757 |       12 | 1334586769 |        4 |  1334586773 |        48 | A      | NULL       |       NULL |        0 | N         |

Re: Agent time

PostPosted: Fri Jul 06, 2012 10:55 am
by GaD
Anyone...?

Re: Agent time

PostPosted: Mon Jul 09, 2012 4:34 pm
by williamconley
pause with no status code because he has just logged in and not pressed ready. most likely.

the question is why you are not "testing" this in a controlled environment before trying to grab real-world data. save your hair. test it!

remember that Vicibox installs very nicely in both VMware and Virtualbox for testing purposes. One call limit, but that's perfect for testing.

Re: Agent time

PostPosted: Mon Jul 09, 2012 4:47 pm
by GaD
This is not a testing environment, this is real data, real agents with real calls. I'm not playing around with the database, I'm just tryin to automate and integrate the Vici with the company's current system without having me in the middle doing the 'translation' between systems and the different databeses we use.

I think I already figured it out that the epoch will give me the time stamp of when the event being described (pause, wait, etc) and then add the seconds of the duration and voilá! What I don't understand yet is why there are sometimes where there are several LOGIN sub_statuses with a blank lead_id and stuff... That has got me a bit lost.....

By the way....., thanks for your help William (and Matt for your previous post)!

Re: Agent time

PostPosted: Mon Jul 09, 2012 6:58 pm
by williamconley
when an agent logs in, there is not yet a lead and they are in "pause". as long as they are "waiting", that situation does not change. even when they "resume", there is still some wait time before they receive the first lead. that is what wait time is.

Re: Agent time

PostPosted: Tue Jul 10, 2012 3:40 pm
by GaD
How do you know when an agent logs off from a campaign (to change to another) or logs off completely from the system? There is no record in the agent_log, is there?

Re: Agent time

PostPosted: Tue Jul 10, 2012 7:00 pm
by williamconley
I don't know if it is recorded as an "event" (ie: i find NO log entry resulting from a log out), but the duration of login should be stored somewhere?

Re: Agent time

PostPosted: Tue Jul 10, 2012 9:31 pm
by GaD
I have gone all over the place in the agent_log looking for such a thing, but have not seen any. I'm not sure how you track a logoff from an agent (if you track it). I believe that what you actually do is sum the times on the different sub_statuses......, I could (and hope) I'm wrong.

Could I make a request that on future releases of Vici, an entry on the database be added when the agent clicks on the LOGOFF button. I'm thinking on patching the agent interface to add an entry on the database with pause_epoch and the event_time timestamps of the event with the rest of the fields being 0 and sub_status being LOGOFF or such thing...

Re: Agent time

PostPosted: Wed Jul 11, 2012 8:25 pm
by mflorell
logins and logouts are in the vicidial_user_log table

Re: Agent time

PostPosted: Wed Jul 11, 2012 10:13 pm
by williamconley
that's weird. I save the DB, logged out, and did not see an extra record in ANY table. But now that I look directly at it, yep, there it is. LOL (And brother, does that table get big for some clients!)

Re: Agent time

PostPosted: Thu Jul 12, 2012 6:42 pm
by GaD
AWESOME!!! That is just precisely what I needed to find!!!! Thanks guys! You rock!