Page 1 of 1

Hot Keys

PostPosted: Tue Nov 03, 2009 4:50 pm
by gmcust3
I have around 25 agents on Vici.

Now, what I am looking for is :

In first 3 hrs of dialing , they can use Hot Keys and after 1st break and having their dinner, they feel sleepy, so to deactivate Hot Keys and again in 3rd break they can use Hot Keys.

This will save my Wrap Up time and more talk time.

Anyway to activate and deactivate Hot keys for all Agent on click of a button ?

PostPosted: Tue Nov 03, 2009 5:44 pm
by mflorell
You have to force the agents to logout because hotkeys is a login-defined feature. You could write a script to log all agents out and then change their user settings to disable/enable hotkeys at a specific time. We have written similar scripts for clients.

PostPosted: Tue Nov 03, 2009 5:47 pm
by gmcust3
Is that Script available at sourceforge ?

PostPosted: Tue Nov 03, 2009 6:48 pm
by mflorell
The script doesn't exist, we have written custom scripts for clients that make changes to agent settings and client-custom fields on a scheduled basis.

The best place to start would probably be with the AST_agent_logout.pl script which will log out all agents on a system.

PostPosted: Tue Nov 03, 2009 6:54 pm
by gmcust3
I was thinking to write a PHP file which will change the Status for Hot-Key for all users in DB on click of a button.

PostPosted: Tue Nov 03, 2009 6:59 pm
by mflorell
That will change the settings, but you have to have the agents log out before that change would go into effect for their agent screen session.

PostPosted: Tue Nov 03, 2009 7:01 pm
by gmcust3
Agreed.

Will post the PHP file once I have it , though a simple PHP file.

PostPosted: Wed Nov 04, 2009 1:34 pm
by gmcust3
I want to display on vicidial.php file on TOP, Next to calls in queue , the status of the HOT KEY for each user logged in .

Where to insert lines for that { and what lines } :-) ?

PostPosted: Wed Nov 04, 2009 5:49 pm
by gmcust3
Ref : http://www.phpfreaks.com/tutorial/worki ... a-database

Code: Select all


<?php
include("dbconnect.php");

$updated = FALSE;
if(count($_POST) > 0){
    $user_id = $_POST['user_id='];
    array_map('intval',$user_id);
    $user_id = implode(',',$user_id);
    echo $user_id;
    mysql_query("UPDATE vicidial_users SET hotkeys_active='0'") or trigger_error(mysql_error(),E_USER_ERROR);
    mysql_query("UPDATE vicidial_users SET hotkeys_active='1' WHERE user_id IN ($user_id)") or trigger_error(mysql_error(),E_USER_ERROR);
    $updated=TRUE;
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
<?php
if($updated===TRUE){
    echo '<div>Hot Keys Updated!</div>';
}
?>


<table border=1>
<tr>
<th>Username</th>
<th>Hot Keys Privileges</th>
</tr>
<?php
$sql = "SELECT user_id,user,hotkeys_active FROM vicidial_users ORDER by user_id ASC";
$result = mysql_query($sql) or trigger_error(mysql_error(),E_USER_ERROR);
while(list($user_id,$user,$hotkeys_active)=mysql_fetch_row($result)){
    $checked = ($hotkeys_active==1) ? 'checked="checked"' : '';
    echo '<tr><td>'.$user.'</td><td><input type="checkbox" name="user_id=[]" value="'.$user_id.'" '.$checked.'/></td></tr>'."\n";
}
?>
<tr><td colspan="2"><input type="submit" name="submit" value="Update Privileges" /></td></tr>
</table>
</form>
</body>
</html>



Working !!!

Now,

I want to display on vicidial.php file on TOP, Next to calls in queue , the status of the HOT KEY for each user logged in .

Where to insert lines for that { and what lines } ?

And anyway to "force" log off and login after updating HotKeys ?

PostPosted: Thu Nov 05, 2009 12:17 pm
by mflorell
Forcing a logout from the agent interface involves quite a lot of coding on multiple scripts for it to be done correctly, we do this for shift enforcement, that might be a good place to start.

PostPosted: Thu Nov 05, 2009 12:22 pm
by gmcust3
I want to display on vicidial.php file on TOP, Next to calls in queue , the status of the HOT KEY for each user logged in .

Where to insert lines for that { and what lines } ?