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. As the needs have changed for sponsor client and VICIDIAL has evolved since this functionality was first put into the planning stages, there have been several changes to how the QC process is going to be built. The objective is to add the following QC features to make VICIDIAL a more well-rounded product: - ability to define which statuses are to be able to be QCd per campaign and inbound group(queue) - ability to give agents permission to QC records for their allowable campaigns/inbound groups - ability to log all access and changes to QCd records - creation of some basic reports on QC activity The back-end process will work like this: - ADMIN_keepalive_ALL.pl script will look for the 'Q' in the keepalive definition in /etc/astguiclient.conf file. If it is set, it will trigger a script to gather the QC records every five minutes(with a 15 second delay) since the last QC gathering as defined in the system_settings table qc_last_pull_time field(which is populated with the START time of the last QC-pull run). The time interval for this might be made configurable. - There will also be an optional method of pulling QC records available to the QC managers that enables them to specify a date range to pull and insert records - Selected records from the vicidial_list table (keyed on the the vicidial_log and vicidial_closer_log tables) will be taken and inserted into the qc_vicidial_list_original table. - QC agents are then able to run their process starting with the earliest records for their selected campaign/inbound groups - After QC agents have PASSed, FINISHed and COMMITted the QC records, then they can be exported The QC agent will login to the 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 inbound-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. Upon clicking on a link, the qc.php application will insert a record into the qc_vicidial_list to keep track of changes and other information on the qc record session. The SCRIPTS tab and web form will both function exactly as they do in the vicidial.php application, with the exception that there will be added qc_web_form_address and qc_script options for both campaigns and inbound groups. There will also be an option to have any of these launched upon a new record appearing on the QC agent's screen. The qc.php user interface will be using AJAX as a method to bring up records and keep track of QC-agent activity and performance. 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 (can do anything including delete QC records) 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 DEAD - QC record is old and present for logs only, newer record has taken it's place The Database Changes: # This table contains the original lead information before changes CREATE TABLE qc_vicidial_list_original ( qc_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, qc_import_date DATETIME, call_date DATETIME, log_id VARCHAR(20) UNIQUE NOT NULL, campaign_group_id VARCHAR(20), modify_date TIMESTAMP, status VARCHAR(6), user VARCHAR(20), closer VARCHAR(20), vendor_lead_code VARCHAR(20), source_id VARCHAR(50), 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','U') default 'U', date_of_birth DATE, alt_phone VARCHAR(12), email VARCHAR(70), security_phrase VARCHAR(100), comments VARCHAR(255), ); # This table contains the updated QC records CREATE TABLE qc_vicidial_list ( qc_list_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, qc_id INT(9) UNSIGNED NOT NULL, lead_id INT(9) UNSIGNED NOT NULL, log_id VARCHAR(20) 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(50), 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','U') default 'U', date_of_birth DATE, alt_phone VARCHAR(12), email VARCHAR(70), security_phrase VARCHAR(100), comments VARCHAR(255), index (qc_id), index (lead_id), index (original_id), index (phone_number), index (status), index (qc_stage) ); # 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','INQC','PAUSED') 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) ); # For the inbound groups table, some fields will need to be added to the vicidial_campaigns table: ALTER TABLE vicidial_inbound_groups ADD qc_enabled ENUM('Y','N') default 'N'; ALTER TABLE vicidial_inbound_groups ADD qc_statuses TEXT; ALTER TABLE vicidial_inbound_groups ADD qc_web_form_address VARCHAR(255); ALTER TABLE vicidial_inbound_groups ADD qc_script VARCHAR(10); ALTER TABLE vicidial_inbound_groups ADD qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE'; ALTER TABLE vicidial_campaigns ADD qc_get_record_launch ENUM('NONE','SCRIPT','WEBFORM','QCSCRIPT','QCWEBFORM') default 'NONE'; ALTER TABLE system_settings ADD qc_last_pull_time DATETIME; # qc codes to be used for statistics CREATE TABLE vicidial_qc_codes ( code VARCHAR(8) PRIMARY KEY NOT NULL, code_name VARCHAR(30) ); 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';