Learderboard job

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Learderboard job

Postby Plat » Wed Sep 05, 2012 9:31 pm

Need some help. I'm creating a Leaderboard for this company and they want to display the TOP SALES reps on an LCD TV to be updated constantly and displayed in front of all the reps. I already know what to do but it's going to involve a ton of custom php programming which im ok with. This should be a pretty easy task, i'm just wondering the quickest route to do this. Any ideas are much appreciated!
| VERSION: 2.6-395a | BUILD: 130221-1736 | Asterisk 1.4.44-vici | Clustered Servers (18) | Sangoma UT50 |
Plat
 
Posts: 36
Joined: Fri Aug 31, 2012 11:44 am
Location: Florida

Re: Learderboard job

Postby Plat » Thu Sep 06, 2012 5:16 pm

i'm probably gonna edit AST_team_performance_detail.php and create a new file
has all i need i believe
| VERSION: 2.6-395a | BUILD: 130221-1736 | Asterisk 1.4.44-vici | Clustered Servers (18) | Sangoma UT50 |
Plat
 
Posts: 36
Joined: Fri Aug 31, 2012 11:44 am
Location: Florida

Re: Learderboard job

Postby Plat » Sat Sep 08, 2012 10:01 pm

Having a huge problem not being able to rank users from top to bottom, I almost got it but I cannot figure out how to rank them from top sales down to lowest sales...its mixed...ive tried using "sort" in so many different lines but with no luck...
| VERSION: 2.6-395a | BUILD: 130221-1736 | Asterisk 1.4.44-vici | Clustered Servers (18) | Sangoma UT50 |
Plat
 
Posts: 36
Joined: Fri Aug 31, 2012 11:44 am
Location: Florida

Re: Learderboard job

Postby DomeDan » Mon Sep 10, 2012 2:03 am

If its based on AST_team_performance_detail.php then the order is set in the query: "order by full_name, user"
if not then you got rsort() which is sort reversed, use ksort() if you want to sort by key

I wrote a kind of leaderboard last year, but I did it from scratch, now not so long ago I rewrote it to work with vicidial permissions and stuff
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Learderboard job

Postby Plat » Tue Sep 11, 2012 4:42 am

i switched to AST_agent_performance_detail.php

at this... its close but no cigar... any ideas?

Code: Select all
$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status,sum(dead_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and pause_sec<65000 and wait_sec<65000 and talk_sec<65000 and dispo_sec<65000 $group_SQL $user_group_SQL group by user,full_name,status ORDER by vicidial_agent_log.status ='SALE' desc limit 500000;";
| VERSION: 2.6-395a | BUILD: 130221-1736 | Asterisk 1.4.44-vici | Clustered Servers (18) | Sangoma UT50 |
Plat
 
Posts: 36
Joined: Fri Aug 31, 2012 11:44 am
Location: Florida

Re: Learderboard job

Postby DomeDan » Tue Sep 11, 2012 5:30 am

Plat wrote:Hey any chance of me getting my hands on the script that you wrote for the leaderboard? That would be awesome
Thanks

Sure, I've just posted it on the issue tracker http://www.vicidial.org/VICIDIALmantis/view.php?id=604
But its unlikely it will fit your needs but you might be able to rewrite it

if this topic "Leaderboard Job" is a job your doing for someone else, remember that my script is under AGPLv2 license, you cant sell it,
read more about what you can and cannot do here: http://www.eflo.net/VICIDIALforum/viewtopic.php?p=5197
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Learderboard job

Postby Plat » Tue Sep 11, 2012 4:12 pm

DomeDan wrote:
Plat wrote:Hey any chance of me getting my hands on the script that you wrote for the leaderboard? That would be awesome
Thanks

Sure, I've just posted it on the issue tracker http://www.vicidial.org/VICIDIALmantis/view.php?id=604
But its unlikely it will fit your needs but you might be able to rewrite it

Cool thanks i'll take a look at it

if this topic "Leaderboard Job" is a job your doing for someone else, remember that my script is under AGPLv2 license, you cant sell it,
read more about what you can and cannot do here: http://www.eflo.net/VICIDIALforum/viewtopic.php?p=5197


It's not going to be sold its for the company I work for, i figured if I could show them I could do this they might give me a raise lol :D
| VERSION: 2.6-395a | BUILD: 130221-1736 | Asterisk 1.4.44-vici | Clustered Servers (18) | Sangoma UT50 |
Plat
 
Posts: 36
Joined: Fri Aug 31, 2012 11:44 am
Location: Florida

Re: Learderboard job

Postby Plat » Tue Sep 11, 2012 4:19 pm

ima gonna add some AJAX & JQuery to it so it will auto update every 5-10 seconds without completely refreshing the page just the stats, also ima add some sort of flashing feature when someone gets a new sale.
| VERSION: 2.6-395a | BUILD: 130221-1736 | Asterisk 1.4.44-vici | Clustered Servers (18) | Sangoma UT50 |
Plat
 
Posts: 36
Joined: Fri Aug 31, 2012 11:44 am
Location: Florida

Re: Learderboard job

Postby DomeDan » Tue Sep 11, 2012 4:38 pm

hehe, good luck with the raise and with the coding!
I was planning to do the update in AJAX but have not been working with it so much, and I got a bit confused when I tried to get a grip of all the code in the real-time report.

and by the way, my leaderboard is kind of a sales report also when you can specify date ranges
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Learderboard job

Postby Plat » Tue Sep 11, 2012 4:43 pm

ya im looking at it now, looks pretty similar to what I edited from the team_performance script, but with it more chopped up how I need it.

What does this mean? "Warning: A SALE is missing order value! Lead_id: 511319 Edit lead Agent: 2002" etc etc, today there are like 20 of them for various users
| VERSION: 2.6-395a | BUILD: 130221-1736 | Asterisk 1.4.44-vici | Clustered Servers (18) | Sangoma UT50 |
Plat
 
Posts: 36
Joined: Fri Aug 31, 2012 11:44 am
Location: Florida

Re: Learderboard job

Postby DomeDan » Wed Sep 12, 2012 2:54 am

Thats a part of the script that looks at SALE and if security_phrase is empty the warning will show,
thats because the users here forget to write a order-amount time to time, and its required.
if your not using it you can easily remove it from the code

The script is looking at all other statuses too and writes a warning if order-amount is written but not registered as a SALE
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Learderboard job

Postby Plat » Sun Sep 23, 2012 8:22 pm

i like your script but i really cant use anything out, i saw ur few adjustments but i cant use them at all just doesnt fit what im lookin for or from what I had already done... went back to my own original a few days back and getting alot further with less errors...go figure! thanks for posting it though i do appreciate it
| VERSION: 2.6-395a | BUILD: 130221-1736 | Asterisk 1.4.44-vici | Clustered Servers (18) | Sangoma UT50 |
Plat
 
Posts: 36
Joined: Fri Aug 31, 2012 11:44 am
Location: Florida

Re: Learderboard job

Postby Acidshock » Wed Oct 31, 2012 7:29 pm

Any chance you are going to share your version of the leaderboard with the community?
VERSION: 2.14-698a | BUILD: 190207-2301 | Asterisk:13.24.1-vici | Vicibox 8.1.2
Acidshock
 
Posts: 428
Joined: Wed Mar 03, 2010 3:19 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 31 guests