Added STAGING option for campaign presets

Added DELETE action to the 'update_presets' Non-Agent API function
Added more time-sync detailed logging from the agent screen

git-svn-id: svn://192.168.202.10@3586 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2022-03-10 15:09:55 +00:00
parent f4c4267ba1
commit 0dd2c833cf
9 changed files with 180 additions and 43 deletions
+8 -5
View File
@@ -1,4 +1,4 @@
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2022-03-07
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2022-03-10
This document describes the functions of an API(Application Programming
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
@@ -63,7 +63,7 @@ add_fpg_phone - adds a phone number to a Filter Phone Group
campaigns_list - displays information about all campaigns in the system
hopper_list - displays information about leads in the hopper for a campaign
update_alt_url - updates/adds/displays alternate dispo call url entries for a campaign
update_presets - updates/adds/displays campaign preset entries
update_presets - updates/adds/displays/deletes campaign preset entries
New scripts:
@@ -201,6 +201,7 @@ Changes:
211118-1946 - Added 'delete_cf_data' setting to the update_lead function
220126-2116 - Added dispo_call_url and alt URL options for update_campaign. Added 'update_alt_url' function
220307-0937 - Added 'update_presets' function
220310-0825 - Added DELETE action to the 'update_presets' function
API Functions use the 'function' variable
@@ -2357,7 +2358,7 @@ url_id|campaign_id|entry_type|active|url_type|url_rank|url_statuses|url_descript
--------------------------------------------------------------------------------
update_presets - updates/adds/displays campaign preset entries
update_presets - updates/adds/displays/deletes campaign preset entries
NOTE: api user for this function must have user_level set to 8 or higher and "modify campaigns" enabled
@@ -2366,7 +2367,7 @@ campaign_id - 2-8 characters
source - description of what originated the API call (maximum 20 characters)
preset_name - name of the preset in the system
NOTE: If only one preset exists for this campaign, then this field can be left blank
action - 'UPDATE', 'NEW' or 'LIST' (default is 'UPDATE')
action - 'UPDATE', 'NEW', 'DELETE' or 'LIST' (default is 'UPDATE')
NOTE: 'stage'(csv, tab, pipe[default]) and 'header'(YES, NO) options are available for an action of 'LIST'
EDITABLE FIELDS-
@@ -2383,6 +2384,7 @@ http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&functio
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_presets&campaign_id=ALTTEST&preset_number=3125551213&preset_hide_number=N&preset_dtmf=1234
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_presets&campaign_id=ALTTEST&action=LIST
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_presets&campaign_id=ALTTEST&preset_name=SUPPORT+LINE&preset_number=3125551214&preset_hide_number=Y&preset_dtmf=1&action=NEW
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_presets&campaign_id=ALTTEST&preset_name=SUPPORT+LINE&action=DELETE
Example responses:
@@ -2395,7 +2397,8 @@ ERROR: update_presets PRESET HIDE NUMBER MUST BE Y OR N, THIS IS AN OPTIONAL FIE
ERROR: update_presets PRESET DTMF IS NOT VALID, THIS IS AN OPTIONAL FIELD - 6666|
NOTICE: update_campaign NO UPDATES DEFINED - 6666|
SUCCESS: update_presets PRESET HAS BEEN UPDATED - 6666|1|campaign|TESTCAMP
SUCCESS: update_presets PRESET HAS BEEN ADDED - 6666|NEW PRESET: SUPPORT LINE|campaign|TESTCAMP
SUCCESS: update_presets PRESET HAS BEEN ADDED - 6666|NEW PRESET: SUPPORT LINE|TESTCAMP
SUCCESS: update_presets PRESET HAS BEEN DELETED - 6666|SUPPORT LINE|TESTCAMP
NOTICE: update_presets LIST, No Records Found - 6666|TESTCAMP|0
A LIST response will not show "SUCCESS", but instead will just print the results in the following format: