Added lead_callback_info Non-Agent API function, it outputs scheduled callback data for a specific lead

git-svn-id: svn://192.168.202.10@3057 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2018-12-14 22:07:17 +00:00
parent 8e20b5f1cf
commit f848b67b34
3 changed files with 271 additions and 3 deletions
+42 -1
View File
@@ -1,4 +1,4 @@
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2018-09-16
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2018-12-14
This document describes the functions of an API(Application Programming
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
@@ -47,6 +47,8 @@ ccc_lead_info - outputs lead data for cross-cluster-communication call
lead_status_search - displays all field values of all leads that match the status and call date in request
call_status_stats - report on number of calls made by campaign and ingroup, with hourly and status breakdowns
call_dispo_report - call disposition breakdown report
lead_callback_info - outputs scheduled callback data for a specific lead
New scripts:
/vicidial/non_agent_api.php - the script that is accessed to execute commands
@@ -137,6 +139,7 @@ Changes:
180208-1655 - Added call_dispo_report function
180331-1716 - Added options to update_campaign, add_user, update_phone. Added function update_did
180916-1059 - Added check for daily list reset limit
181214-1606 - Added lead_callback_info function
API Functions use the 'function' variable
@@ -659,6 +662,44 @@ TD|6666|554443||501|-4.00|1|9998887112|Mr|Billy'Oj|U|O'Reillyo|ad1|ad2|ad3|city
--------------------------------------------------------------------------------
lead_callback_info - outputs scheduled callback data for a specific lead
NOTE: api user for this function must have user_level set to 7 or higher and "view reports" enabled
REQUIRED FIELDS-
source - description of what originated the API call (maximum 20 characters)
lead_id - 16-40 characters
SETTINGS FIELDS-
stage - the format of the exported data: csv, tab, newline, pipe(default)
header - include a header(YES) or not(NO). This is optional, default is not to include a header
search_location - Where to check for scheduled callback records in the system, can select only one(default is CURRENT):
CURRENT - check for active scheduled callbacks
ARCHIVE - check for archived scheduled callbacks
ALL - check for both active and archived scheduled callbacks
Example URL strings for API calls:
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=lead_callback_info&lead_id=12345&stage=pipe&header=YES&search_location=ALL
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=lead_callback_info&lead_id=846446&search_location=ALL&header=YES
Example responses:
ERROR: lead_callback_info USER DOES NOT HAVE PERMISSION TO GET LEAD INFO - 6666|0
ERROR: lead_callback_info INVALID SEARCH PARAMETERS - 6666||
ERROR: lead_callback_info LEAD NOT FOUND - 6666||
ERROR: lead_callback_info CALLBACK NOT FOUND - 6666||
A SUCCESS response will not show "SUCCESS", but instead will just print the results in the following format(The most recent callback entry will be at the bottom of the results):
lead_id|callback_type|recipient|callback_status|lead_status|callback_date|entry_date|user|list_id|campaign_id|user_group|customer_timezone|customer_time|comments
846446|ARCHIVE|USERONLY|INACTIVE|CBTEST|2018-09-01 15:00:00|2018-08-27 01:06:45|6666|107|TESTCAMP|ADMIN|AUS-ACST-N-Northern Territory Time Zone|2018-08-27 00:00:00|
846446|ARCHIVE|USERONLY|INACTIVE|CBTEST|2018-12-14 14:00:00|2018-12-14 16:42:32|6666|107|TESTCAMP|ADMIN||2018-12-14 14:00:00|Call back after lunch
846446|CURRENT|USERONLY|INACTIVE|CBTEST|2018-12-14 19:00:00|2018-12-14 16:44:08|6666|107|TESTCAMP|ADMIN||2018-12-14 19:00:00|Call back after dinner
846446|CURRENT|USERONLY|ACTIVE|CBLEAD|2018-12-17 10:00:00|2018-12-14 16:50:56|6666|107|TESTCAMP|ADMIN|USA-EST-Y-Eastern US Time Zone|2018-12-17 10:00:00|try back Monday morning
--------------------------------------------------------------------------------
update_log_entry - updates the status of a vicidial_log or vicidial_closer_log entry