QC(Quality Control) process flow 2008-01-03 ** THIS QC FUNCTIONALITY PROSESS IS PLANNED FOR THE 2.0.5 RELEASE ** This will outline the process I have thought through for adding a Quality Assurance(QA) or Quality Control(QC) process to the VICIDIAL system. The objective is to add the following features to make VICIDIAL a more well-rounded product: - ability to define which statuses/lists are to be able to be QCd per campaign - ability to give agents permission to QC records for their allowable campaigns - ability to log all access and changes to QCd records - creation of some basic reports on QC activity The QC agent will login to a new qc.php screen within the agc web directory. They will then have a screen very similar to the vicidial.php login screen(but in a different color) that will have a user/pass to fill in. Then when they login they will see a green screen similar to the vicidial.php inbound(CLOSER-type) screen that will show them their allowable qc in-groups and campaigns. The agent will then choose which in-groups and campaigns that they want to QC the records for and then they will submit and they will be logged-in to the QC system. Upon login, they will be able to see the count of QC-able records and they can click on a link to bring up the next record to be QCd. Each qc_user_level will have different permissions for the qc system: 1- modify nothing 2- modify nothing but status 3- modify everything 4- can check records of other QC agents 5- can view stats on qc system 6- can view finished and non-committed records and alter them 7- Manager level The qc_stage is a status within QC that tells what is going on with the record: NONE - record has never been QCd LOCK_1 - a QC agent is reviewing the record PASS - QC agent has passed the record LOCK_2 - a QC agent is reviewing the record for possible finishing FINISH - record is ready to be processed COMMIT - QC record is committed to the system and cannot be modified by anyone The Database Changes: # This table contains the updated QC record CREATE TABLE qc_vicidial_list ( qc_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, lead_id INT(9) UNSIGNED NOT NULL, vicidial_log_id INT(9) UNSIGNED NOT NULL, closecallid INT(9) UNSIGNED NOT NULL, modify_date TIMESTAMP, status VARCHAR(6), qc_status VARCHAR(6), qc_date DATETIME, qc_length_in_sec SMALLINT(5) UNSIGNED default '0', qc_verify_date DATETIME, qc_verify_length_in_sec SMALLINT(5) UNSIGNED default '0', qc_comments TEXT, qc_stage VARCHAR(6), qc_user VARCHAR(20), qc_verify_user VARCHAR(20), qc_code VARCHAR(8), qc_changed ENUM('0','1') default '0', user VARCHAR(20), closer VARCHAR(20), vendor_lead_code VARCHAR(20), source_id VARCHAR(6), list_id BIGINT(14) UNSIGNED, phone_code VARCHAR(10), phone_number VARCHAR(12), title VARCHAR(4), first_name VARCHAR(30), middle_initial VARCHAR(1), last_name VARCHAR(30), address1 VARCHAR(100), address2 VARCHAR(100), address3 VARCHAR(100), city VARCHAR(50), state VARCHAR(2), province VARCHAR(50), postal_code VARCHAR(10), country_code VARCHAR(3), gender ENUM('M','F'), date_of_birth DATE, alt_phone VARCHAR(12), email VARCHAR(70), security_phrase VARCHAR(100), comments VARCHAR(255), index (phone_number), index (lead_id), index (status), index (qc_stage) ); # This table contains the original lead information before changes CREATE TABLE qc_vicidial_list_original ( qc_id INT(9) UNSIGNED PRIMARY KEY NOT NULL, modify_date TIMESTAMP, status VARCHAR(6), qc_date DATETIME, qc_user VARCHAR(20), qc_stage VARCHAR(6), user VARCHAR(20), closer VARCHAR(20), vendor_lead_code VARCHAR(20), source_id VARCHAR(6), list_id BIGINT(14) UNSIGNED, phone_code VARCHAR(10), phone_number VARCHAR(12), title VARCHAR(4), first_name VARCHAR(30), middle_initial VARCHAR(1), last_name VARCHAR(30), address1 VARCHAR(100), address2 VARCHAR(100), address3 VARCHAR(100), city VARCHAR(50), state VARCHAR(2), province VARCHAR(50), postal_code VARCHAR(10), country_code VARCHAR(3), gender ENUM('M','F'), date_of_birth DATE, alt_phone VARCHAR(12), email VARCHAR(70), security_phrase VARCHAR(100), comments VARCHAR(255), ); # This table contains the session information for qc_agents CREATE TABLE qc_agent_sessions ( qc_session_id INT(9) UNSIGNED PRIMARY KEY NOT NULL, user VARCHAR(20), qc_user_level INT(2) default '0', status ENUM('READY','QUEUE','INCALL','PAUSED','CLOSER') default 'PAUSED', qc_id INT(9) UNSIGNED NOT NULL, lead_id INT(9) UNSIGNED NOT NULL, selected_inbound_groups TEXT, selected_campaigns TEXT, qc_records_today SMALLINT(5) UNSIGNED default '0', login_time DATETIME, last_action_time DATETIME, index(user), index (last_action_time) ); # For ability to restrict statuses by user_level per campaign CREATE TABLE qc_allowed_statuses ( status VARCHAR(6) PRIMARY KEY NOT NULL, qc_user_level INT(2) default '0', campaign_group_id VARCHAR(20) ); # qc codes to be used for statistics CREATE TABLE qc_codes ( code VARCHAR(8) PRIMARY KEY NOT NULL, code_name VARCHAR(30) ); # For the log table, some fields will need to be added to the vicidial_log table: ALTER TABLE vicidial_log ADD qc_stage ENUM('NONE','LOCK_1','PASS','LOCK_2','FINISH',COMMIT') default 'NONE'; # For the closer log table, some fields will need to be added to the vicidial_closer_log table: ALTER TABLE vicidial_closer_log ADD qc_stage ENUM('NONE','LOCK_1','PASS','LOCK_2','FINISH',COMMIT') default 'NONE'; ALTER TABLE vicidial_campaigns ADD qc_web_form_address VARCHAR(255); ALTER TABLE vicidial_campaigns ADD qc_script VARCHAR(10); # For the campaigns table, some fields will need to be added to the vicidial_campaigns table: ALTER TABLE vicidial_campaigns ADD qc_enabled ENUM('Y','N') default 'N'; ALTER TABLE vicidial_campaigns ADD qc_statuses TEXT; ALTER TABLE vicidial_campaigns ADD qc_lists TEXT; ALTER TABLE vicidial_campaigns ADD campaign_shift_start_time VARCHAR(4) default '0900'; ALTER TABLE vicidial_campaigns ADD campaign_shift_length VARCHAR(5) default '16:00'; ALTER TABLE vicidial_campaigns ADD campaign_day_start_time VARCHAR(4) default '0100'; # For the in-groups/campaigns QC permissions, some fields will need to be added to the vicidial_user_groups table: ALTER TABLE vicidial_user_groups ADD qc_allowed_campaigns TEXT; ALTER TABLE vicidial_user_groups ADD qc_allowed_inbound_groups TEXT; # For the user QC permissions, some fields will need to be added to the vicidial_users table: ALTER TABLE vicidial_users ADD qc_enabled ENUM('1','0') default '0'; ALTER TABLE vicidial_users ADD qc_user_level INT(2) default '1'; ALTER TABLE vicidial_users ADD qc_pass ENUM('1','0') default '0'; ALTER TABLE vicidial_users ADD qc_finish ENUM('1','0') default '0'; ALTER TABLE vicidial_users ADD qc_commit ENUM('1','0') default '0';