Page 1 of 1

Api for agent

PostPosted: Sat Mar 30, 2019 9:19 am
by finntama
hi, I would like to ask how to get the credentials for using st_get_agent_active_lead api?
this => value=876543&vendor_id=207

I cant seems to find the needed value. its not user id nor user name/

is there any api to get current call lead details?

Re: Api for agent

PostPosted: Sat Mar 30, 2019 6:59 pm
by mflorell
From the documentation:
http://vicidial.org/docs/AGENT_API.txt


--------------------------------------------------------------------------------
st_get_agent_active_lead -

DESCRIPTION:
Looks up the vicidial_users.custom_three field(as "agentId") to associate with a vicidial user ID. If found it will output the active lead_id and phone number, vendor_lead_code, province, security_phrase and source_id fields.

VALUES:
value -
REQUIRED alphanumeric string for CRM AgentID
vendor_id -
REQUIRED alphanumeric string for CRM TeamID

EXAMPLE URLS:
http://server/agc/api.php?source=test&u ... dor_id=207

RESPONSES:
ERROR: st_get_agent_active_lead not valid - 6666|207
ERROR: no user found - 6666
ERROR: user not logged in - 6666
ERROR: no active lead found - 6666
SUCCESS: st_get_agent_active_lead lead found - 6666|7275551212|123456|9987-1234765|SK|WILLIAMS|JUH764AJJJ9



"value" is the User Custom 3 field value for the user that you are looking up
"vendor_id" can be anything, as long as it's at least one character

This function was designed to be used with a 3rd party CRM system, which is why it operates differently from other API functions.

Re: Api for agent

PostPosted: Sat Mar 30, 2019 8:29 pm
by finntama
is it possible to get lead details while agent is on call?

Re: Api for agent

PostPosted: Sun Mar 31, 2019 8:15 am
by mflorell
Most clients will just use the "Start Call URL" campaign/in-group function for that.

Re: Api for agent

PostPosted: Sun Mar 31, 2019 11:29 am
by williamconley
finntama wrote:is it possible to get lead details while agent is on call?


To get lead details: The AGENT would look at the screen. The details are there.

Now ... if you are talking about someone other than the agent, that's a different story. Who or what other system needs this information? There is a live agent log in the Asterisk database which contains a lead id field ... which could be used to gather the leaad information ... the agent can push "Web Form" (or it can automatically pop up) at any time and push data to another system with whatever web script is in that field. Same goes for a Script that contains an iFrame and of course the start call url as previously mentioned by matt.