Page 1 of 1

Showing SALES fo the day in AST_timeonVDADall.php

PostPosted: Fri Jan 09, 2009 11:40 pm
by okli
I am thinking to add another element to AST_timeonVDADall.php, which shows the number of sales made for the day, per campaign or for all campaigns, whatever is already selected.
This way it would be much easier to get a quick glimpse at what we are the most interested in, rather than going to VDAD stat or whatever.

A few questions- where would be the best place to get the number of calls, with status SALE?
I was thinking of something like
Code: Select all
select count(*) from vicidial_agent_log where status = 'SALE' and event_time > '2009-01-09 00:00:00';
as this table seems much smaller than vicidial_log or vicidial_list.

1. Is this the correct choice?

vicidial_agent_log seems rather big (our is ~900 000 records for the last 3 months), so I guess querying it every second or so would impact negatively the DB performance.

2. Is the above statement correct?

3. If yes- how about creating a separate table- vicidial_sales with two columns- number_of_sales | campaign_id, and run a perl script in crontab, say every 5 or 10 minutes, which gathers info from vicidial_agent_log and puts it in vicidial_sales. Thus AST_timeonVDADall.php will be getting sales number from a very small table.

Is this a better approach?

Thanks in advance.

PostPosted: Sat Jan 10, 2009 3:23 am
by mflorell
This feature is already available, have you looked at status categories?

Just create a status category with SALE in it: (Admin -> Status Categories) and set the VDADdisplay to Y

PostPosted: Sat Jan 10, 2009 1:18 pm
by okli
Thank you Matt, that's exactly what we needed : )

PostPosted: Sat Jan 10, 2009 10:24 pm
by williamconley
Ok, guys, you've really got to stop moving so quickly. I'm trying to keep up with the development of the software and things like this keep popping up. This is a cool feature.

PostPosted: Sun Jan 11, 2009 5:00 am
by mflorell
Quickly? Um, that feature is in the 2.0.4 release, from over a year ago :)

PostPosted: Sun Jan 11, 2009 3:54 pm
by williamconley
Great, now I have to go through the whole system again and see what other buttons i've never pushed!