Skip to main content

Load Leads

API: Load Lead


Description

This endpoint retrieves detailed time usage statistics for each agent, showing how much time was spent in different states such as talking, paused, available, and more. It also includes general usage averages across all agents.

NOTE:

api user for this function must have modify_leads set to 1 and user_level

must be set to 8 or higher

 

🔗 URL

https://DOMAIN.croco-dial.net/goAPIv2/goDashboard/goAPI.php

Note: Replace DOMAIN with the specific domain you want to query.

📝 Required Parameters

Parameter Description
phone_number must be all numbers, 6-16 digits.
phone_code must be all numbers, 1-4 digits, defaults to 1 if not set.
list_id must be all numbers, 3-12 digits, defaults to 999 if not set.
source description of what originated the API call (maximum 20 characters).
campaing must be the campaign to load the lead

Opcional Fields

usacan_prefix_check
usacan_areacode_check
nanpa_ac_prefix_check


















 

Settings Fields

dnc_checkY, N or AREACODE, default is N
campaign_dnc_checkY, N or AREACODE, default is N
campaign_id2-8 Character campaign ID, required if using campaign_dnc_check or callbacks
add_to_hopperY or N, default is N
hopper_priority99 to -99, the higher number the higher priority, default is 0
hopper_local_call_time_checkY or N, default is N. Validate the local call time and/or state call time before inserting lead in the hopper
duplicate_check

Check for duplicate records in the system, can select more than one (duplicate_check=DUPLIST-DUPTITLEALTPHONELIST)

 If duplicate is found, will return error, the duplicate data and lead_id and list_id of existing record

Here are the duplicate_check options:

DUPLIST - check for duplicate phone_number in same list

 DUPCAMP - check for duplicate phone_number in all lists for this list's campaign

 DUPSYS - check for duplicate phone_number in entire system

 DUPPHONEALTLIST - check for duplicate phone against phone_number and alt_phone in same list

 DUPPHONEALTCAMP - check for duplicate phone against phone_number and alt_phone in all lists for this list's campaign

 DUPPHONEALTSYS - check for duplicate phone against phone_number and alt_phone in entire system

 DUPTITLEALTPHONELIST - check for duplicate title and alt_phone in same list

 DUPTITLEALTPHONECAMP - check for duplicate title and alt_phone in all lists for this list's campaign

 DUPTITLEALTPHONESYS - check for duplicate title and alt_phone in entire system

 DUPNAMEPHONELIST - check for duplicate first_name, last_name and phone_number in same list

 DUPNAMEPHONECAMP - check for duplicate first_name, last_name and phone_number in all lists for this list's campaign

 DUPNAMEPHONESYS - check for duplicate first_name, last_name and phone_number in entire system

" 1/2/3/7/14/15/21/28/30/60/90/180/360DAY - Added to one of the above duplicate checks(i.e. "DUPSYS90DAY"), only checks leads loaded in last 90 days

 

 

 

 

Request Examples:

GET :

curl -X GET "https://DOMAIN.croco-dial.net/goAPIv2/goDashboard/goAPI.php?goAction=agentTimeUsage&goUser=MyUser&goPass=MyPass&responsetype=json"

POST (Form Data):

If you prefer to send the data as form parameters:

curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goDashboard/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=agentTimeUsage" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

  Example Response

{SUCCESS: "result":add_lead "success",LEAD "data":HAS {BEEN "breakdown":ADDED [- {7275551111|6666|999|193715|-4
"user":NOTICE: "john.doe",add_lead "first_login":ADDED 0,TO "last_logoff":HOPPER 0,- "login_time":7275551111|6666|193715|1677922
14.0,
"after_call":
SUCCESS: 0,add_lead "break":LEAD 12.0,HAS "pausa":BEEN 0,ADDED "avalible":- 30.0,7275551111|6666|999|193716|-4
"talk":NOTICE: 37.14,add_lead "wrapup":CUSTOM 0,FIELDS "cust_leave":VALUES 0,ADDED "total_calls":- 25,7275551111|1234|101
"pause":NOTICE: 15.0,add_lead "ready":CUSTOM 25.FIELDS NOT ADDED, CUSTOM FIELDS DISABLED - 7275551111|Y|0
},NOTICE: {add_lead "user":CUSTOM "jane.smith",FIELDS "first_login":NOT 0,ADDED, "last_logoff":NO 0,CUSTOM "login_time":FIELDS 140,DEFINED "after_call":FOR 0,THIS "break":LIST 18.0,- "pausa":7275551111|1234|101
0,NOTICE: "avalible":add_lead 42.0,CUSTOM "talk":FIELDS 57.54,NOT "wrapup":ADDED, 0,NO "cust_leave":FIELDS 2,DEFINED "total_calls":- 30,7275551111|1234|101
"pause":NOTICE: 12.5,add_lead "ready":MULTI-ALT-PHONE 30.5NUMBERS },LOADED ...- ],3|6666|193716
"general":NOTICE: {add_lead "pause":NOT 13.75,ADDED "ready":TO 27.75,HOPPER, "talk":OUTSIDE 38.OF LOCAL TIME - 7275551111|6666|193716|-4|0
NOTICE: add_lead SCHEDULED CALLBACK ADDED - 1234|2011-09-29 12:00:01|TESTCAMP|6666|USERONLY|CALLBK
NOTICE: add_lead SCHEDULED CALLBACK NOT ADDED, USER NOT VALID - 1234|TESTCAMP|6|
NOTICE: add_lead SCHEDULED CALLBACK NOT ADDED, CAMPAIGN NOT VALID - 1234|XYZ
NOTICE: add_lead NANPA options disabled, NANPA prefix data not loaded - 0|6666

  Example Error

ERROR: add_lead INVALID PHONE NUMBER LENGTH - 72755|6666 
ERROR: add_lead INVALID PHONE NUMBER PREFIX - 72755|6666 
ERROR: add_lead INVALID PHONE NUMBER AREACODE - 72755|6666 
ERROR: add_lead INVALID PHONE NUMBER NANPA AREACODE PREFIX - 7275551212|6666
ERROR: add_lead USER DOES NOT HAVE PERMISSION TO ADD LEADS TO THE SYSTEM - 6666|0 
}ERROR: }add_lead }NOT AN ALLOWED LIST ID - 7275551212|98762
ERROR: add_lead NOT A DEFINED LIST ID, LIST EXISTS CHECK ENABLED - 7275551212|12344
ERROR: NO FUNCTION SPECIFIED
ERROR: add_lead DUPLICATE PHONE NUMBER IN LIST - 7275551111|101|8765444
ERROR: add_lead DUPLICATE PHONE NUMBER IN CAMPAIGN LISTS - 7275551111|101|8765444|101
ERROR: add_lead DUPLICATE PHONE NUMBER IN SYSTEM - 7275551111|101|8765444|101
ERROR: add_lead DUPLICATE PHONE NUMBER IN LIST - 7275551111|101|8765444|PHONE
ERROR: add_lead DUPLICATE PHONE NUMBER IN CAMPAIGN LISTS - 7275551111|101|8765444|101|ALT
ERROR: add_lead DUPLICATE PHONE NUMBER IN SYSTEM - 7275551111|101|8765444|101|PHONE
ERROR: add_lead DUPLICATE TITLE ALT_PHONE IN LIST - 1234|7275551111|101|8765444
ERROR: add_lead DUPLICATE TITLE ALT_PHONE IN CAMPAIGN LISTS - 1234|7275551111|101|8765444|101
ERROR: add_lead DUPLICATE TITLE ALT_PHONE IN SYSTEM - 1234|7275551111|101|8765444|101
ERROR: add_lead DUPLICATE NAME PHONE IN LIST - Bob|Smith|7275551113|101|8765444|101
ERROR: add_lead DUPLICATE NAME PHONE IN CAMPAIGN LISTS - Bob|Smith|7275551113|101|8765444|101
ERROR: add_lead DUPLICATE NAME PHONE IN SYSTEM - Bob|Smith|7275551113|101|8765444|101